summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schulthess2017-04-24 14:05:41 +0200
committerChristoph Schulthess2017-04-24 14:05:41 +0200
commit926ba5a6734d9ab298d26ad07d7d53bc1e405dbd (patch)
tree3e0e14e7dac9c6b60c0803866df733c15d44c02b
parentmade button checkable (diff)
downloadpvs2-926ba5a6734d9ab298d26ad07d7d53bc1e405dbd.tar.gz
pvs2-926ba5a6734d9ab298d26ad07d7d53bc1e405dbd.tar.xz
pvs2-926ba5a6734d9ab298d26ad07d7d53bc1e405dbd.zip
toolbar waits for finish
-rw-r--r--src/client/toolbar/toolbar.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index 358fc8c..3dad2aa 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -499,19 +499,16 @@ void Toolbar::onBtnCustom()
{
const bool on = _ui->btnCustom->isChecked();
if (on) {
- _ui->btnCustom->setStyleSheet("background-color: red; color: white");
+ _ui->btnCustom->setStyleSheet("background-color: red; color: white; font: bold");
_ui->btnCustom->setText("Debug mode: ON");
- //change style
- //run startdebug.sh
+ this->runDbg.start("bin/sh", QStringList() << "/opt/openslx/remotedebug/startdebug_notxterm.sh");
} else {
- _ui->btnCustom->setStyleSheet("background-color: grey; color: black");
- _ui->btnCustom->setText("Debug mode: OFF");
- //change style back
- //kill startdebug.sh
+ this->runDbg.close();
}
- //this->runDbg.start("xterm", QStringList() << "-hold" << "-e" << "/opt/openslx/remotedebug/startdebug.sh");
- qDebug() << this->runDbg.state();
+ this->runDbg.waitForFinished();
+ _ui->btnCustom->setStyleSheet("background-color: grey; color: black; font: bold");
+ _ui->btnCustom->setText("Debug mode: OFF");
}
void Toolbar::onBtnLockDesktop()