diff options
author | Jonathan Bauer | 2019-09-24 11:41:14 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-09-24 11:41:14 +0200 |
commit | 095147948e691f31b445b004b574da3507c9c537 (patch) | |
tree | 3b5b374149ae175b4ff4442573a0a128307d6b5c | |
parent | dialog.cpp: only close WM after hiding window (diff) | |
download | vmchooser2-095147948e691f31b445b004b574da3507c9c537.tar.gz vmchooser2-095147948e691f31b445b004b574da3507c9c537.tar.xz vmchooser2-095147948e691f31b445b004b574da3507c9c537.zip |
*session.cpp: give me those stars!
-rw-r--r-- | src/vsession.cpp | 5 | ||||
-rw-r--r-- | src/xsession.cpp | 5 |
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 { |