mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 09:15:36 +00:00
Extra check for thread affinity.
This commit is contained in:
parent
76196d815d
commit
01eba7b721
1 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include "signalhandler.hpp"
|
#include "signalhandler.hpp"
|
||||||
|
|
||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
#include "../settings/usersettings.hpp"
|
#include "../settings/usersettings.hpp"
|
||||||
|
|
||||||
|
@ -23,6 +24,13 @@ void CSMTools::SignalHandler::updateUserSetting (const QString &name, const QStr
|
||||||
// should be in the operations thread via an event message queue
|
// should be in the operations thread via an event message queue
|
||||||
void CSMTools::SignalHandler::updateExtraCheck (bool extraCheck)
|
void CSMTools::SignalHandler::updateExtraCheck (bool extraCheck)
|
||||||
{
|
{
|
||||||
|
if (thread()!=QThread::currentThread())
|
||||||
|
{
|
||||||
|
QMetaObject::invokeMethod(this,"updateExtraCheck", Qt::QueuedConnection, Q_ARG(bool, extraCheck));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// extra safety
|
||||||
mExtraCheck = extraCheck;
|
mExtraCheck = extraCheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue