[Differential] [Updated, 27 lines] D4301: [System Tray] SNI fallback to context menu on failing Activate

Roman Gilg noreply at phabricator.kde.org
Sat Jan 28 03:13:38 UTC 2017


subdiff updated this revision to Diff 10649.
subdiff added a comment.


  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.

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D4301?vs=10605&id=10649

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

AFFECTED FILES
  applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
  dataengines/statusnotifieritem/statusnotifieritemjob.cpp
  dataengines/statusnotifieritem/statusnotifieritemjob.h
  dataengines/statusnotifieritem/statusnotifieritemsource.cpp
  dataengines/statusnotifieritem/statusnotifieritemsource.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: subdiff, #plasma, davidedmundson
Cc: 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/27667466/attachment.html>


More information about the Plasma-devel mailing list