D26801: Really fix the Windows backend for KNotifications
Hannah von Reth
noreply at phabricator.kde.org
Tue Jan 21 09:18:50 GMT 2020
vonreth added inline comments.
INLINE COMMENTS
> anthonyfieroni wrote in notifybysnore.cpp:143
> So the problem isn't here. notification id should be always valid and not calculated here.
I'm not sure what would be correct here but just ignoring those notifications sounds like a bad idea.
This is really a question for @broulik
> notifybysnore.cpp:148
> + Q_UNUSED(config);
> + int new_ID = counter;
> + counter++;
const newId = m_counter++;
> notifybysnore.cpp:201
> + if (rev_m_notifications.constFind(notification) == rev_m_notifications.constEnd()) {
> return;
> }
At least warn?
> notifybysnore.cpp:203
> }
> - qCDebug(LOG_KNOTIFICATIONS) << "SnoreToast closing notification with ID: " << notification->id();
> + int new_ID = rev_m_notifications.value(notification);
> + qCDebug(LOG_KNOTIFICATIONS) << "SnoreToast closing notification with ID: " << new_ID;
const int newId
> notifybysnore.h:48
> QTemporaryDir m_iconDir;
> + QHash<KNotification *, int> rev_m_notifications;
> + int counter=0;
m_notificationsRev
m_counter
KDE and Qt uses cammelCase and member vars are prefixed with an "m_".
m_notifications it only used to see which notification was closed by a user interaction to snoretoast (this part i probably broken right now).
There is no need to keep two maps.
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/kde-frameworks-devel/attachments/20200121/128b1d39/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list