summaryrefslogtreecommitdiffstats
path: root/src/xsession.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2016-02-25 14:40:26 +0100
committerJonathan Bauer2016-02-25 14:40:26 +0100
commit627310ad6a6fa14e80c3fa82ee28ed813a159070 (patch)
treec5780474133c63a2a2531e93d932492352db033c /src/xsession.cpp
parentRevert "load icon from the filesystem (if path is set in the xsession file)" (diff)
downloadvmchooser2-627310ad6a6fa14e80c3fa82ee28ed813a159070.tar.gz
vmchooser2-627310ad6a6fa14e80c3fa82ee28ed813a159070.tar.xz
vmchooser2-627310ad6a6fa14e80c3fa82ee28ed813a159070.zip
always look in the filesystem for the icon
vsession/xsession handle their fallback icon themselves
Diffstat (limited to 'src/xsession.cpp')
-rw-r--r--src/xsession.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/xsession.cpp b/src/xsession.cpp
index ff5de57..f4c8a9d 100644
--- a/src/xsession.cpp
+++ b/src/xsession.cpp
@@ -88,9 +88,11 @@ int XSession::priority() const {
}
QIcon XSession::icon() const {
- QString icon(this->icon_);
-
- if (icon.isEmpty()) {
+ QIcon retIcon;
+ if (!this->icon_.isEmpty()) {
+ retIcon = SessionsIconHolder::get()->getIcon(this->icon_);
+ }
+ if (retIcon.isNull()) {
if (this->exec_.contains("kde", Qt::CaseInsensitive)) {
icon = "kde";
} else if (this->exec_.contains("gnome", Qt::CaseInsensitive)) {
@@ -104,9 +106,9 @@ QIcon XSession::icon() const {
} else {
icon = "linux";
}
- }
-
- return SessionsIconHolder::get()->getIcon(icon);
+ retIcon = SessionsIconHolder::get()->getIcon(icon);
+ }
+ return retIcon;
}
bool XSession::run() const {