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

Reply via email to