D23067: Clean up usage of m_client
Frederik Gladhorn
noreply at phabricator.kde.org
Sun Aug 11 19:24:08 BST 2019
gladhorn added inline comments.
INLINE COMMENTS
> romangg wrote in useractions.cpp:159
> We set `m_client = cl` above and cl is guaranteed to be non-null at this point so check is not necessary.
But m_menu->exec spins an event loop. Are you sure this cannot make the client go away? What is in the user actions menu?
From what I can tell, there is even a close action. If the user opens the menu and then clicks close, shouldn't the client become nullptr? I thought that was the entire point of using a shared pointer - to track the life-time of objects after all.
m_closeOperation = m_menu->addAction(i18n("&Close"));
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D23067
To: gladhorn, #kwin
Cc: romangg, zzag, kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190811/9944f96a/attachment.html>
More information about the kwin
mailing list