summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2019-09-24 11:41:14 +0200
committerJonathan Bauer2019-09-24 11:41:14 +0200
commit095147948e691f31b445b004b574da3507c9c537 (patch)
tree3b5b374149ae175b4ff4442573a0a128307d6b5c
parentdialog.cpp: only close WM after hiding window (diff)
downloadvmchooser2-095147948e691f31b445b004b574da3507c9c537.tar.gz
vmchooser2-095147948e691f31b445b004b574da3507c9c537.tar.xz
vmchooser2-095147948e691f31b445b004b574da3507c9c537.zip
*session.cpp: give me those stars!
-rw-r--r--src/vsession.cpp5
-rw-r--r--src/xsession.cpp5
2 files changed, 2 insertions, 8 deletions
diff --git a/src/vsession.cpp b/src/vsession.cpp
index b86f314..79ef929 100644
--- a/src/vsession.cpp
+++ b/src/vsession.cpp
@@ -275,10 +275,7 @@ bool VSession::run() const {
QObject::connect(&_process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), QApplication::instance(), &QCoreApplication::quit);
_process.start(Config::get(Config::RUNSCRIPT), QStringList(tmpFileName));
_process.waitForStarted(10);
- if (_process.state() == QProcess::Starting || _process.state() == QProcess::Running)
- return true;
- else
- return false;
+ return _process.state() == QProcess::Starting || _process.state() == QProcess::Running;
}
int VSession::type() const {
diff --git a/src/xsession.cpp b/src/xsession.cpp
index d2e8cfe..05f4d38 100644
--- a/src/xsession.cpp
+++ b/src/xsession.cpp
@@ -159,10 +159,7 @@ QIcon XSession::icon() const {
bool XSession::run() const {
_process->start(this->exec_);
QObject::connect(_process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), QApplication::instance(), &QCoreApplication::quit);
- if (_process->state() == QProcess::Starting || _process->state() == QProcess::Running)
- return true;
- else
- return false;
+ return _process->state() == QProcess::Starting || _process->state() == QProcess::Running;
}
int XSession::type() const {