D26801: Really fix the Windows backend for KNotifications

Anthony Fieroni noreply at phabricator.kde.org
Tue Jan 21 06:32:32 GMT 2020


anthonyfieroni added inline comments.

INLINE COMMENTS

> brute4s99 wrote in notifybysnore.cpp:143
> KNotif objects by default have  `d->id = -1`
> 
> `notify()` is invoked by the base with -1 ID and later updated with the correct ID and the actions.
> 
> Weirdly though, `pairingRequest` notification is not updated by the base, (that is, the notification has all the information in the first invocation itself) but still it has ID=-1 (because it's not updated later by the base, hence the default ID).

So the problem isn't here. notification id should be always valid and not calculated here.

> notifybysnore.h:49
> +    QHash<KNotification *, int> rev_m_notifications;
> +    int counter=0;
>  };

You cannot overlap signed integer, it's undefined behaviour.

REPOSITORY
  R289 KNotifications

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

To: brute4s99, vonreth, broulik, #kde_connect
Cc: anthonyfieroni, kde-frameworks-devel, nalvarez, KunalRaghav, ankitbaluni, ankit, aliencode, Orage, ritwizsinha, LeGast00n, ewentzel, dshelley, pawelkwiecinski, ctakano, vporvaznik, mschroeder, varunp, shivanshukantprasad, skymoore, fbampaloukas, GB_2, brute4s99, wistak, anoopv, dvalencia, rmenezes, julioc, Leptopoda, timothyc, Danial0_0, johnq, Pitel, domson, adeen-s, michaelh, SemperPeritus, daniel.z.tg, jeanv, seebauer, ngraham, bruns, bugzy, MayeulC, lemuel, menasshock, mikesomov, tctara, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20200121/8b2386d7/attachment.html>


More information about the KDEConnect mailing list