From bb139206a2374d9f3bbbf1f26491746b18f851a1 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 18 May 2015 18:21:06 +0200 Subject: fix icon from session file beeing used --- src/sessiontreemodel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sessiontreemodel.cpp') 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); -- cgit v1.2.3-55-g7522