Polish NotificationsModel::isAnyDismissable proprety
Let qml know it's computed on every call. Consider it might have changed whenever a new notification enters as well.
This commit is contained in:
parent
c729db4e47
commit
b1692142b1
2 changed files with 3 additions and 2 deletions
|
@ -44,7 +44,8 @@ NotificationsModel::NotificationsModel(QObject* parent)
|
|||
|
||||
connect(this, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
|
||||
this, SIGNAL(anyDismissableChanged()));
|
||||
|
||||
connect(this, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SIGNAL(anyDismissableChanged()));
|
||||
|
||||
QDBusServiceWatcher* watcher = new QDBusServiceWatcher(DaemonDbusInterface::activatedService(),
|
||||
QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this);
|
||||
|
|
|
@ -34,7 +34,7 @@ class KDECONNECTINTERFACES_EXPORT NotificationsModel
|
|||
Q_OBJECT
|
||||
Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged)
|
||||
Q_PROPERTY(int count READ rowCount NOTIFY rowsChanged)
|
||||
Q_PROPERTY(bool isAnyDimissable READ isAnyDimissable NOTIFY anyDismissableChanged)
|
||||
Q_PROPERTY(bool isAnyDimissable READ isAnyDimissable NOTIFY anyDismissableChanged STORED false)
|
||||
|
||||
public:
|
||||
enum ModelRoles {
|
||||
|
|
Loading…
Reference in a new issue