D24773: kio_trash: Add size, modification, access and create date for trash:/
David Faure
noreply at phabricator.kde.org
Sat Apr 11 10:09:36 BST 2020
dfaure added inline comments.
INLINE COMMENTS
> kfileitem.h:349
> + *
> + * Initialy only implemented for trash:/
> + *
typo: Initially
> trashimpl.cpp:1099
> +
> + info = QFileInfo(trashPath);
> + modified = info.lastModified();
Reusing info is more expensive (and less readable) than creating it here everytime (price of assignment)
const QFileInfo info(trashPath);
> trashimpl.cpp:1100
> + info = QFileInfo(trashPath);
> + modified = info.lastModified();
> + if (modDate.isNull() || modified > modDate) {
same here
> trashimpl.cpp:1107
> + KIO::UDSEntry entry;
> + entry.reserve(3);
> + entry.fastInsert(KIO::UDSEntry::UDS_RECURSIVE_SIZE, static_cast<long long>(size));
Why not move the whole code of createTopLevelDirEntry into this method?
It's weird to fill this in two separate steps.
OK this would require moving m_userName and m_groupName into this class...
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D24773
To: meven, #frameworks, ngraham, elvisangelaccio, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200411/57e5728e/attachment.html>
More information about the Kde-frameworks-devel
mailing list