summaryrefslogtreecommitdiffstats
path: root/src/xsession.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2018-06-15 14:05:25 +0200
committerSimon Rettberg2018-06-15 14:05:25 +0200
commitba3c5aa40274c11f9cefd4e9842be3488cad07b4 (patch)
tree2865703ae78ed397f24fa32fca642332ac7b3a49 /src/xsession.cpp
parentfileDownloader.* -> filedownloader.* (diff)
downloadvmchooser2-ba3c5aa40274c11f9cefd4e9842be3488cad07b4.tar.gz
vmchooser2-ba3c5aa40274c11f9cefd4e9842be3488cad07b4.tar.xz
vmchooser2-ba3c5aa40274c11f9cefd4e9842be3488cad07b4.zip
Fix indentation, cleanup, refactoring, deletions
* Remove unused methods for adding hostname and user to xml * Avoid copying/(de)serializing XML a thousand times * Fix Session::isValid() or rather make it a bit more usable (although it's unused currently) * baseDir is global, not per VSession, which doesn't make any sense without the legacy approach of recusively loading one xml file per entry
Diffstat (limited to 'src/xsession.cpp')
-rw-r--r--src/xsession.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xsession.cpp b/src/xsession.cpp
index 3583079..0c41136 100644
--- a/src/xsession.cpp
+++ b/src/xsession.cpp
@@ -76,7 +76,8 @@ bool XSession::isActive() const {
}
bool XSession::isValid() const {
- return true;
+ QFileInfo fi(this->exec_);
+ return !fi.isAbsolute() || (fi.isFile() && fi.isExecutable());
}
bool XSession::isLocked() const {