From 926ba5a6734d9ab298d26ad07d7d53bc1e405dbd Mon Sep 17 00:00:00 2001 From: Christoph Schulthess Date: Mon, 24 Apr 2017 14:05:41 +0200 Subject: toolbar waits for finish --- src/client/toolbar/toolbar.cpp | 15 ++++++--------- 1 file 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() -- cgit v1.2.3-55-g7522