mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
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()),
|
||||
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…
Reference in a new issue