[Differential] [Updated] D4301: [System Tray] SNI fallback to context menu on failing Activate
David Edmundson
noreply at phabricator.kde.org
Sat Jan 28 18:38:11 UTC 2017
davidedmundson added a comment.
In https://phabricator.kde.org/D4301#80882, @subdiff wrote:
> One more try with guarding against dangling pointers. Just trying out stuff here. So in case this is utter bullshit please tell me if and why it doesn't work.
>
> My thinking was the following:
>
> - Guard code execution in `StatusNotifierItemSource::activate` against deleted `m_statusNotifierItemInterface` by comparing it to the old pointer value
> - In case not deleted emit a callback signal, which is received in `StatusNotifierItemJob::activateCallback`, if job object hasn't been deleted before
> - set the result, which is received by `StatusNotifierItem.qml` as long as it exists. I mean since it connects to the finished signal of the job, there shouldn't be a problem, if it got deleted earlier.
What Anthony said is right...But also there's no need to make things complex.
The operations are kjobs.
Just use signal/slots as normal.
And/or don't return anything and just call context menu if activate fails. No need to return anything to qml.
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D4301
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: subdiff, #plasma, davidedmundson
Cc: anthonyfieroni, broulik, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170128/f367f46b/attachment-0001.html>
More information about the Plasma-devel
mailing list