From 6af470ff03fd463965b3eb9191c16a8839bce9f2 Mon Sep 17 00:00:00 2001 From: Siimacore Date: Tue, 13 Jun 2017 12:00:55 +0200 Subject: [PATCH] Stopping the thread in the wizard that prevented it to stop correctly --- apps/wizard/unshield/unshieldworker.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/wizard/unshield/unshieldworker.cpp b/apps/wizard/unshield/unshieldworker.cpp index d3ccfe03a..020de9f80 100644 --- a/apps/wizard/unshield/unshieldworker.cpp +++ b/apps/wizard/unshield/unshieldworker.cpp @@ -46,6 +46,7 @@ Wizard::UnshieldWorker::~UnshieldWorker() void Wizard::UnshieldWorker::stopWorker() { mStopped = true; + mWait.wakeOne(); } void Wizard::UnshieldWorker::setInstallComponent(Wizard::Component component, bool install) @@ -448,6 +449,10 @@ bool Wizard::UnshieldWorker::setupComponent(Component component) QReadLocker readLock(&mLock); emit requestFileDialog(component); mWait.wait(&mLock); + if(mStopped) { + qDebug() << "We are asked to stop !!"; + break; + } disk.setPath(getDiskPath()); } else { disk.setPath(getDiskPath());