D4772: projectmanagerview: Make cut-paste work by fixing project manager's Paste action

Milian Wolff noreply at phabricator.kde.org
Mon Mar 20 09:09:13 UTC 2017


mwolff added inline comments.

INLINE COMMENTS

> aspotashev wrote in cutcopypastehelpers.cpp:78
> Ok. But why using a model? QTreeWidget is enough for the current feature-poor widget.

We don't really have such a document, we should start one... But on foreach see: https://www.kdab.com/goodbye-q_foreach/

Regarding models vs. QTreeWidget: A model is in general the cleaner solution, as it better separates the data from the presentation. I'm not demanding you to implement the model directly, just that you add a TODO that this should eventually be cleaned up.

> aspotashev wrote in cutcopypastehelpers.cpp:337
> Is this solution safe for this scenario -> https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0 ?

Yes, because you no longer have a nested eventloop

> aspotashev wrote in cutcopypastehelpers.h:63
> Why? There are no other forthcoming options besides Cut and Copy. At least KIO::isClipboardDataCut() returns a boolean.

stylistic nitpick, it makes the code easier to read.

  copyMoveItems(..., true);
  copyMoveItems(..., false);

Assume you read this in two years, do you know what the booleans are doing? Compare that to:

  copyMoveItems(..., CutCopyPasteHelpers::Cut);
  copyMoveItems(..., CutCopyPasteHelpers::Copy);

REPOSITORY
  R33 KDevPlatform

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

To: aspotashev, kfunk, mwolff
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170320/482989c2/attachment.html>


More information about the KDevelop-devel mailing list