D26764: Another revert to unbreak crash fix

Konstantin Kharlamov noreply at phabricator.kde.org
Fri Jan 24 23:52:36 GMT 2020


kkharlamov added a comment.


  Makes me wonder though: I found that whole KDBus workaround was introduced at commit fe334292b <https://invent.kde.org/kde/konsole/commit/fe334292b5402ad0fd4b934291160ece9a12d953>. In particular, it introduced the comment about allocating qApp on the heap for KDBus workaround.
  
  Until now this comment sounded to me a bit magical, as if having it on the heap works around some KDBus bug. But now I figured, the only reason it was put on the heap is to be able to destruct qApp on exit.
  
  But if I make `qApp` a static variable, the `exit()` call gonna call destructor either way //(I've tested this claim)//. This means I can simplify the code by downgrading the variable to be stored on the stack.
  
  Ultimately, all I need is to revert the commit fe334292b <https://phabricator.kde.org/R319:fe334292b5402ad0fd4b934291160ece9a12d953> that first introduced this workaround, and in the same commit replace `QApplication app(argc, argv);` with `static QApplication app(argc, argv);`

REPOSITORY
  R319 Konsole

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

To: sandsmark, #konsole, hindenburg, kkharlamov
Cc: anthonyfieroni, konsole-devel, hindenburg, #konsole, hiangel, cent, EspadaV8, fbampaloukas, thsurrel, ngraham, maximilianocuria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20200124/8cb120a0/attachment.html>


More information about the konsole-devel mailing list