diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-06-11 20:12:39 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-06-11 20:12:39 +0200 |
| commit | a769bc00611ecba57f9abd5832450e19127fb930 (patch) | |
| tree | 51e4e7d72065e211f5064eff40a4c46123dc544f | |
| parent | 93b1cea0d30e635cad7988dd65578bbbc1abecc7 (diff) | |
Add comment explaining the usage of the QEventLoop.
| -rw-r--r-- | src/installationmanager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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); |
