Review Request: ftp server URL throws "invalid protocol" - Bug: 209031

Peter Penz peter.penz19 at gmail.com
Thu Aug 26 06:29:21 BST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/5148/#review7219
-----------------------------------------------------------


Thanks for the patch. Doing this in the KUrlNavigator is the right place IMO. But I'd slightly modify the patch, although it works in it's current form...

I'd suggest to move the patch to line 988 somehow like this (I've not tested the code):
const QString protocol = url.protocol();
if (protocol.isEmpty()) {
    if (urlStr.startsWidth(QLatin1String("ftp."), Qt::CaseInsensitive)) {
       urlStr.prepend(QLatin1String("ftp://"));
    }
    ...
} else if ((protocol == QLatin1String("tar")) || ...

By this we could add similar usecases below the first if-path.

- Peter


On 2010-08-25 22:23:29, Mark wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/5148/
> -----------------------------------------------------------
> 
> (Updated 2010-08-25 22:23:29)
> 
> 
> Review request for Dolphin and kdelibs.
> 
> 
> Summary
> -------
> 
> Read the bug report for the.. bug..
> 
> As for the fix. I had a hard time finding the right place to implement this since all was using const KUrl thus not editable... When searching deeper i ended up in making the fix in either KUrlNavigator or in KUrl itself. I decided to go for KUrlNavigator for no particular reason... I could just as well have tried it in KUrl. I hope this KUrlNavigator was the right place (either way, please do explain where is the right place and why the other one isn't the right place). 
> 
> 
> This addresses bug 209031.
>     https://bugs.kde.org/show_bug.cgi?id=209031
> 
> 
> Diffs
> -----
> 
>   /branches/KDE/4.5/kdelibs/kfile/kurlnavigator.cpp 1168024 
> 
> Diff: http://reviewboard.kde.org/r/5148/diff
> 
> 
> Testing
> -------
> 
> I did one simple tests on it:
> typing "ftp.nluug.nl" in the url bar and pressing enter. It changed the url to "ftp://ftp.nluug.nl" and the ftp opened just perfectly. I browsed a bit on it to see if it stays working fins and it seems to do just that.
> 
> 
> Thanks,
> 
> Mark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100826/1e7813e5/attachment.htm>


More information about the kde-core-devel mailing list