Changeset View
Changeset View
Standalone View
Standalone View
src/sessionmodel.cpp
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 76 | if (end != -1) | |||
---|---|---|---|---|---|
77 | current_section = line.mid(1, end - 1); | 77 | current_section = line.mid(1, end - 1); | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | if (current_section != QLatin1String("Desktop Entry")) | 80 | if (current_section != QLatin1String("Desktop Entry")) | ||
81 | continue; // We are only interested in the "Desktop Entry" section | 81 | continue; // We are only interested in the "Desktop Entry" section | ||
82 | 82 | | |||
83 | if (line.startsWith(QLatin1String("Name="))) { | 83 | if (line.startsWith(QLatin1String("Name="))) { | ||
84 | si->name = line.mid(5); | 84 | si->name = line.mid(5); | ||
85 | if (type == SessionTypeWayland) { | 85 | if (type == SessionTypeWayland && !si->name.endsWith(QStringLiteral(" (Wayland)"))) { | ||
86 | //we want to exactly match the SDDM prompt which is formatted in this way | 86 | //we want to exactly match the SDDM prompt which is formatted in this way | ||
87 | si->name = i18nc("%1 is the name of a session", "%1 (Wayland)", si->name); | 87 | si->name = i18nc("%1 is the name of a session", "%1 (Wayland)", si->name); | ||
88 | } | 88 | } | ||
89 | } | 89 | } | ||
90 | if (line.startsWith(QLatin1String("Exec="))) | 90 | if (line.startsWith(QLatin1String("Exec="))) | ||
91 | si->exec = line.mid(5); | 91 | si->exec = line.mid(5); | ||
92 | if (line.startsWith(QLatin1String("Comment="))) | 92 | if (line.startsWith(QLatin1String("Comment="))) | ||
93 | si->comment = line.mid(8); | 93 | si->comment = line.mid(8); | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |