[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: KDirLister::rootItem() sometimes returns a null KFileItem
From:       David Faure <faure () kde ! org>
Date:       2014-01-19 17:49:40
Message-ID: 2297007.szLoaydour () asterix
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic