From a96170231b65358e169b54d126891df884e65ea2 Mon Sep 17 00:00:00 2001 From: Nils Schwabe Date: Tue, 18 Mar 2014 17:00:16 +0100 Subject: - removed function to load icons locally - added function to load icon from a given url (xml parameter) --- src/vsession.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/vsession.cpp') diff --git a/src/vsession.cpp b/src/vsession.cpp index 9d3cadb..e5dfba2 100644 --- a/src/vsession.cpp +++ b/src/vsession.cpp @@ -39,17 +39,14 @@ void VSession::addNodeWithAttribute(const QString& nodeName, } QString VSession::icon() const { - QString icon(getAttribute("icon")); - if (icon.isEmpty()) { - if (imgtype() == VMWARE) icon = "vmware"; - else if (imgtype() == VBOX) icon = "virtualbox"; - else icon = "unknown"; - } else if (icon.contains(".") && QDir::isRelativePath(icon)) { - // non-built-in icon with relative path - icon.prepend(baseDirPath_ + "/"); - } - return icon; + QString icon(getAttribute("icon")); + if (icon.isEmpty()) { + if (imgtype() == VMWARE) icon = "vmware"; + else if (imgtype() == VBOX) icon = "virtualbox"; + else icon = "none"; } + return icon; +} QString VSession::toXml() const { QDomDocument doc; -- cgit v1.2.3-55-g7522