summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-06-11 18:33:44 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2020-06-11 18:33:44 +0200
commit26c7cd4f22f82cceff147dbe9a47fdbb2ff06cb3 (patch)
tree759d18a7deee7a845e56c52fa51f9deb55e5b872 /src
parent297cb8320f91377f8029fe9318534f34c83e7461 (diff)
Disconnect signal after extraction to avoid calling them on destroyed widgets.
Diffstat (limited to 'src')
-rw-r--r--src/installationmanager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp
index f57872fe..b1eaf1d3 100644
--- a/src/installationmanager.cpp
+++ b/src/installationmanager.cpp
@@ -163,7 +163,7 @@ bool InstallationManager::extractFiles(QString extractPath, QString title, bool
installationProgress->cancel();
installationProgress->hide();
installationProgress->deleteLater();
- });
+ });
installationProgress->setWindowFlags(
installationProgress->windowFlags() & (~Qt::WindowContextHelpButtonHint));
if (!title.isEmpty()) {
@@ -222,6 +222,11 @@ bool InstallationManager::extractFiles(QString extractPath, QString title, bool
// Wait for future to complete:
loop.exec();
+
+ // There might still be signal in the queue at this point but the progress dialog is
+ // going to be destroyed so we must disconnect the signals:
+ disconnect(this, &InstallationManager::progressUpdate, installationProgress, &QProgressDialog::setValue);
+ disconnect(this, &InstallationManager::progressFileChange, installationProgress, &QProgressDialog::setLabelText);
future = futureWatcher.future();
}