summaryrefslogtreecommitdiffstats
path: root/src/nfc/qnearfieldtarget_emulator_p.h
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-12-05 11:45:36 +0100
committerOliver Wolff <oliver.wolff@qt.io>2018-12-06 06:30:57 +0000
commitb3b387698e8f685e8bd4f4843a170da40e17249b (patch)
treea1027fa8a541804d3c54bd95756b270b2848ba52 /src/nfc/qnearfieldtarget_emulator_p.h
parent65bea2ce743d628773591793d35f2048fda5820a (diff)
qnearfieldmanager_emulator: Use Q_GLOBAL_STATIC for tag activator
Using a Q_GLOBAL_STATIC here fixes an issue in the auto tests for winrt. If we use a static object that is created before the QCoreapplication has been created, TagActivator's timer will complain, that it was not created inside a QThread. By postponing the creation until first usage we can avoid that problem. Change-Id: I9beca89930bfca2c71e0fce3d9c000dfcb71f431 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/nfc/qnearfieldtarget_emulator_p.h')
-rw-r--r--src/nfc/qnearfieldtarget_emulator_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nfc/qnearfieldtarget_emulator_p.h b/src/nfc/qnearfieldtarget_emulator_p.h
index 70a67be8..1b9f7bdb 100644
--- a/src/nfc/qnearfieldtarget_emulator_p.h
+++ b/src/nfc/qnearfieldtarget_emulator_p.h
@@ -122,6 +122,8 @@ private:
int timerId;
};
+Q_GLOBAL_STATIC(TagActivator, globalTagActivator);
+
QT_END_NAMESPACE
#endif // QNEARFIELDTARGET_EMULATOR_P_H