summaryrefslogtreecommitdiffstats
path: root/src/nfc
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-06-24 14:53:53 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-26 12:12:35 +0200
commitd4886e1a50fd546f8e059ef9c539932d6d58c96d (patch)
tree341a8cba6b0bd5cedd8f30a0e52742e6a8742eda /src/nfc
parentf2d6f3b6a6c5eebc36e0206c85896c1142f31229 (diff)
Enable Qt NFC in the CI system.
Don't require CONFIG+=nfc to build QtNfc lib. This prevents proper test execution and there is no API commitment until the API is offcially released anyway. Excludes three auto tests from -developer-build builds as they require Q_AUTOTEST_EXPORT. Fixes compile errors associated to namespace'd builds of Qt. Revert "Remove not needed symbol 'qHash(const QNdefRecord&)'" The symbol is needed during compilation by Windows. This reverts commit 39901af48f40f0672731a1f62dc003c4b37d1fec. Change-Id: I61c644bbfc4906729e6d2b9deb741989030c8624 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Diffstat (limited to 'src/nfc')
-rw-r--r--src/nfc/nfc.pro5
-rw-r--r--src/nfc/qndefrecord.cpp7
-rw-r--r--src/nfc/qndefrecord.h2
3 files changed, 9 insertions, 5 deletions
diff --git a/src/nfc/nfc.pro b/src/nfc/nfc.pro
index e58308de..f92120ce 100644
--- a/src/nfc/nfc.pro
+++ b/src/nfc/nfc.pro
@@ -6,11 +6,6 @@ load(qt_module)
QMAKE_DOCS = $$PWD/doc/qtnfc.qdocconf
OTHER_FILES += doc/src/*.qdoc # show .qdoc files in Qt Creator
-# All classes in this module are in the QtNfc namespace. Define the namespace which moc generated
-# code will be in.
-DEFINES += QT_BEGIN_MOC_NAMESPACE=\""namespace QtNfc {"\"
-DEFINES += QT_END_MOC_NAMESPACE=\""}"\"
-
PUBLIC_HEADERS += \
qnfcglobal.h \
qnearfieldmanager.h \
diff --git a/src/nfc/qndefrecord.cpp b/src/nfc/qndefrecord.cpp
index fea5dae4..ed950ea0 100644
--- a/src/nfc/qndefrecord.cpp
+++ b/src/nfc/qndefrecord.cpp
@@ -43,6 +43,8 @@
#include "qndefrecord.h"
#include "qndefrecord_p.h"
+#include <QtCore/QHash>
+
QT_BEGIN_NAMESPACE_NFC
/*!
@@ -147,6 +149,11 @@ QT_BEGIN_NAMESPACE_NFC
\sa Q_DECLARE_NDEF_RECORD()
*/
+uint qHash(const QNdefRecord &key)
+{
+ return qHash(key.type() + key.id() + key.payload());
+}
+
/*!
Constructs a new empty NDEF record.
*/
diff --git a/src/nfc/qndefrecord.h b/src/nfc/qndefrecord.h
index b3fad95e..a896f5f1 100644
--- a/src/nfc/qndefrecord.h
+++ b/src/nfc/qndefrecord.h
@@ -112,6 +112,8 @@ private:
} \
QT_END_NAMESPACE_NFC
+uint qHash(const QNdefRecord &key);
+
QT_END_NAMESPACE_NFC
#endif // QNDEFRECORD_H