diff options
author | Jonathan Bauer | 2015-05-18 18:21:06 +0200 |
---|---|---|
committer | Jonathan Bauer | 2015-05-18 18:21:06 +0200 |
commit | bb139206a2374d9f3bbbf1f26491746b18f851a1 (patch) | |
tree | 586173dff79887ae24f3f2b83ac09fad9b52b1a6 | |
parent | Start session on doubleClick signal instead of activated, so we get consisten... (diff) | |
download | vmchooser2-bb139206a2374d9f3bbbf1f26491746b18f851a1.tar.gz vmchooser2-bb139206a2374d9f3bbbf1f26491746b18f851a1.tar.xz vmchooser2-bb139206a2374d9f3bbbf1f26491746b18f851a1.zip |
fix icon from session file beeing used
-rw-r--r-- | src/sessiontreemodel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sessiontreemodel.cpp b/src/sessiontreemodel.cpp index 3858ffe..2d151ed 100644 --- a/src/sessiontreemodel.cpp +++ b/src/sessiontreemodel.cpp @@ -58,13 +58,15 @@ QVariant SessionTreeModel::data(const QModelIndex &index, int role) const { QString icon(s->icon()); // check if attribute is a valid url: - if (icon.startsWith("http://")) { // try to load icon from url QIcon url_icon = iconHolder->getIcon(QUrl(icon)); if (!url_icon.isNull()) { return url_icon; } + } else if (QFileInfo(icon).isAbsolute()) { + // try to load icon from file + return QIcon(icon); } else { // try to load icon from QResource QIcon res_icon = iconHolder->getIcon(icon); |