diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-11-17 23:29:29 +0100 |
---|---|---|
committer | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-11-17 23:29:29 +0100 |
commit | 1479108f99de58611c8d40fc40478fd4b388153f (patch) | |
tree | af60b6f2b1cf6f9d630b920cdfbf4e68efce99e0 /mainwindow.cpp | |
parent | 374422d95d0d67733246f3d003bdb3f2cedfee54 (diff) |
Stop timer when new task starts
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r-- | mainwindow.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 90b18f4d..2847acfc 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -589,6 +589,9 @@ void MainWindow::executePass(QString args, QString input) { executeWrapper(passExecutable, args, input); } +/** + * @brief MainWindow::executePassGitInit + */ void MainWindow::executePassGitInit() { qDebug() << "Pass git init called"; if (usePass) { @@ -631,6 +634,11 @@ void MainWindow::executeWrapper(QString app, QString args, QString input) { ui->textBrowser->clear(); ui->textBrowser->setTextColor(Qt::black); enableUiElements(false); + if (autoclearTimer != NULL) { + autoclearTimer->stop(); + delete autoclearTimer; + autoclearTimer = NULL; + } process->start('"' + app + "\" " + args); if (!input.isEmpty()) { process->write(input.toUtf8()); @@ -715,10 +723,6 @@ void MainWindow::readyRead(bool finished = false) { } if (useAutoclearPanel) { autoclearPass = output; - if (autoclearTimer != NULL) { - autoclearTimer->stop(); - - } autoclearTimer = new QTimer(this); autoclearTimer->setSingleShot(true); autoclearTimer->setInterval(1000*autoclearPanelSeconds); |