summaryrefslogtreecommitdiffstats
path: root/src/nfc/qnearfieldtarget_emulator.cpp
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.cpp
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.cpp')
-rw-r--r--src/nfc/qnearfieldtarget_emulator.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/nfc/qnearfieldtarget_emulator.cpp b/src/nfc/qnearfieldtarget_emulator.cpp
index 996ddcef..0723b655 100644
--- a/src/nfc/qnearfieldtarget_emulator.cpp
+++ b/src/nfc/qnearfieldtarget_emulator.cpp
@@ -51,7 +51,6 @@ QT_BEGIN_NAMESPACE
static QMutex tagMutex;
static QMap<TagBase *, bool> tagMap;
-static TagActivator tagActivator;
TagType1::TagType1(TagBase *tag, QObject *parent)
: QNearFieldTagType1(parent), m_tag(tag)
@@ -248,11 +247,6 @@ void TagActivator::reset()
tagMap.clear();
}
-TagActivator *TagActivator::instance()
-{
- return &tagActivator;
-}
-
void TagActivator::timerEvent(QTimerEvent *e)
{
Q_UNUSED(e);