From kfm-devel Sun Jan 19 17:49:40 2014 From: David Faure Date: Sun, 19 Jan 2014 17:49:40 +0000 To: kfm-devel Subject: Re: KDirLister::rootItem() sometimes returns a null KFileItem Message-Id: <2297007.szLoaydour () asterix> X-MARC-Message: https://marc.info/?l=kfm-devel&m=139015381308473 On Saturday 18 January 2014 18:28:02 Frank Reininghaus wrote: > Dear KIO experts, > > to determine if the "Create New..." menu should be enabled for the > current URL in Dolphin, we wait for the KDirLister's completed() > signal, then create a KFileItemListProperties instance for a > KFileItemList containing the dir lister's root item, and check the > return value of KFileItemListProperties::supportsWriting(). > > This works fine most of the time, but now we have this bug: > > https://bugs.kde.org/show_bug.cgi?id=330001 > > The "Create New..." menu is disabled in a writable directory for the > reporter, and according to the debug output that we got, this is > because the dir lister's rootItem() is a null KFileItem. > > The documentation of this function says "Can return an empty > KFileItem.", but it was my understanding that the root item should be > valid after the completed() signal is emitted. It depends on the kioslave's listDir() sending an item for "." Sounds like it's missing in kio_smb, then. -- David Faure, faure@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5