From a769bc00611ecba57f9abd5832450e19127fb930 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Thu, 11 Jun 2020 20:12:39 +0200 Subject: Add comment explaining the usage of the QEventLoop. --- src/installationmanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/installationmanager.cpp') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 8500fec0..e21a1006 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -179,7 +179,9 @@ bool InstallationManager::extractFiles(QString extractPath, QString title, bool // extracted... installationProgress->setAutoReset(false); - // Connect signals emitted by the extraction callback to the progress dialog slots: + // Note: Using a loop with a progressUpdate() that only wake-up the loop. The event-loop + // will be used in a loop and not via exec() because connecting to QProgressDialog::setValue + // and using .exec() creates huge recursion that leads to stack-overflow. QEventLoop loop; connect(this, &InstallationManager::progressUpdate, &loop, &QEventLoop::wakeUp, Qt::QueuedConnection); -- cgit v1.3.1