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

Alex Fiestas alex at
Mon Sep 17 11:39:47 BST 2012

This is an automatically generated e-mail. To reply, visit:

Review request for kdelibs and David Faure.


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.


  kfile/kfilewidget.cpp 7069a49 



Used Konqueror (as indicated in the commit) with both khtml and webkit.
Tested samba-mounter
Tested bluedevil

Everything seems to work.


Alex Fiestas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list