Always enable the "Create New..." menu if the URL is writable (workaround for problems with kioslaves that do not provide a "root item")

Review Request #115405 - Created Jan. 30, 2014 and submitted

Frank Reininghaus
330001, 330015
To find out if the current URL is writable or not, we wait for the KDirLister's completed() signal and then investigate its rootItem() via KFileItemListProperties.

This goes wrong if there is no "rootItem", which could be caused by a problem in the kioslave, see

We got quite a few reports about smb since 4.12.0 (that might indicate that something broke in kio_smb recently) and also one report which does not seem to involve smb.

I propose to fix this problem by creating a KFileItem for the current URL and using that if we don't get a rootItem() from the dir lister. This is also the approach that Konqueror's context menu uses, BTW. It is my understanding though that the rootItem() approach can prevent that the GUI is blocked if the access to the URL is very slow because the access happens in the kioslave (an external process).

A real fix for the problem in the affected kioslaves might be better, but since we don't know if this will break again in other kioslaves in the future, I think that the workaround makes sense.
The "Create New..." menu is still enabled and disabled approprately for me, as before. A user who suffers from the bug tested the patch and confirmed that it fixes the problem for him.
Emmanuel Pescosta
Commit Hook
This review has been submitted with commit 4865303004e1eba6e73342960bac614171323588 by Frank Reininghaus to branch KDE/4.12.
Frank Reininghaus
Review request changed

Status: Closed (submitted)