diff options
Diffstat (limited to 'src/xsession.cpp')
-rw-r--r-- | src/xsession.cpp | 14 |
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 { |