From 52dc34943fd9cfefcbc9236e0c134a68a8b59cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sat, 11 Apr 2015 21:26:52 +0200 Subject: Start process only after we finished disabling UI elements etc. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } -- cgit v1.2.3