D6951: [AppMenu Applet] Pass "ctx" as context instead of "this"

Kai Uwe Broulik noreply at phabricator.kde.org
Thu Jul 27 15:02:45 UTC 2017


broulik created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  We copy "ctx" pointer by value into our lambda but by the time our timer fires, it might be gone already.
  Instead, pass "ctx" as context to QTimer::singleShot so it won't fire when it's gone.
  
  BUG: 382386
  FIXED-IN: 5.10.5

TEST PLAN
  I don't have Visual Studio Code but it's probably related to Electron constantly updating the global menu causing us to re-create the buttons all the time.
  
  Tested that the function is still called here and seems to have worked fine. It probably will not ungrab for the aforementioned app but I'd rather have QtQuick have a wrong mouse state than having plasma crash ;)

REPOSITORY
  R120 Plasma Workspace

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

AFFECTED FILES
  applets/appmenu/lib/appmenuapplet.cpp

To: broulik, #plasma, davidedmundson
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170727/579fa7f3/attachment.html>


More information about the Plasma-devel mailing list