D28693: Replace old notification when new notification for connection appears
Kai Uwe Broulik
noreply at phabricator.kde.org
Thu Apr 9 07:50:15 BST 2020
broulik added a comment.
+1 I've been wanting to do exactly this forever
INLINE COMMENTS
> notification.cpp:431
> +
> + if (m_notifications.contains(connectionId)) {
> + notify = m_notifications[connectionId];
Avoid double look-up. `QHash` gives you a null value when not existing, so you can do:
KNotification *notify = m_notifications.value(connectionId);
if (!notify) {
notify = new KNotification(...);
...
m_notifications.insert(connectionId, notify);
}
REPOSITORY
R116 Plasma Network Management Applet
BRANCH
reuse
REVISION DETAIL
https://phabricator.kde.org/D28693
To: nicolasfella, #plasma, broulik, jgrulich
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200409/5c198011/attachment.html>
More information about the Plasma-devel
mailing list