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>
This commit is contained in:
parent
35f72acc47
commit
65bea2ce74
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -22,3 +22,8 @@ SOURCES += \
|
|||
targetemulator.cpp
|
||||
|
||||
DEFINES += SRCDIR=\\\"$$PWD/../nfcdata\\\"
|
||||
|
||||
TESTDATA += "$$PWD/../nfcdata/Qt Labs Website Tag Type1.nfc" \
|
||||
"$$PWD/../nfcdata/Qt Website Tag Type1.nfc"
|
||||
|
||||
builtin_testdata: DEFINES += BUILTIN_TESTDATA
|
||||
|
|
|
|||
Loading…
Reference in New Issue