forked from teamnwah/openmw-tes3coop
InstallationPage: properly exit the QThread (Fixes #2210)
This commit is contained in:
parent
1264651af7
commit
2f9b404094
3 changed files with 1 additions and 9 deletions
|
@ -28,12 +28,6 @@ Wizard::InstallationPage::InstallationPage(QWidget *parent) :
|
||||||
connect(mUnshield, SIGNAL(finished()),
|
connect(mUnshield, SIGNAL(finished()),
|
||||||
mThread, SLOT(quit()));
|
mThread, SLOT(quit()));
|
||||||
|
|
||||||
connect(mUnshield, SIGNAL(finished()),
|
|
||||||
mUnshield, SLOT(deleteLater()));
|
|
||||||
|
|
||||||
connect(mUnshield, SIGNAL(finished()),
|
|
||||||
mThread, SLOT(deleteLater()));;
|
|
||||||
|
|
||||||
connect(mUnshield, SIGNAL(finished()),
|
connect(mUnshield, SIGNAL(finished()),
|
||||||
this, SLOT(installationFinished()), Qt::QueuedConnection);
|
this, SLOT(installationFinished()), Qt::QueuedConnection);
|
||||||
|
|
||||||
|
@ -60,6 +54,7 @@ Wizard::InstallationPage::~InstallationPage()
|
||||||
{
|
{
|
||||||
if (mThread->isRunning()) {
|
if (mThread->isRunning()) {
|
||||||
mUnshield->stopWorker();
|
mUnshield->stopWorker();
|
||||||
|
mThread->quit();
|
||||||
mThread->wait();
|
mThread->wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,7 @@ Wizard::UnshieldWorker::~UnshieldWorker()
|
||||||
|
|
||||||
void Wizard::UnshieldWorker::stopWorker()
|
void Wizard::UnshieldWorker::stopWorker()
|
||||||
{
|
{
|
||||||
mMutex.lock();
|
|
||||||
mStopped = true;
|
mStopped = true;
|
||||||
mMutex.unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wizard::UnshieldWorker::setInstallComponent(Wizard::Component component, bool install)
|
void Wizard::UnshieldWorker::setInstallComponent(Wizard::Component component, bool install)
|
||||||
|
|
|
@ -104,7 +104,6 @@ namespace Wizard
|
||||||
QTextCodec *mIniCodec;
|
QTextCodec *mIniCodec;
|
||||||
|
|
||||||
QWaitCondition mWait;
|
QWaitCondition mWait;
|
||||||
QMutex mMutex;
|
|
||||||
|
|
||||||
QReadWriteLock mLock;
|
QReadWriteLock mLock;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue