summaryrefslogtreecommitdiffstats
path: root/src/dialog.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2013-12-13 16:22:05 +0100
committerSimon Rettberg2013-12-13 16:22:05 +0100
commit75b304546e1bd98bdeb1745c5c849e2ccac11c0f (patch)
treef4c3f7ebd4c70cc73f66e6d989e99d98b19cdbd2 /src/dialog.cpp
parentfix problems with unreadable files (diff)
downloadvmchooser-75b304546e1bd98bdeb1745c5c849e2ccac11c0f.tar.gz
vmchooser-75b304546e1bd98bdeb1745c5c849e2ccac11c0f.tar.xz
vmchooser-75b304546e1bd98bdeb1745c5c849e2ccac11c0f.zip
Add support for a session start script that gets run right before the session is started
Diffstat (limited to 'src/dialog.cpp')
-rw-r--r--src/dialog.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp
index 342da87..21c5620 100644
--- a/src/dialog.cpp
+++ b/src/dialog.cpp
@@ -4,6 +4,7 @@
#include <QDebug>
#include <QRegExp>
#include <QFile>
+#include <QProcess>
#include "ui_dialog.h"
#include "save_restore_session.h"
@@ -46,6 +47,14 @@ void Dialog::on_treeView_activated(QModelIndex index) {
// no valid session has been selected, do nothing
return;
}
+
+ // Run session start script
+ if (QFile::exists(sessionStartScript)) {
+ QProcess scriptProcess;
+ scriptProcess.start(sessionStartScript, QIODevice::ReadOnly);
+ scriptProcess.waitForFinished();
+ scriptProcess.close();
+ }
if (s->run()) {
writePVSSettings();