From 75b304546e1bd98bdeb1745c5c849e2ccac11c0f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 13 Dec 2013 16:22:05 +0100 Subject: Add support for a session start script that gets run right before the session is started --- src/dialog.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/dialog.cpp') 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 #include #include +#include #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(); -- cgit v1.2.3-55-g7522