D6308: Fix crashy dialogs (found by krazy and by hand)

Christoph Roick noreply at phabricator.kde.org
Sat Jun 24 13:07:52 UTC 2017


croick added a comment.


  In https://phabricator.kde.org/D6308#119144, @anthonyfieroni wrote:
  
  > I mean it can be useful when you have more that one deletion i.e.
  >
  >   type *dialog = new dialog;
  >   if (dialog->exec()) {
  >       delete dialog;
  >       return;
  >   }
  >   .
  >   .
  >   .
  >   delete dialog;
  >
  >
  > It can be done without 2 lines of deletes if you use wrapper
  >
  >   wrapper *dialog = new dialog;
  >   if (dialog->exec()) {
  >       return;
  >   }
  >
  
  
  Right, I was confused between caller and callee...
  But then it would actually be nice to have such a wrapper as util(ity), since the problem appears often, but mostly only once per file.

REPOSITORY
  R33 KDevPlatform

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

To: croick, #kdevelop
Cc: anthonyfieroni, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170624/df6dbba5/attachment.html>


More information about the KDevelop-devel mailing list