From 627310ad6a6fa14e80c3fa82ee28ed813a159070 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 25 Feb 2016 14:40:26 +0100 Subject: always look in the filesystem for the icon vsession/xsession handle their fallback icon themselves --- src/xsession.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/xsession.cpp') 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 { -- cgit v1.2.3-55-g7522