KCoreDirLister::setMimeExcludeFilter()
Albert Astals Cid
aacid at kde.org
Sat Apr 29 11:17:06 BST 2023
El dimecres, 26 d’abril de 2023, a les 18:09:44 (CEST), Jonathan Marten va
escriure:
> Hello,
>
> This has been deprecated in 5.100 with the comment "no known users".
> Unfortunately there is a use in Kooka, where it is used to configure a
> KDirOperator (via its KDirLister) to only show files and not
> directories. This happens at
>
> https://invent.kde.org/graphics/kooka/-/blob/master/app/thumbview.cpp#L84
>
> Although KDirOperator has setMode(KFile::Modes), setting this to
> KFile::File or KFile::Files seems to only affect the selection mode and
> does not stop directories from being shown.
>
> The API doc for KCoreDirLister::setMimeExcludeFilter() says "Filtering
> should be done with KFileFilter", but from the current KFileFilter doc
> it appears that this will only be able to be an "include this file or
> MIME type type" filter, not an "exclude" one.
>
> Is there currently - or will there be in the future - a way to configure
> a KDirOperator in a "files only" mode, in the same way as "directories
> only" is currently supported? If it turns out that KDirOperator::setMode()
> is intended to be have that effect, then I'd be happy to investigate why
> it doesn't.
I guess we should report that deprecation since the assumpion of the
deprecation is just wrong.
Nico any reason against bringing it back?
Cheers,
Albert
>
> Best regards,
More information about the kde-core-devel
mailing list