summaryrefslogtreecommitdiffstats
path: root/src/nfc/qnearfieldtarget_emulator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nfc/qnearfieldtarget_emulator.cpp')
-rw-r--r--src/nfc/qnearfieldtarget_emulator.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nfc/qnearfieldtarget_emulator.cpp b/src/nfc/qnearfieldtarget_emulator.cpp
index 030718cc..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)
@@ -201,7 +200,11 @@ void TagActivator::initialize()
if (!tagMap.isEmpty())
return;
+#ifndef BUILTIN_TESTDATA
QDirIterator nfcTargets(QDir::currentPath(), QStringList(QStringLiteral("*.nfc")), QDir::Files);
+#else
+ QDirIterator nfcTargets(":/nfcdata", QStringList(QStringLiteral("*.nfc")), QDir::Files);
+#endif
while (nfcTargets.hasNext()) {
const QString targetFilename = nfcTargets.next();
@@ -244,11 +247,6 @@ void TagActivator::reset()
tagMap.clear();
}
-TagActivator *TagActivator::instance()
-{
- return &tagActivator;
-}
-
void TagActivator::timerEvent(QTimerEvent *e)
{
Q_UNUSED(e);