summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-11-30 10:58:06 +0100
committerOliver Wolff <oliver.wolff@qt.io>2018-12-06 06:30:56 +0000
commit65bea2ce743d628773591793d35f2048fda5820a (patch)
tree4e99177a97f4df661e88972a606abc6138b18355 /src
parent35f72acc4795f5919ca9caaf50960e8416e804ef (diff)
Prepare tst_qnearfieldmanager for configurations with builtin_testdata
We have to add relevant test data to TESTDATA and use them from the created qrc file. Change-Id: I72ed86e09caf518f3f1b830ab4fec104a81313e6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/nfc/qnearfieldtarget_emulator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nfc/qnearfieldtarget_emulator.cpp b/src/nfc/qnearfieldtarget_emulator.cpp
index 030718cc..996ddcef 100644
--- a/src/nfc/qnearfieldtarget_emulator.cpp
+++ b/src/nfc/qnearfieldtarget_emulator.cpp
@@ -201,7 +201,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();