D11891: Fix crashes in NotifyByAudio when closing applications

René J.V. Bertin noreply at phabricator.kde.org
Tue Apr 3 23:53:13 UTC 2018


rjvbb added a comment.


  This is about better and more concise English. The queued connection is the indirect explanation why the patch is necessary, and thus comes after the direct explanation (the fact that there may be pending signals). Think of it as a courtesy to people who want to get to the point first and maybe deal with the finer detail later.
  
  The problem with this whole comment is that it's long and not very easy to follow for devs who are not (very) familiar with the code already (and those who are might not need all the detail). Rereading it with after-bedtime eyes I think you should probably just leave only the 1st sentence. The explanation why you can end up "here" after close was called could be put in the commit message, or as a "warning" above the connect() call that creates the connection.
  
  Come to think of it, your patch could take the form below because there is already a check of `notification`:
  
    if (Q_UNLIKELY(!notification)) {
        return;
    } else if ((notification->flags() & KNotification::LoopSound)) {
        m->play();
        return;
    }
  
  Maybe merge your comment with the one about "if the sound is short enough" because I from what I understand that describes more or less the same situation.

REPOSITORY
  R289 KNotifications

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

To: aacid, #frameworks, cullmann, rjvbb
Cc: cfeck, rjvbb, mpyne, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180403/06c073bc/attachment.html>


More information about the Kde-frameworks-devel mailing list