From ebc3f4b7aace7e830da208d4dcfa65a1d02f57cd Mon Sep 17 00:00:00 2001 From: Jan Darmochwal Date: Sat, 9 Oct 2010 12:59:36 +0200 Subject: Empty icon for VSessions, default to vmware icon * added empty icon "none" * default to vmware icon if no icon is set for a VSession --- src/vsession.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/vsession.cpp') diff --git a/src/vsession.cpp b/src/vsession.cpp index bcd13b0..bff0bc6 100644 --- a/src/vsession.cpp +++ b/src/vsession.cpp @@ -35,6 +35,17 @@ void VSession::addNodeWithAttribute(const QString& nodeName, node.setAttribute(attribute, value); } +QString VSession::icon() const { + QString icon(getAttribute("icon")); + if (icon.isEmpty()) { + icon = "vmware"; + } else if (icon.contains(".") && QDir::isRelativePath(icon)) { + // non-built-in icon with relative path + icon.prepend(baseDirPath_ + "/"); + } + return icon; + } + QString VSession::toXml() const { return this->doc_.toString(); } @@ -293,6 +304,7 @@ QList VSession::readXmlDir(const QString& path) { } bool VSession::operator<(const Session& other) const { + printf("VSession::operator< called\n"); int p0 = this->priority(); int p1 = other.priority(); -- cgit v1.2.3-55-g7522