[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:28:02 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=968ccb2
The following commit has been merged in the master branch:
commit 968ccb22c6da82dda6bc975da3f7acb524f7a3db
Author: Aleix Pol <aleixpol at kde.org>
Date: Tue Sep 23 19:27:47 2014 +0200
Port away from deprecated setRoleNames
---
interfaces/devicesmodel.cpp | 8 +++++---
interfaces/devicesmodel.h | 1 +
interfaces/notificationsmodel.cpp | 9 +++++----
interfaces/notificationsmodel.h | 1 +
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp
index 7f210a4..78bec8b 100644
--- a/interfaces/devicesmodel.cpp
+++ b/interfaces/devicesmodel.cpp
@@ -54,12 +54,14 @@ DevicesModel::DevicesModel(QObject *parent)
this, SLOT(deviceRemoved(QString)));
refreshDeviceList();
+}
- //Role names for QML
- QHash<int, QByteArray> names = roleNames();
+QHash< int, QByteArray > DevicesModel::roleNames() const
+{
+ QHash<int, QByteArray> names = QAbstractItemModel::roleNames();
names.insert(IdModelRole, "deviceId");
names.insert(IconNameRole, "iconName");
- setRoleNames(names);
+ return names;
}
DevicesModel::~DevicesModel()
diff --git a/interfaces/devicesmodel.h b/interfaces/devicesmodel.h
index 75ee0c1..b2cda72 100644
--- a/interfaces/devicesmodel.h
+++ b/interfaces/devicesmodel.h
@@ -65,6 +65,7 @@ public:
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
DeviceDbusInterface* getDevice(const QModelIndex& index) const;
+ virtual QHash<int, QByteArray> roleNames() const;
public Q_SLOTS:
void deviceStatusChanged(const QString& id);
diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmodel.cpp
index 0aad0b8..0f4c197 100644
--- a/interfaces/notificationsmodel.cpp
+++ b/interfaces/notificationsmodel.cpp
@@ -44,14 +44,15 @@ NotificationsModel::NotificationsModel(QObject* parent)
connect(this, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
this, SIGNAL(anyDismissableChanged()));
+}
- //Role names for QML
- QHash<int, QByteArray> names = roleNames();
+QHash<int, QByteArray> NotificationsModel::roleNames() const
+{
+ QHash<int, QByteArray> names = QAbstractItemModel::roleNames();
names.insert(DbusInterfaceRole, "dbusInterface");
names.insert(AppNameModelRole, "appName");
names.insert(DismissableModelRole, "dismissable");
- setRoleNames(names);
-
+ return names;
}
NotificationsModel::~NotificationsModel()
diff --git a/interfaces/notificationsmodel.h b/interfaces/notificationsmodel.h
index f9a7479..3066093 100644
--- a/interfaces/notificationsmodel.h
+++ b/interfaces/notificationsmodel.h
@@ -59,6 +59,7 @@ public:
NotificationDbusInterface* getNotification(const QModelIndex& index) const;
Q_INVOKABLE bool isAnyDimissable() const;
+ virtual QHash<int, QByteArray> roleNames() const;
public Q_SLOTS:
void dismissAll();
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list