diff options
author | Aaron McCarthy <mccarthy.aaron@gmail.com> | 2012-10-01 13:28:16 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-01 12:04:55 +0200 |
commit | f3d8f66116af4319650d8f3e7ca069275fdfa780 (patch) | |
tree | 2b7dc73c029adfdf0302409a2422b3df4d9e5c54 /tests/auto/qnearfieldtagtype1 | |
parent | 3f4a920f87842e1bbb20f72ce04d6da7a866ab1d (diff) |
Further porting of NFC module from mobility to Qt 5.
Includes the following changes:
* Conditionally enables building of the NFC module when qmake is
run with CONFIG+=nfc.
* Correctly build within the QtNfc namespace.
* Fix compile errors in examples, enable building of NFC examples.
* Fix compile errors in tests, enable building of NFC tests.
Mark the some NFC tests as insignificant as they currently crash.
Notably does not enable NFC documentation generation.
Task-number: QTBUG-22015
Change-Id: I9ff170c45848c8f0215e9427797922f840c2f015
Reviewed-by: Alex <ablasche@gmail.com>
Diffstat (limited to 'tests/auto/qnearfieldtagtype1')
-rw-r--r-- | tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro | 22 | ||||
-rw-r--r-- | tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp | 8 |
2 files changed, 29 insertions, 1 deletions
diff --git a/tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro b/tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro index 63a59333..1b66692f 100644 --- a/tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro +++ b/tests/auto/qnearfieldtagtype1/qnearfieldtagtype1.pro @@ -4,6 +4,28 @@ CONFIG += testcase QT = core nfc-private testlib +INCLUDEPATH += ../../../src/nfc +DEPENDPATH += ../../../src/nfc + +# This test includes source code from QtNfc library. Define the namespace which moc generated code +# should be in. +DEFINES += QT_BEGIN_MOC_NAMESPACE=\""namespace QtNfc {"\" +DEFINES += QT_END_MOC_NAMESPACE=\""}"\" + +HEADERS += \ + qnearfieldmanagervirtualbase_p.h \ + qnearfieldmanager_emulator_p.h \ + qnearfieldtarget_emulator_p.h \ + targetemulator_p.h + +SOURCES += \ + qnearfieldmanagervirtualbase.cpp \ + qnearfieldmanager_emulator.cpp \ + qnearfieldtarget_emulator.cpp \ + targetemulator.cpp DEFINES += SRCDIR=\\\"$$PWD/../nfcdata\\\" DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 + +# This test crashes +CONFIG += insignificant_test diff --git a/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp b/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp index 28839f19..36a8accf 100644 --- a/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp +++ b/tests/auto/qnearfieldtagtype1/tst_qnearfieldtagtype1.cpp @@ -484,6 +484,12 @@ void tst_QNearFieldTagType1::ndefMessages() } } -QTEST_MAIN(tst_QNearFieldTagType1); +QTEST_MAIN(tst_QNearFieldTagType1) + +// Unset the moc namespace which is not required for the following include. +#undef QT_BEGIN_MOC_NAMESPACE +#define QT_BEGIN_MOC_NAMESPACE +#undef QT_END_MOC_NAMESPACE +#define QT_END_MOC_NAMESPACE #include "tst_qnearfieldtagtype1.moc" |