From 44562a5f8733949582a8b42557b5bc9d6bc85420 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Fri, 11 Oct 2013 15:23:15 +0200 Subject: QtNfc QML Api starts with version 5.2 5.0 remains silent version Change-Id: Id1665120f8e694b21b59168db5f1168a7d3ce1d6 Reviewed-by: Jerome Pasion Reviewed-by: Fabian Bumberger --- examples/nfc/poster/poster.qml | 2 +- src/imports/nfc/plugin.cpp | 13 +++++++++++-- src/imports/nfc/qdeclarativendeffilter.cpp | 3 +-- src/imports/nfc/qdeclarativendefmimerecord.cpp | 3 +-- src/imports/nfc/qdeclarativendeftextrecord.cpp | 3 +-- src/imports/nfc/qdeclarativendefurirecord.cpp | 3 ++- src/imports/nfc/qdeclarativenearfield.cpp | 3 +-- src/imports/nfc/qdeclarativenearfieldsocket.cpp | 3 +-- src/nfc/doc/snippets/doc_src_qtnfc.qml | 2 +- src/nfc/doc/src/nfc-qml.qdoc | 2 +- 10 files changed, 21 insertions(+), 16 deletions(-) diff --git a/examples/nfc/poster/poster.qml b/examples/nfc/poster/poster.qml index 7dcd0db5..c50c702b 100644 --- a/examples/nfc/poster/poster.qml +++ b/examples/nfc/poster/poster.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import QtNfc 5.0 +import QtNfc 5.2 Rectangle { id: root diff --git a/src/imports/nfc/plugin.cpp b/src/imports/nfc/plugin.cpp index 6be71c73..0a423495 100644 --- a/src/imports/nfc/plugin.cpp +++ b/src/imports/nfc/plugin.cpp @@ -55,16 +55,16 @@ QT_USE_NAMESPACE class QNfcQmlPlugin : public QQmlExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: void registerTypes(const char *uri) { - Q_ASSERT(uri == QLatin1String("QtNfc")); + Q_ASSERT(uri == QStringLiteral("QtNfc")); // @uri QtNfc + // Register the 5.0 types int major = 5; int minor = 0; //qmlRegisterType(uri, major, minor, "NearFieldSocket"); @@ -75,6 +75,15 @@ public: qmlRegisterType(uri, major, minor, "NdefTextRecord"); qmlRegisterType(uri, major, minor, "NdefUriRecord"); qmlRegisterType(uri, major, minor, "NdefMimeRecord"); + + // Register the 5.2 types + minor = 2; + qmlRegisterType(uri, major, minor, "NearField"); + qmlRegisterType(uri, major, minor, "NdefFilter"); + qmlRegisterType(uri, major, minor, "NdefRecord"); + qmlRegisterType(uri, major, minor, "NdefTextRecord"); + qmlRegisterType(uri, major, minor, "NdefUriRecord"); + qmlRegisterType(uri, major, minor, "NdefMimeRecord"); } }; diff --git a/src/imports/nfc/qdeclarativendeffilter.cpp b/src/imports/nfc/qdeclarativendeffilter.cpp index b1c2f74c..37a19c45 100644 --- a/src/imports/nfc/qdeclarativendeffilter.cpp +++ b/src/imports/nfc/qdeclarativendeffilter.cpp @@ -44,6 +44,7 @@ /*! \qmltype NdefFilter \instantiates QDeclarativeNdefFilter + \since 5.2 \brief The NdefFilter type represents a filtering constraint for NDEF message records. \ingroup nfc-qml @@ -52,8 +53,6 @@ \sa NearField \sa QNdefFilter - The NdefFilter type was introduced in \b {QtNfc 5.0}. - The NdefFilter type is used with the NearField type to read NDEF messages from NFC Forum tags that match a given structure. diff --git a/src/imports/nfc/qdeclarativendefmimerecord.cpp b/src/imports/nfc/qdeclarativendefmimerecord.cpp index 9468c01a..086cd8c2 100644 --- a/src/imports/nfc/qdeclarativendefmimerecord.cpp +++ b/src/imports/nfc/qdeclarativendefmimerecord.cpp @@ -43,6 +43,7 @@ /*! \qmltype NdefMimeRecord + \since 5.2 \brief The NdefMimeRecord type represents an NFC MIME record. \ingroup connectivity-nfc @@ -50,8 +51,6 @@ \inherits NdefRecord - The NdefMimeRecord type was introduced in \b {QtNfc 5.0}. - The NdefMimeRecord type can contain data with an associated MIME type. The data is accessible from the uri in the \l {NdefMimeRecord::uri}{uri} property. */ diff --git a/src/imports/nfc/qdeclarativendeftextrecord.cpp b/src/imports/nfc/qdeclarativendeftextrecord.cpp index d487c351..a163fc6b 100644 --- a/src/imports/nfc/qdeclarativendeftextrecord.cpp +++ b/src/imports/nfc/qdeclarativendeftextrecord.cpp @@ -45,6 +45,7 @@ /*! \qmltype NdefTextRecord + \since 5.2 \brief The NdefTextRecord type represents an NFC RTD-Text NDEF record. \ingroup nfc-qml @@ -54,8 +55,6 @@ \sa QNdefNfcTextRecord - The NdefTextRecord type was introduced in \b {QtNfc 5.0}. - The NdefTextRecord type contains a localized piece of text that can be display to the user. An NDEF message may contain many text records for different locales, it is up to the application to select the most appropriate one to display to the user. The localeMatch diff --git a/src/imports/nfc/qdeclarativendefurirecord.cpp b/src/imports/nfc/qdeclarativendefurirecord.cpp index 069472e5..85463cd7 100644 --- a/src/imports/nfc/qdeclarativendefurirecord.cpp +++ b/src/imports/nfc/qdeclarativendefurirecord.cpp @@ -45,6 +45,7 @@ /*! \qmltype NdefUriRecord + \since 5.2 \brief The NdefUriRecord type represents an NFC RTD-URI NDEF record. \ingroup nfc-qml @@ -54,7 +55,7 @@ \sa QNdefNfcUriRecord - The NdefUriRecord type was introduced in \b {QtNfc 5.0}. + The NdefUriRecord type can contain a uniform resource identifier. */ /*! diff --git a/src/imports/nfc/qdeclarativenearfield.cpp b/src/imports/nfc/qdeclarativenearfield.cpp index 9c871319..4f026775 100644 --- a/src/imports/nfc/qdeclarativenearfield.cpp +++ b/src/imports/nfc/qdeclarativenearfield.cpp @@ -52,6 +52,7 @@ /*! \qmltype NearField \instantiates QDeclarativeNearField + \since 5.2 \brief The NearField type provides access to NDEF messages stored on NFC Forum tags. \ingroup nfc-qml @@ -64,8 +65,6 @@ \sa QNdefMessage \sa QNdefRecord - The NearField type was introduced in \b {QtNfc 5.0}. - The NearField type can be used to read NDEF messages from NFC Forum tags. Set the \l filter and \l orderMatch properties to match the required NDEF messages. Once an NDEF message is successfully read from a tag the \l messageRecords property is updated. diff --git a/src/imports/nfc/qdeclarativenearfieldsocket.cpp b/src/imports/nfc/qdeclarativenearfieldsocket.cpp index b297ccdf..4e2019e9 100644 --- a/src/imports/nfc/qdeclarativenearfieldsocket.cpp +++ b/src/imports/nfc/qdeclarativenearfieldsocket.cpp @@ -46,13 +46,12 @@ /*! \qmltype NearFieldSocket \instantiates QDeclarativeNearFieldSocket + \since 5.2 \brief The NearFieldSocket type represents an LLCP socket. \ingroup nfc-qml \inqmlmodule QtNfc - The NearFieldSocket type was introduced in \b {QtNfc 5.0}. - The NearFieldSocket type can be used to create a peer-to-peer connection over NFC LLCP sockets. NearfieldSocket can be used for both client and server side sockets. diff --git a/src/nfc/doc/snippets/doc_src_qtnfc.qml b/src/nfc/doc/snippets/doc_src_qtnfc.qml index 867004f6..6c4d892d 100644 --- a/src/nfc/doc/snippets/doc_src_qtnfc.qml +++ b/src/nfc/doc/snippets/doc_src_qtnfc.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [import] -import QtNfc 5.0 +import QtNfc 5.2 //! [import] Item { } diff --git a/src/nfc/doc/src/nfc-qml.qdoc b/src/nfc/doc/src/nfc-qml.qdoc index 54902112..a8151bba 100644 --- a/src/nfc/doc/src/nfc-qml.qdoc +++ b/src/nfc/doc/src/nfc-qml.qdoc @@ -28,7 +28,7 @@ /*! -\qmlmodule QtNfc 5.0 +\qmlmodule QtNfc 5.2 \title Qt NFC QML Types \ingroup qmlmodules \brief Provides QML types for accessing NFC Forum Tags -- cgit v1.2.1