diff options
-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: |