Review Request: Check if the startDir has an schema before discarting it

David Faure faure at kde.org
Thu Sep 20 22:41:25 BST 2012


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



kfile/kfilewidget.cpp
<http://git.reviewboard.kde.org/r/106475/#comment15263>

    Can you test if if (!startDir.isRelative()) would do the job?
    
    It sounds like we're reinventing the wheel here.


- David Faure


On Sept. 17, 2012, 10:39 a.m., Alex Fiestas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106475/
> -----------------------------------------------------------
> 
> (Updated Sept. 17, 2012, 10:39 a.m.)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Description
> -------
> 
> This patch addresses the following bug:
> When an user clicks in a KUrlRequestUrl("smb://") to open the dialog, the KFIleDialog will be opened with the "current working dir" instead of smb://
> 
> Debugging the issue, I reached KFileWidget::getStartUrl, in that method there is a check that looks if the directory is not empty, in case it is the directory (startDir) is discarded in favor of some magic code that looks for recent folders blablabla.
> 
> this code apparently was added to support the case where an url is composed only by a fileName, for example when Konqueror Save as (commit 4d3933d4). So the solution I thought is to check if the schema is not empty, in case both directory and schema are empty the KUrl will be discarded as well, instead if any of them is not empty the directory will be used.
> 
> 
> Diffs
> -----
> 
>   kfile/kfilewidget.cpp 7069a49 
> 
> Diff: http://git.reviewboard.kde.org/r/106475/diff/
> 
> 
> Testing
> -------
> 
> Used Konqueror (as indicated in the commit) with both khtml and webkit.
> Tested samba-mounter
> Tested bluedevil
> 
> Everything seems to work.
> 
> 
> Thanks,
> 
> Alex Fiestas
> 
>

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


More information about the kde-core-devel mailing list