diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2015-04-11 21:26:52 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2015-04-11 21:28:52 +0200 |
commit | 52dc34943fd9cfefcbc9236e0c134a68a8b59cf4 (patch) | |
tree | 1de5d69b1b0ea3174e6985ce598cbe7f3acc8843 | |
parent | 553d052ec77b37c3cda189d7d6c4f8d7c718ff65 (diff) |
Start process only after we finished disabling UI elements etc.
Otherwise we have a race condition, e.g. if the binary does not
exist the error signal might be triggered before we disabled
the UI element.
This would mean that we end up with UI elements being permanently
disabled.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
-rw-r--r-- | mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 44003833..5ba1ace9 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -257,10 +257,10 @@ void MainWindow::executeWrapper(QString app, QString args, QString input) { env << "GNUPGHOME=" + absHome.path(); process->setEnvironment(env); } - process->start('"' + app + "\" " + args); ui->textBrowser->clear(); ui->textBrowser->setTextColor(Qt::black); enableUiElements(false); + process->start('"' + app + "\" " + args); if (!input.isEmpty()) { process->write(input.toUtf8()); } |