[Differential] [Commented On] D4584: KDirWatch: replace QList<Client *> by std::vector<Client> to save on new/delete.

David Faure noreply at phabricator.kde.org
Wed Feb 15 19:55:20 UTC 2017


dfaure added inline comments.

INLINE COMMENTS

> smartins wrote in kdirwatch.cpp:1379
> can m_clients be shared ? If yes, htis detaches

Detaches? a std::vector?

> mwolff wrote in kdirwatch_p.h:84
> right, but that's what you want to state here, no? anyhow, I'm also OK with leaving it as-is

What I wanted to state was that I wanted to do the stuff commented out (delete copies, allow moves) and it worked 99%, the QMap is the one thing that breaks it.
If one day we use something else than a QMap then the commented out stuff can be re-enabled.
(but I'm also OK with cleaning it up completely)

> mwolff wrote in kdirwatch_p.h:141
> so it's not just a cheap handle? ok then, leave it as is and hope the returned list is never stored anywhere

No, Client is a struct with a few members.

REPOSITORY
  R244 KCoreAddons

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D4584

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: dfaure, aacid, mpyne, mwolff
Cc: smartins, mwolff, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170215/ba51d7be/attachment.html>


More information about the Kde-frameworks-devel mailing list