D19887: KFileItem: call stat() on demand, add SkipMimeTypeDetermination option
David Faure
noreply at phabricator.kde.org
Thu Mar 28 21:22:02 GMT 2019
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> kfileitem.cpp:86
> * Computes the text and mode from the UDSEntry
> * Called by constructor, but can be called again later
> * Nothing does that anymore though (I guess some old KonqFileItem did)
Remove this comment, no longer true (only keep the first line, remove the other 3)
> kfileitem.cpp:361
> {
> + if (item.m_bInitCalled && !m_bInitCalled) {
> + init();
What about the other way around? I think this needs the symmetrical test to call item.init() if needed
(and the corresponding unittest, write it first)
> kfileitem.cpp:730
> // Extract it from the KIO::UDSEntry
> const QString fieldVal = d->m_entry.stringValue(KIO::UDSEntry::UDS_DEFAULT_ACL_STRING);
> if (!fieldVal.isEmpty()) {
This use of d->m_entry needs a call to init(), no?
> kfileitem.cpp:766
>
> + if (!d->m_bInitCalled) {
> + d->init();
This kind of method (which only uses d->m_entry in one place) could be simplified by just doing
return entry().stringValue(....);
Then the init() would happen inside entry().
This would work in user() just above, too.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D19887
To: hoffmannrobert, dfaure, #frameworks, #dolphin
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190328/962c49b1/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list