InstallationPage: properly exit the QThread (Fixes #2210)

openmw-38
scrawl 9 years ago
parent 1264651af7
commit 2f9b404094

@ -28,12 +28,6 @@ Wizard::InstallationPage::InstallationPage(QWidget *parent) :
connect(mUnshield, SIGNAL(finished()),
mThread, SLOT(quit()));
connect(mUnshield, SIGNAL(finished()),
mUnshield, SLOT(deleteLater()));
connect(mUnshield, SIGNAL(finished()),
mThread, SLOT(deleteLater()));;
connect(mUnshield, SIGNAL(finished()),
this, SLOT(installationFinished()), Qt::QueuedConnection);
@ -60,6 +54,7 @@ Wizard::InstallationPage::~InstallationPage()
{
if (mThread->isRunning()) {
mUnshield->stopWorker();
mThread->quit();
mThread->wait();
}

@ -45,9 +45,7 @@ Wizard::UnshieldWorker::~UnshieldWorker()
void Wizard::UnshieldWorker::stopWorker()
{
mMutex.lock();
mStopped = true;
mMutex.unlock();
}
void Wizard::UnshieldWorker::setInstallComponent(Wizard::Component component, bool install)

@ -104,7 +104,6 @@ namespace Wizard
QTextCodec *mIniCodec;
QWaitCondition mWait;
QMutex mMutex;
QReadWriteLock mLock;

Loading…
Cancel
Save