D23067: Clean up usage of m_client
Roman Gilg
noreply at phabricator.kde.org
Sun Aug 11 15:32:42 BST 2019
romangg added inline comments.
INLINE COMMENTS
> useractions.cpp:141
> return;
> - if (cl.data()->isDesktop()
> - || cl.data()->isDock())
> + if (cl->isDesktop() || cl->isDock())
> return;
Also add braces here and below.
> useractions.cpp:159
> }
> - if (!m_client.isNull())
> - m_client.data()->blockActivityUpdates(false);
> - }
> - else {
> - m_client.data()->blockActivityUpdates(true);
> + if (m_client) {
> + m_client->blockActivityUpdates(false);
We set `m_client = cl` above and cl is guaranteed to be non-null at this point so check is not necessary.
> useractions.cpp:180
> }
> - if (!m_client.isNull())
> - m_client.data()->blockActivityUpdates(false);
> + if (m_client) {
> + m_client->blockActivityUpdates(false);
Here check also not necessary.
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/85681df3/attachment.html>
More information about the kwin
mailing list