core/icon: stop reusing image ids (dbusmenu, notifications)

Fixes issues caused by the QML engine caching old pixmaps using the
same IDs as new ones, notably dbusmenu icons.
This commit is contained in:
outfoxxed 2025-01-22 23:10:49 -08:00
parent c6791cf1f2
commit cdaff2967f
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
8 changed files with 75 additions and 58 deletions

View file

@ -12,11 +12,10 @@
#include "../../core/retainable.hpp"
#include "../../core/util.hpp"
#include "dbusimage.hpp"
namespace qs::service::notifications {
class NotificationImage;
///! The urgency level of a Notification.
/// See @@Notification.urgency.
class NotificationUrgency: public QObject {
@ -187,7 +186,7 @@ private:
quint32 mId;
NotificationCloseReason::Enum mCloseReason = NotificationCloseReason::Dismissed;
bool mLastGeneration = false;
NotificationImage* mImagePixmap = nullptr;
NotificationImage mImagePixmap;
QList<NotificationAction*> mActions;
// clang-format off