@@ -47,15 +47,15 @@ void SessionsModel::setIconSearchDirectories(const QList<QUrl> searchDirectories
4747 Q_EMIT iconSearchDirectoriesChanged();
4848}
4949
50−QUrl SessionsModel::iconUrl(const QString sessionName) const
50+QUrl SessionsModel::iconUrl(const QString sessionKey) const
5151{
5252 Q_FOREACH(const QUrl& searchDirectory, m_iconSearchDirectories)
5353 {
5454 // This is an established icon naming convention
5555 QString customIconUrl = searchDirectory.toString(QUrl::StripTrailingSlash) +
56− "/custom_" + sessionName + "_badge.png";
56+ "/custom_" + sessionKey + "_badge.png";
5757 QString iconUrl = searchDirectory.toString(QUrl::StripTrailingSlash) +
58− "/" + sessionName + "_badge.png";
58+ "/" + sessionKey + "_badge.png";
5959
6060 QFile customIconFile(customIconUrl);
6161 QFile iconFile(iconUrl);
@@ -67,26 +67,26 @@ QUrl SessionsModel::iconUrl(const QString sessionName) const
6767 // Search the legacy way
6868 QString path = searchDirectory.toString(QUrl::StripTrailingSlash) + "/";
6969 bool iconFound = false;
70− if (sessionName == "ubuntu" || sessionName == "ubuntu-2d") {
70+ if (sessionKey == "ubuntu" || sessionKey == "ubuntu-2d") {
7171 path += "ubuntu_badge.png";
7272 iconFound = true;
7373 } else if(
74− sessionName == "gnome-classic" ||
75− sessionName == "gnome-flashback-compiz" ||
76− sessionName == "gnome-flashback-metacity" ||
77− sessionName == "gnome-shell" ||
78− sessionName == "gnome-wayland" ||
79− sessionName == "gnome"
74+ sessionKey == "gnome-classic" ||
75+ sessionKey == "gnome-flashback-compiz" ||
76+ sessionKey == "gnome-flashback-metacity" ||
77+ sessionKey == "gnome-shell" ||
78+ sessionKey == "gnome-wayland" ||
79+ sessionKey == "gnome"
8080 ){
8181 path += "gnome_badge.png";
8282 iconFound = true;
83− } else if (sessionName == "plasma") {
83+ } else if (sessionKey == "plasma") {
8484 path += "kde_badge.png";
8585 iconFound = true;
86− } else if (sessionName == "xterm") {
86+ } else if (sessionKey == "xterm") {
8787 path += "recovery_console_badge.png";
8888 iconFound = true;
89− } else if (sessionName == "remote-login") {
89+ } else if (sessionKey == "remote-login") {
9090 path += "remote_login_help.png";
9191 iconFound = true;
9292 }
@@ -105,7 +105,7 @@ QVariant SessionsModel::data(const QModelIndex& index, int role) const
105105{
106106 switch (role) {
107107 case SessionsModel::IconRole:
108− return iconUrl(m_model->data(index, Qt::DisplayRole).toString());
108+ return iconUrl(m_model->data(index, QLightDM::SessionsModel::KeyRole).toString());
109109 default:
110110 return m_model->data(index, role);
111111 }