summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/images.qrc1
-rw-r--r--src/img/none.pngbin0 -> 187 bytes
-rw-r--r--src/vsession.cpp12
-rw-r--r--src/vsession.h8
4 files changed, 14 insertions, 7 deletions
diff --git a/src/images.qrc b/src/images.qrc
index b3d930f..5cb801c 100644
--- a/src/images.qrc
+++ b/src/images.qrc
@@ -1,5 +1,6 @@
<RCC>
<qresource prefix="/">
+ <file alias="none">img/none.png</file>
<file alias="bsd">img/bsd.xpm</file>
<file alias="gentoo">img/gentoo.xpm</file>
<file alias="gnome">img/gnome.xpm</file>
diff --git a/src/img/none.png b/src/img/none.png
new file mode 100644
index 0000000..e6fc91a
--- /dev/null
+++ b/src/img/none.png
Binary files differ
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<Session*> 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();
diff --git a/src/vsession.h b/src/vsession.h
index 0a1bf71..f9ab076 100644
--- a/src/vsession.h
+++ b/src/vsession.h
@@ -32,13 +32,7 @@ class VSession : public Session {
return getAttribute("description");
}
- QString icon() const {
- QString icon(getAttribute("icon"));
- if (icon.contains(".") && QDir::isRelativePath(icon)) {
- icon.prepend(baseDirPath_ + "/");
- }
- return icon;
- }
+ QString icon() const;
QString os() const {
return getAttribute("os");