diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2013-03-08 11:05:11 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2013-03-08 11:05:11 +1300 |
commit | 9f78fcc53b4b73fa78914e6ef9d8907a3e140941 (patch) | |
tree | f8a64a4f364759f84403cb233b7f9829c5b1e0c2 | |
parent | 7331270816035ec48945c30219aeb915da707c24 (diff) | |
parent | 6a758c676e6f93cff312c41fb1283554f335bc6b (diff) | |
download | lightdm-git-1.5.1.tar.gz |
QLightDM: Add a backgroundPath role to UsersModel1.5.1
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | liblightdm-qt/QLightDM/usersmodel.h | 3 | ||||
-rw-r--r-- | liblightdm-qt/usersmodel.cpp | 3 |
3 files changed, 6 insertions, 1 deletions
@@ -2,6 +2,7 @@ Overview of changes in lightdm 1.5.1 * QLightDM: Add Qt5 version of the library: liblightdm-qt5-2 * QLightDM: Add some missing role names in UsersModel + * QLightDM: Add a backgroundPath role to UsersModel * QLightDM: Fix potential crash in QLightDM::UsersModel closedown. * Improve guest session apparmor * Run each test in its own /tmp dir so they can't interfere with eachother diff --git a/liblightdm-qt/QLightDM/usersmodel.h b/liblightdm-qt/QLightDM/usersmodel.h index e359eb80..659a8df6 100644 --- a/liblightdm-qt/QLightDM/usersmodel.h +++ b/liblightdm-qt/QLightDM/usersmodel.h @@ -33,7 +33,8 @@ public: BackgroundRole, SessionRole, HasMessagesRole, - ImagePathRole + ImagePathRole, + BackgroundPathRole }; int rowCount(const QModelIndex &parent) const; diff --git a/liblightdm-qt/usersmodel.cpp b/liblightdm-qt/usersmodel.cpp index 91f67671..f45a79e2 100644 --- a/liblightdm-qt/usersmodel.cpp +++ b/liblightdm-qt/usersmodel.cpp @@ -185,6 +185,7 @@ UsersModel::UsersModel(QObject *parent) : roles[RealNameRole] = "realName"; roles[LoggedInRole] = "loggedIn"; roles[BackgroundRole] = "background"; + roles[BackgroundPathRole] = "backgroundPath"; roles[SessionRole] = "session"; roles[HasMessagesRole] = "hasMessages"; roles[ImagePathRole] = "imagePath"; @@ -233,6 +234,8 @@ QVariant UsersModel::data(const QModelIndex &index, int role) const return d->users[row].isLoggedIn; case UsersModel::BackgroundRole: return QPixmap(d->users[row].background); + case UsersModel::BackgroundPathRole: + return d->users[row].background; case UsersModel::HasMessagesRole: return d->users[row].hasMessages; case UsersModel::ImagePathRole: |