summaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-10-11 14:48:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-14 09:30:17 +0200
commitf50cf1de802b42bf632ed85b2da5072786a56fcb (patch)
treeef9a86c26cc3a3e1d528a97fe7b93ec6db6fca75 /src/imports
parent87debe438c3655081f2b56bceea1ca7b045e28a5 (diff)
QtBluetooth QML API starts with 5.2.
5.0 remains as silent import though. Change-Id: I06c839a1224dc0d8b019bd99e354245f829ae750 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/bluetooth/plugin.cpp20
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp3
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothservice.cpp3
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothsocket.cpp3
4 files changed, 19 insertions, 10 deletions
diff --git a/src/imports/bluetooth/plugin.cpp b/src/imports/bluetooth/plugin.cpp
index 9d3b816f..2311d6b8 100644
--- a/src/imports/bluetooth/plugin.cpp
+++ b/src/imports/bluetooth/plugin.cpp
@@ -56,13 +56,25 @@ class QBluetoothQmlPlugin : public QQmlExtensionPlugin
public:
void registerTypes(const char *uri)
{
- Q_ASSERT(uri == QLatin1String("QtBluetooth"));
+ // @uri QtBluetooth
+
+ Q_ASSERT(uri == QStringLiteral("QtBluetooth"));
int major = 5;
int minor = 0;
- qmlRegisterType<QDeclarativeBluetoothDiscoveryModel>(uri, major, minor, "BluetoothDiscoveryModel");
- qmlRegisterType<QDeclarativeBluetoothService>(uri, major, minor, "BluetoothService");
- qmlRegisterType<QDeclarativeBluetoothSocket>(uri, major, minor, "BluetoothSocket");
+
+ // Register the 5.0 types
+ //5.0 is silent and not advertised
+ qmlRegisterType<QDeclarativeBluetoothDiscoveryModel >(uri, major, minor, "BluetoothDiscoveryModel");
+ qmlRegisterType<QDeclarativeBluetoothService >(uri, major, minor, "BluetoothService");
+ qmlRegisterType<QDeclarativeBluetoothSocket >(uri, major, minor, "BluetoothSocket");
+
+ // Register the 5.2 types
+ minor = 2;
+ qmlRegisterType<QDeclarativeBluetoothDiscoveryModel >(uri, major, minor, "BluetoothDiscoveryModel");
+ qmlRegisterType<QDeclarativeBluetoothService >(uri, major, minor, "BluetoothService");
+ qmlRegisterType<QDeclarativeBluetoothSocket >(uri, major, minor, "BluetoothSocket");
+
}
};
diff --git a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
index c2623ba0..8fc93e48 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
+++ b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
@@ -53,11 +53,10 @@
\qmltype BluetoothDiscoveryModel
\instantiates QDeclarativeBluetoothDiscoveryModel
\inqmlmodule QtBluetooth
+ \since 5.2
\brief Enables you to search for the Bluetooth devices and services in
range.
- The BluetoothDiscoveryModel type was introduced in \b{QtBluetooth 5.0}.
-
BluetoothDiscoveryModel provides a model of connectable services. The
contents of the model can be filtered by UUID allowing discovery to be
limited to a single service such as a game.
diff --git a/src/imports/bluetooth/qdeclarativebluetoothservice.cpp b/src/imports/bluetooth/qdeclarativebluetoothservice.cpp
index c4234933..be8f90c0 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothservice.cpp
+++ b/src/imports/bluetooth/qdeclarativebluetoothservice.cpp
@@ -54,13 +54,12 @@
\qmltype BluetoothService
\instantiates QDeclarativeBluetoothService
\inqmlmodule QtBluetooth
+ \since 5.2
\brief Provides information about a particular Bluetooth service.
\sa QBluetoothAddress
\sa QBluetoothSocket
- The BluetoothService type was introduced in \b{QtBluetooth 5.0}.
-
It allows a QML project to get information about a remote service, or describe a service
for a BluetoothSocket to connect to.
*/
diff --git a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp
index 449e578a..ea9d9e6e 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp
+++ b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp
@@ -55,14 +55,13 @@
\qmltype BluetoothSocket
\instantiates QDeclarativeBluetoothSocket
\inqmlmodule QtBluetooth
+ \since 5.2
\brief Enables you to connect and communicate with a Bluetooth service or
device.
\sa QBluetoothSocket
\sa QDataStream
- The BluetoothSocket type was introduced in \b{QtBluetooth 5.0}.
-
It allows a QML class connect to another Bluetooth device and exchange strings
with it. Data is sent and received using a QDataStream object allowing type
safe transfers of QStrings. QDataStream is a well known format and can be