summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schulthess2017-05-02 09:56:50 +0200
committerChristoph Schulthess2017-05-02 09:56:50 +0200
commitad957e3c6d5050963e768a27ccd5da4f9092f89a (patch)
treebcb960ae73fd80f253b5e8ee2c99da0635b91866
parenttest (diff)
downloadpvs2-ad957e3c6d5050963e768a27ccd5da4f9092f89a.tar.gz
pvs2-ad957e3c6d5050963e768a27ccd5da4f9092f89a.tar.xz
pvs2-ad957e3c6d5050963e768a27ccd5da4f9092f89a.zip
test
-rw-r--r--src/client/toolbar/toolbar.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index 48e357b..af69ed1 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -110,6 +110,7 @@ void Toolbar::init()
connect(_ui->btnManager, SIGNAL(toggled(bool)), this, SLOT(onBtnManager()));
connect(_ui->btnAttention, SIGNAL(toggled(bool)), this, SLOT(onBtnAttention()));
connect(_ui->btnCustom, SIGNAL(toggled(bool)), this, SLOT(onBtnCustom()));
+ connect(this->runDbg, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(onDbgFinished()));
/* Setup menu */
initMenu();
@@ -499,18 +500,24 @@ void Toolbar::onBtnCustom()
{
const bool on = _ui->btnCustom->isChecked();
if (on) {
- this->runDbg.startDetached("/bin/sh", QStringList() << "-c" << "/opt/openslx/remotedebug/startdebug_noxterm.sh");
+ this->runDbg.start("/bin/sh", QStringList() << "-c" << "/opt/openslx/remotedebug/startdebug_noxterm.sh");
_ui->btnCustom->setStyleSheet("background-color: red; color: white; font: bold");
_ui->btnCustom->setText("Debug mode: ON");
} else {
this->runDbg.terminate();
- _ui->btnCustom->setStyleSheet("background-color: grey; color: black; font: bold");
- _ui->btnCustom->setText("Debug mode: OFF");
+
}
qDebug() << "state: " << this->runDbg.state();
qDebug() << "error: " << this->runDbg.errorString();
}
+void Toolbar::onDbgFinished()
+{
+ _ui->btnCustom->setChecked(false)
+ _ui->btnCustom->setStyleSheet("background-color: grey; color: black; font: bold");
+ _ui->btnCustom->setText("Debug mode: OFF");
+}
+
void Toolbar::onBtnLockDesktop()
{
if (this->lockDesktopP.state() == QProcess::NotRunning) {