summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-10-11 15:23:15 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-14 09:30:43 +0200
commit44562a5f8733949582a8b42557b5bc9d6bc85420 (patch)
tree0c85c3548d41d5c3e921f1084e723e67df828b1b
parentf50cf1de802b42bf632ed85b2da5072786a56fcb (diff)
QtNfc QML Api starts with version 5.2
5.0 remains silent version Change-Id: Id1665120f8e694b21b59168db5f1168a7d3ce1d6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
-rw-r--r--examples/nfc/poster/poster.qml2
-rw-r--r--src/imports/nfc/plugin.cpp13
-rw-r--r--src/imports/nfc/qdeclarativendeffilter.cpp3
-rw-r--r--src/imports/nfc/qdeclarativendefmimerecord.cpp3
-rw-r--r--src/imports/nfc/qdeclarativendeftextrecord.cpp3
-rw-r--r--src/imports/nfc/qdeclarativendefurirecord.cpp3
-rw-r--r--src/imports/nfc/qdeclarativenearfield.cpp3
-rw-r--r--src/imports/nfc/qdeclarativenearfieldsocket.cpp3
-rw-r--r--src/nfc/doc/snippets/doc_src_qtnfc.qml2
-rw-r--r--src/nfc/doc/src/nfc-qml.qdoc2
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<QDeclarativeNearFieldSocket>(uri, major, minor, "NearFieldSocket");
@@ -75,6 +75,15 @@ public:
qmlRegisterType<QDeclarativeNdefTextRecord>(uri, major, minor, "NdefTextRecord");
qmlRegisterType<QDeclarativeNdefUriRecord>(uri, major, minor, "NdefUriRecord");
qmlRegisterType<QDeclarativeNdefMimeRecord>(uri, major, minor, "NdefMimeRecord");
+
+ // Register the 5.2 types
+ minor = 2;
+ qmlRegisterType<QDeclarativeNearField>(uri, major, minor, "NearField");
+ qmlRegisterType<QDeclarativeNdefFilter>(uri, major, minor, "NdefFilter");
+ qmlRegisterType<QQmlNdefRecord>(uri, major, minor, "NdefRecord");
+ qmlRegisterType<QDeclarativeNdefTextRecord>(uri, major, minor, "NdefTextRecord");
+ qmlRegisterType<QDeclarativeNdefUriRecord>(uri, major, minor, "NdefUriRecord");
+ qmlRegisterType<QDeclarativeNdefMimeRecord>(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