Changeset View
Changeset View
Standalone View
Standalone View
src/sessionmodel.cpp
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | 70 | while (!in.atEnd()) { | |||
---|---|---|---|---|---|
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) { | ||
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 | // with the exact same check | ||||
88 | if (!si->name.endsWith(QLatin1String(" (Wayland)"))) { | ||||
87 | si->name = i18nc("%1 is the name of a session", "%1 (Wayland)", si->name); | 89 | si->name = i18nc("%1 is the name of a session", "%1 (Wayland)", si->name); | ||
88 | } | 90 | } | ||
89 | } | 91 | } | ||
92 | } | ||||
90 | if (line.startsWith(QLatin1String("Exec="))) | 93 | if (line.startsWith(QLatin1String("Exec="))) | ||
91 | si->exec = line.mid(5); | 94 | si->exec = line.mid(5); | ||
92 | if (line.startsWith(QLatin1String("Comment="))) | 95 | if (line.startsWith(QLatin1String("Comment="))) | ||
93 | si->comment = line.mid(8); | 96 | si->comment = line.mid(8); | ||
94 | if (line.startsWith(QLatin1String("Hidden="))) | 97 | if (line.startsWith(QLatin1String("Hidden="))) | ||
95 | isHidden = line.mid(7).toLower() == QLatin1String("true"); | 98 | isHidden = line.mid(7).toLower() == QLatin1String("true"); | ||
96 | } | 99 | } | ||
97 | if (!isHidden) { | 100 | if (!isHidden) { | ||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |