summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-06-29 16:12:06 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-06-29 16:12:06 +0200
commitf870501469c9165f16c792e1167a8a897a3b0d5a (patch)
treea9f6c4e36ab0d244b3f9e58a69f03ae7391c9aec
parent3e5a32e9a40916e0bae882ba22b9d2b1131d6326 (diff)
parent80ceeeed3c15d307784be66b5dafdc9cfc12b8cb (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: .qmake.conf src/nfc/doc/src/nfc-index.qdoc Change-Id: Ie12d3023ff934f6579ae93617c95fc654e85a7f0
-rw-r--r--dist/changes-5.5.0105
-rw-r--r--src/bluetooth/android/serveracceptancethread.cpp2
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent.h2
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp1
-rw-r--r--src/bluetooth/qbluetoothlocaldevice.h12
-rw-r--r--src/bluetooth/qbluetoothserver.h2
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent.h4
-rw-r--r--src/bluetooth/qbluetoothsocket.h5
-rw-r--r--src/bluetooth/qbluetoothtransferreply.h4
-rw-r--r--src/bluetooth/qlowenergycontroller.h6
-rw-r--r--src/bluetooth/qlowenergyservice.h7
-rw-r--r--src/imports/bluetooth/plugins.qmltypes268
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel_p.h4
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothservice_p.h3
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothsocket_p.h5
-rw-r--r--src/imports/nfc/plugins.qmltypes3
-rw-r--r--src/imports/nfc/qdeclarativendeftextrecord_p.h3
-rw-r--r--src/nfc/qllcpsocket_p.h2
-rw-r--r--src/nfc/qnearfieldmanager.h1
-rw-r--r--src/nfc/qnearfieldsharemanager.h4
-rw-r--r--src/nfc/qnearfieldtagtype1_p.h1
-rw-r--r--src/nfc/qnearfieldtarget.h4
-rw-r--r--src/nfc/qqmlndefrecord.h2
-rw-r--r--tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp3
-rw-r--r--tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp1
-rw-r--r--tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp2
-rw-r--r--tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp2
27 files changed, 412 insertions, 46 deletions
diff --git a/dist/changes-5.5.0 b/dist/changes-5.5.0
new file mode 100644
index 00000000..9ddd8e36
--- /dev/null
+++ b/dist/changes-5.5.0
@@ -0,0 +1,105 @@
+Qt 5.5 introduces many new features and improvements as well as bugfixes
+over the 5.4.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+ http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.5 series is binary compatible with the 5.4.x series.
+Applications compiled for 5.4 will continue to run with 5.5.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtBluetooth
+-----------
+
+ - Ported Classic Bluetooth components and classes to OS X. A similar port
+ to iOS is not possible due to missing platform support.
+ - Ported Low Energy components to iOS, OS X and Android
+ - Improved QBluetoothTransferManager documentation
+ - Improved QLowEnergyService documentation
+ - Added missing detailsChanged() signal emissions in BluetoothService QML type
+
+ - QBluetoothDeviceDiscoveryAgent:
+ * Extended QBluetoothDeviceDiscoveryAgent documentation around Bluetooth
+ Low Energy device discovery
+ * Added QBluetoothDeviceDiscoveryAgent::UnsupportedPlatformError flag
+
+ - QBluetoothDeviceInfo:
+ * Added QBluetoothDeviceInfo(QBluetoothUuid,QString,quint32) ctor
+ * Fixed incorrect initialization of QBluetoothDeviceInfo::coreConfiguration()
+ in the class ctor. By default, it is set to
+ QBluetoothDeviceInfo::UnknownCoreConfiguration.
+ * Added Q_DECLARE_OPERATORS_FOR_FLAGS macro for CoreConfiguration
+ and ServiceClasses enums
+
+ - QBluetoothHostInfo:
+ * Added Q_DECLARE_METATYPE
+ * Added comparison operators
+
+ - QLowEnergyController:
+ * QLowEnergyController::ConnectionError enum value added.
+ * Added QLowEnergyController(QBluetoothDeviceInfo) ctor. This ctor is the
+ preferred ctor.
+
+ - QLowEnergyService:
+ * Add capability to initiate reading of characteristics and descriptors. Previously
+ the variable was only updated during the initial service discovery or when
+ a value notification was received.
+ * Added guard to prevent writing of service before service discovery
+ was complete.
+ * Force write of characteristics and descriptors even when they are marked as
+ read-only. This permits workarounds where the device's meta data reports
+ wrong values.
+ * Improved class documentation
+ * Added remoteName() member function
+
+ - QBluetoothUuid:
+ * Extended QBluetoothUuid::ServiceClassUuid enum to incorporate latest
+ BLuetooth Low Energy service type standards/definitions
+ * Extended QBluetoothUuid::CharacteristicType to incorporate latest
+ Bluetooth Low Energy characteritistic standards/definitions
+ * Extended QBluetoothUuid::DescriptorType to incorporate latest
+ Bluetooth Low Energy descriptor standards/definitions
+
+ - Examples:
+ * Fixed several lowenergyscanner example bugs
+
+QtNfc
+-----
+
+ - Ported module to Linux using Neard v0.14+
+ - Improved QNdefNfcSmartPosterRecord documentation
+ - Extended QML NearField type with polling property, tagFound() and tagRemoved signals
+ - Added QNdefNfcSmartPosterRecord::operator=() operator
+
+ - Examples:
+ * Fixed several bugs in corkboard example
+ * Fixed hanging ndefeditor example when receiving invalid NFC requests
+ * Fixed loading of images in poster example
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Android
+-------
+
+ - Added support for Bluetooth Low Energy in Qt Bluetooth
+ - Avoided duplicated notifications for same device during Bluetooth device
+ discovery
+
+Linux/Bluez
+-----------
+
+- Improved Bluez version detection. The previous check didn't handle these
+ "no Bluez available" case.
diff --git a/src/bluetooth/android/serveracceptancethread.cpp b/src/bluetooth/android/serveracceptancethread.cpp
index 3a30cacb..c22256c9 100644
--- a/src/bluetooth/android/serveracceptancethread.cpp
+++ b/src/bluetooth/android/serveracceptancethread.cpp
@@ -38,8 +38,6 @@
Q_DECLARE_LOGGING_CATEGORY(QT_BT_ANDROID)
-Q_DECLARE_METATYPE(QBluetoothServer::Error)
-
ServerAcceptanceThread::ServerAcceptanceThread(QObject *parent) :
QObject(parent), maxPendingConnections(1)
{
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent.h b/src/bluetooth/qbluetoothdevicediscoveryagent.h
index 656604ac..1641f16f 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent.h
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent.h
@@ -61,11 +61,13 @@ public:
UnsupportedPlatformError,
UnknownError = 100 // New errors must be added before Unknown error
};
+ Q_ENUM(Error)
enum InquiryType {
GeneralUnlimitedInquiry,
LimitedInquiry
};
+ Q_ENUM(InquiryType)
QBluetoothDeviceDiscoveryAgent(QObject *parent = 0);
explicit QBluetoothDeviceDiscoveryAgent(const QBluetoothAddress &deviceAdapter,
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp
index a6aaaf03..f977c471 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_android.cpp
@@ -201,6 +201,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::processSdpDiscoveryFinished()
// start LE scan if supported
if (QtAndroidPrivate::androidSdkVersion() < 18) {
qCDebug(QT_BT_ANDROID) << "Skipping Bluetooth Low Energy device scan";
+ m_active = NoScanActive;
emit q->finished();
} else {
startLowEnergyScan();
diff --git a/src/bluetooth/qbluetoothlocaldevice.h b/src/bluetooth/qbluetoothlocaldevice.h
index bcb39bda..4587bbf0 100644
--- a/src/bluetooth/qbluetoothlocaldevice.h
+++ b/src/bluetooth/qbluetoothlocaldevice.h
@@ -49,15 +49,14 @@ class QBluetoothLocalDevicePrivate;
class Q_BLUETOOTH_EXPORT QBluetoothLocalDevice : public QObject
{
Q_OBJECT
- Q_ENUMS(Pairing)
- Q_ENUMS(HostMode)
- Q_ENUMS(Error)
+
public:
enum Pairing {
Unpaired,
Paired,
AuthorizedPaired
};
+ Q_ENUM(Pairing)
enum HostMode {
HostPoweredOff,
@@ -65,12 +64,15 @@ public:
HostDiscoverable,
HostDiscoverableLimitedInquiry
};
+ Q_ENUM(HostMode)
enum Error {
NoError,
PairingError,
UnknownError = 100
};
+ Q_ENUM(Error)
+
QBluetoothLocalDevice(QObject *parent = 0);
explicit QBluetoothLocalDevice(const QBluetoothAddress &address, QObject *parent = 0);
virtual ~QBluetoothLocalDevice();
@@ -111,8 +113,4 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QBluetoothLocalDevice::HostMode)
-Q_DECLARE_METATYPE(QBluetoothLocalDevice::Pairing)
-Q_DECLARE_METATYPE(QBluetoothLocalDevice::Error)
-
#endif // QBLUETOOTHLOCALDEVICE_H
diff --git a/src/bluetooth/qbluetoothserver.h b/src/bluetooth/qbluetoothserver.h
index 951b47f4..752780a5 100644
--- a/src/bluetooth/qbluetoothserver.h
+++ b/src/bluetooth/qbluetoothserver.h
@@ -62,6 +62,8 @@ public:
ServiceAlreadyRegisteredError,
UnsupportedProtocolError
};
+ Q_ENUM(Error)
+
QBluetoothServer(QBluetoothServiceInfo::Protocol serverType, QObject *parent = 0);
~QBluetoothServer();
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent.h b/src/bluetooth/qbluetoothservicediscoveryagent.h
index d15a1d8d..cf756504 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent.h
+++ b/src/bluetooth/qbluetoothservicediscoveryagent.h
@@ -66,11 +66,13 @@ public:
//New Errors must be added after Unknown Error the space before UnknownError is reserved
//for future device discovery errors
};
+ Q_ENUM(Error)
enum DiscoveryMode {
MinimalDiscovery,
FullDiscovery
};
+ Q_ENUM(DiscoveryMode)
QBluetoothServiceDiscoveryAgent(QObject *parent = 0);
explicit QBluetoothServiceDiscoveryAgent(const QBluetoothAddress &deviceAdapter, QObject *parent = 0);
@@ -124,6 +126,4 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QBluetoothServiceDiscoveryAgent::Error)
-
#endif
diff --git a/src/bluetooth/qbluetoothsocket.h b/src/bluetooth/qbluetoothsocket.h
index b073ada3..0ec6a593 100644
--- a/src/bluetooth/qbluetoothsocket.h
+++ b/src/bluetooth/qbluetoothsocket.h
@@ -67,6 +67,7 @@ public:
ClosingState = QAbstractSocket::ClosingState,
ListeningState = QAbstractSocket::ListeningState
};
+ Q_ENUM(SocketState)
enum SocketError {
NoSocketError = -2,
@@ -78,6 +79,7 @@ public:
OperationError = QAbstractSocket::OperationError //19
//New enums (independent of QAbstractSocket) should be added from 100 onwards
};
+ Q_ENUM(SocketError)
explicit QBluetoothSocket(QBluetoothServiceInfo::Protocol socketType, QObject *parent = 0); // create socket of type socketType
QBluetoothSocket(QObject *parent = 0); // create a blank socket
@@ -161,7 +163,4 @@ Q_BLUETOOTH_EXPORT QDebug operator<<(QDebug, QBluetoothSocket::SocketState);
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QBluetoothSocket::SocketError)
-Q_DECLARE_METATYPE(QBluetoothSocket::SocketState)
-
#endif
diff --git a/src/bluetooth/qbluetoothtransferreply.h b/src/bluetooth/qbluetoothtransferreply.h
index 081b7002..428e3cd0 100644
--- a/src/bluetooth/qbluetoothtransferreply.h
+++ b/src/bluetooth/qbluetoothtransferreply.h
@@ -58,7 +58,7 @@ public:
ResourceBusyError,
SessionError
};
-
+ Q_ENUM(TransferError)
~QBluetoothTransferReply();
@@ -96,6 +96,4 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QBluetoothTransferReply::TransferError)
-
#endif // QBLUETOOTHTRANSFERREPLY_H
diff --git a/src/bluetooth/qlowenergycontroller.h b/src/bluetooth/qlowenergycontroller.h
index c5a4acd3..fd230238 100644
--- a/src/bluetooth/qlowenergycontroller.h
+++ b/src/bluetooth/qlowenergycontroller.h
@@ -55,6 +55,7 @@ public:
InvalidBluetoothAdapterError,
ConnectionError
};
+ Q_ENUM(Error)
enum ControllerState {
UnconnectedState = 0,
@@ -64,11 +65,13 @@ public:
DiscoveredState,
ClosingState
};
+ Q_ENUM(ControllerState)
enum RemoteAddressType {
PublicAddress = 0,
RandomAddress
};
+ Q_ENUM(RemoteAddressType)
explicit QLowEnergyController(const QBluetoothAddress &remoteDevice,
QObject *parent = 0); // TODO Qt 6 remove ctor
@@ -116,7 +119,4 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QLowEnergyController::ControllerState)
-Q_DECLARE_METATYPE(QLowEnergyController::Error)
-
#endif // QLOWENERGYCONTROLLER_H
diff --git a/src/bluetooth/qlowenergyservice.h b/src/bluetooth/qlowenergyservice.h
index 8d7f8a21..dc03419d 100644
--- a/src/bluetooth/qlowenergyservice.h
+++ b/src/bluetooth/qlowenergyservice.h
@@ -50,6 +50,7 @@ public:
PrimaryService = 0x0001,
IncludedService = 0x0002
};
+ Q_ENUM(ServiceType)
Q_DECLARE_FLAGS(ServiceTypes, ServiceType)
enum ServiceError {
@@ -61,6 +62,7 @@ public:
CharacteristicReadError,
DescriptorReadError
};
+ Q_ENUM(ServiceError)
enum ServiceState {
InvalidService = 0,
@@ -69,11 +71,13 @@ public:
DiscoveringServices,// discoverDetails() called and running
ServiceDiscovered // all details have been synchronized
};
+ Q_ENUM(ServiceState)
enum WriteMode {
WriteWithResponse = 0,
WriteWithoutResponse
};
+ Q_ENUM(WriteMode)
~QLowEnergyService();
@@ -130,7 +134,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QLowEnergyService::ServiceTypes)
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QLowEnergyService::ServiceState)
-Q_DECLARE_METATYPE(QLowEnergyService::ServiceError)
-
#endif // QLOWENERGYSERVICE_H
diff --git a/src/imports/bluetooth/plugins.qmltypes b/src/imports/bluetooth/plugins.qmltypes
index e9b93e54..edfc9abc 100644
--- a/src/imports/bluetooth/plugins.qmltypes
+++ b/src/imports/bluetooth/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,272 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtBluetooth 5.5'
Module {
+ dependencies: []
+ Component {
+ name: "QAbstractItemModel"
+ prototype: "QObject"
+ Enum {
+ name: "LayoutChangeHint"
+ values: {
+ "NoLayoutChangeHint": 0,
+ "VerticalSortHint": 1,
+ "HorizontalSortHint": 2
+ }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ Parameter { name: "roles"; type: "QVector<int>" }
+ }
+ Signal {
+ name: "dataChanged"
+ Parameter { name: "topLeft"; type: "QModelIndex" }
+ Parameter { name: "bottomRight"; type: "QModelIndex" }
+ }
+ Signal {
+ name: "headerDataChanged"
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutChanged" }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
+ }
+ Signal {
+ name: "layoutAboutToBeChanged"
+ Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
+ }
+ Signal { name: "layoutAboutToBeChanged" }
+ Signal {
+ name: "rowsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "rowsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsInserted"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal {
+ name: "columnsRemoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "first"; type: "int" }
+ Parameter { name: "last"; type: "int" }
+ }
+ Signal { name: "modelAboutToBeReset" }
+ Signal { name: "modelReset" }
+ Signal {
+ name: "rowsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationRow"; type: "int" }
+ }
+ Signal {
+ name: "rowsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "row"; type: "int" }
+ }
+ Signal {
+ name: "columnsAboutToBeMoved"
+ Parameter { name: "sourceParent"; type: "QModelIndex" }
+ Parameter { name: "sourceStart"; type: "int" }
+ Parameter { name: "sourceEnd"; type: "int" }
+ Parameter { name: "destinationParent"; type: "QModelIndex" }
+ Parameter { name: "destinationColumn"; type: "int" }
+ }
+ Signal {
+ name: "columnsMoved"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ Parameter { name: "start"; type: "int" }
+ Parameter { name: "end"; type: "int" }
+ Parameter { name: "destination"; type: "QModelIndex" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method { name: "submit"; type: "bool" }
+ Method { name: "revert" }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "hasIndex"
+ type: "bool"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "index"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ }
+ Method {
+ name: "parent"
+ type: "QModelIndex"
+ Parameter { name: "child"; type: "QModelIndex" }
+ }
+ Method {
+ name: "sibling"
+ type: "QModelIndex"
+ Parameter { name: "row"; type: "int" }
+ Parameter { name: "column"; type: "int" }
+ Parameter { name: "idx"; type: "QModelIndex" }
+ }
+ Method {
+ name: "rowCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "rowCount"; type: "int" }
+ Method {
+ name: "columnCount"
+ type: "int"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "columnCount"; type: "int" }
+ Method {
+ name: "hasChildren"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method { name: "hasChildren"; type: "bool" }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "data"
+ type: "QVariant"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "setData"
+ type: "bool"
+ Parameter { name: "index"; type: "QModelIndex" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ Parameter { name: "role"; type: "int" }
+ }
+ Method {
+ name: "headerData"
+ type: "QVariant"
+ Parameter { name: "section"; type: "int" }
+ Parameter { name: "orientation"; type: "Qt::Orientation" }
+ }
+ Method {
+ name: "fetchMore"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "canFetchMore"
+ type: "bool"
+ Parameter { name: "parent"; type: "QModelIndex" }
+ }
+ Method {
+ name: "flags"
+ type: "Qt::ItemFlags"
+ Parameter { name: "index"; type: "QModelIndex" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ Parameter { name: "flags"; type: "Qt::MatchFlags" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ Parameter { name: "hits"; type: "int" }
+ }
+ Method {
+ name: "match"
+ type: "QModelIndexList"
+ Parameter { name: "start"; type: "QModelIndex" }
+ Parameter { name: "role"; type: "int" }
+ Parameter { name: "value"; type: "QVariant" }
+ }
+ }
+ Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" }
Component {
name: "QDeclarativeBluetoothDiscoveryModel"
prototype: "QAbstractListModel"
diff --git a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel_p.h b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel_p.h
index 82a2129b..a06d49c4 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel_p.h
+++ b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel_p.h
@@ -64,8 +64,6 @@ class QDeclarativeBluetoothDiscoveryModelPrivate;
class QDeclarativeBluetoothDiscoveryModel : public QAbstractListModel, public QQmlParserStatus
{
Q_OBJECT
- Q_ENUMS(DiscoveryMode)
- Q_ENUMS(Error)
Q_PROPERTY(Error error READ error NOTIFY errorChanged)
Q_PROPERTY(DiscoveryMode discoveryMode READ discoveryMode WRITE setDiscoveryMode NOTIFY discoveryModeChanged)
Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged)
@@ -88,6 +86,7 @@ public:
FullServiceDiscovery,
DeviceDiscovery
};
+ Q_ENUM(DiscoveryMode)
enum Error
{
@@ -97,6 +96,7 @@ public:
UnknownError,
InvalidBluetoothAdapterError
};
+ Q_ENUM(Error)
Error error() const;
diff --git a/src/imports/bluetooth/qdeclarativebluetoothservice_p.h b/src/imports/bluetooth/qdeclarativebluetoothservice_p.h
index 9cb62de9..17611580 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothservice_p.h
+++ b/src/imports/bluetooth/qdeclarativebluetoothservice_p.h
@@ -66,9 +66,7 @@ class QDeclarativeBluetoothService : public QObject, public QQmlParserStatus
Q_PROPERTY(QString serviceUuid READ serviceUuid WRITE setServiceUuid NOTIFY detailsChanged)
Q_PROPERTY(Protocol serviceProtocol READ serviceProtocol WRITE setServiceProtocol NOTIFY detailsChanged)
Q_PROPERTY(bool registered READ isRegistered WRITE setRegistered NOTIFY registeredChanged)
-
Q_INTERFACES(QQmlParserStatus)
- Q_ENUMS(Protocol)
public:
/// TODO: Merge/Replace with QBluetoothServiceInfo::Protocol in Qt 6
@@ -77,6 +75,7 @@ public:
L2CapProtocol = QBluetoothServiceInfo::L2capProtocol,
UnknownProtocol = QBluetoothServiceInfo::UnknownProtocol
};
+ Q_ENUM(Protocol)
explicit QDeclarativeBluetoothService(QObject *parent = 0);
explicit QDeclarativeBluetoothService(const QBluetoothServiceInfo &service,
diff --git a/src/imports/bluetooth/qdeclarativebluetoothsocket_p.h b/src/imports/bluetooth/qdeclarativebluetoothsocket_p.h
index 4ad69f9e..a626c7cf 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothsocket_p.h
+++ b/src/imports/bluetooth/qdeclarativebluetoothsocket_p.h
@@ -67,11 +67,8 @@ class QDeclarativeBluetoothSocket : public QObject, public QQmlParserStatus
Q_PROPERTY(SocketState socketState READ state NOTIFY stateChanged)
Q_PROPERTY(QString stringData READ stringData WRITE sendStringData NOTIFY dataAvailable)
Q_INTERFACES(QQmlParserStatus)
- Q_ENUMS(Error)
- Q_ENUMS(SocketState)
public:
-
enum Error {
NoError = QBluetoothSocket::NoSocketError,
UnknownSocketError = QBluetoothSocket::UnknownSocketError,
@@ -80,6 +77,7 @@ public:
NetworkError = QBluetoothSocket::NetworkError,
UnsupportedProtocolError = QBluetoothSocket::UnsupportedProtocolError
};
+ Q_ENUM(Error)
enum SocketState {
Unconnected = QBluetoothSocket::UnconnectedState,
@@ -91,6 +89,7 @@ public:
Listening = QBluetoothSocket::ListeningState,
NoServiceSet = 100 //Leave gap for future enums and to avoid collision with QBluetoothSocket enums
};
+ Q_ENUM(SocketState)
explicit QDeclarativeBluetoothSocket(QObject *parent = 0);
explicit QDeclarativeBluetoothSocket(QDeclarativeBluetoothService *service,
diff --git a/src/imports/nfc/plugins.qmltypes b/src/imports/nfc/plugins.qmltypes
index 6abc211d..555b797f 100644
--- a/src/imports/nfc/plugins.qmltypes
+++ b/src/imports/nfc/plugins.qmltypes
@@ -1,4 +1,4 @@
-import QtQuick.tooling 1.1
+import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
@@ -7,6 +7,7 @@ import QtQuick.tooling 1.1
// 'qmlplugindump -nonrelocatable QtNfc 5.5'
Module {
+ dependencies: []
Component {
name: "QDeclarativeNdefFilter"
prototype: "QObject"
diff --git a/src/imports/nfc/qdeclarativendeftextrecord_p.h b/src/imports/nfc/qdeclarativendeftextrecord_p.h
index 8a65a951..4699f5a2 100644
--- a/src/imports/nfc/qdeclarativendeftextrecord_p.h
+++ b/src/imports/nfc/qdeclarativendeftextrecord_p.h
@@ -59,8 +59,6 @@ class QDeclarativeNdefTextRecord : public QQmlNdefRecord
Q_PROPERTY(QString locale READ locale WRITE setLocale NOTIFY localeChanged)
Q_PROPERTY(LocaleMatch localeMatch READ localeMatch NOTIFY localeMatchChanged)
- Q_ENUMS(LocaleMatch)
-
public:
enum LocaleMatch {
LocaleMatchedNone,
@@ -68,6 +66,7 @@ public:
LocaleMatchedLanguage,
LocaleMatchedLanguageAndCountry
};
+ Q_ENUM(LocaleMatch)
explicit QDeclarativeNdefTextRecord(QObject *parent = 0);
Q_INVOKABLE QDeclarativeNdefTextRecord(const QNdefRecord &record, QObject *parent = 0);
diff --git a/src/nfc/qllcpsocket_p.h b/src/nfc/qllcpsocket_p.h
index db49b4c0..b797ef5b 100644
--- a/src/nfc/qllcpsocket_p.h
+++ b/src/nfc/qllcpsocket_p.h
@@ -71,6 +71,7 @@ public:
BoundState = QAbstractSocket::BoundState,
ListeningState = QAbstractSocket::ListeningState
};
+ Q_ENUM(SocketState)
enum SocketError {
UnknownSocketError = QAbstractSocket::UnknownSocketError,
@@ -78,6 +79,7 @@ public:
SocketAccessError = QAbstractSocket::SocketAccessError,
SocketResourceError = QAbstractSocket::SocketResourceError
};
+ Q_ENUM(SocketError)
explicit QLlcpSocket(QObject *parent = 0);
~QLlcpSocket();
diff --git a/src/nfc/qnearfieldmanager.h b/src/nfc/qnearfieldmanager.h
index 8dab134f..416c5e91 100644
--- a/src/nfc/qnearfieldmanager.h
+++ b/src/nfc/qnearfieldmanager.h
@@ -56,6 +56,7 @@ public:
NdefWriteTargetAccess = 0x02,
TagTypeSpecificTargetAccess = 0x04
};
+ Q_ENUM(TargetAccessMode)
Q_DECLARE_FLAGS(TargetAccessModes, TargetAccessMode)
explicit QNearFieldManager(QObject *parent = 0);
diff --git a/src/nfc/qnearfieldsharemanager.h b/src/nfc/qnearfieldsharemanager.h
index 330cc621..264e82b6 100644
--- a/src/nfc/qnearfieldsharemanager.h
+++ b/src/nfc/qnearfieldsharemanager.h
@@ -45,8 +45,6 @@ class QNearFieldShareTarget;
class Q_NFC_EXPORT QNearFieldShareManager : public QObject
{
Q_OBJECT
- Q_ENUMS(ShareError)
- Q_ENUMS(ShareMode)
public:
explicit QNearFieldShareManager(QObject *parent = 0);
@@ -63,12 +61,14 @@ public:
ShareAlreadyInProgressError,
SharePermissionDeniedError
};
+ Q_ENUM(ShareError)
enum ShareMode {
NoShare = 0x00,
NdefShare = 0x01,
FileShare = 0x02
};
+ Q_ENUM(ShareMode)
Q_DECLARE_FLAGS(ShareModes, ShareMode)
public:
diff --git a/src/nfc/qnearfieldtagtype1_p.h b/src/nfc/qnearfieldtagtype1_p.h
index efc757a0..0f5ad26e 100644
--- a/src/nfc/qnearfieldtagtype1_p.h
+++ b/src/nfc/qnearfieldtagtype1_p.h
@@ -62,6 +62,7 @@ public:
EraseAndWrite,
WriteOnly
};
+ Q_ENUM(WriteMode)
explicit QNearFieldTagType1(QObject *parent = 0);
~QNearFieldTagType1();
diff --git a/src/nfc/qnearfieldtarget.h b/src/nfc/qnearfieldtarget.h
index fef74946..a7abbe25 100644
--- a/src/nfc/qnearfieldtarget.h
+++ b/src/nfc/qnearfieldtarget.h
@@ -65,6 +65,7 @@ public:
NfcTagType4,
MifareTag
};
+ Q_ENUM(Type)
enum AccessMethod {
UnknownAccess = 0x00,
@@ -72,6 +73,7 @@ public:
TagTypeSpecificAccess = 0x02,
LlcpAccess = 0x04
};
+ Q_ENUM(AccessMethod)
Q_DECLARE_FLAGS(AccessMethods, AccessMethod)
enum Error {
@@ -85,6 +87,7 @@ public:
NdefReadError,
NdefWriteError
};
+ Q_ENUM(Error)
class RequestIdPrivate;
class Q_NFC_EXPORT RequestId
@@ -158,6 +161,5 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QNearFieldTarget::AccessMethods)
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QNearFieldTarget::RequestId)
-Q_DECLARE_METATYPE(QNearFieldTarget::Error)
#endif // QNEARFIELDTARGET_H
diff --git a/src/nfc/qqmlndefrecord.h b/src/nfc/qqmlndefrecord.h
index 71cd5513..dbd947ee 100644
--- a/src/nfc/qqmlndefrecord.h
+++ b/src/nfc/qqmlndefrecord.h
@@ -52,7 +52,6 @@ class Q_NFC_EXPORT QQmlNdefRecord : public QObject
Q_PROPERTY(TypeNameFormat typeNameFormat READ typeNameFormat WRITE setTypeNameFormat NOTIFY typeNameFormatChanged)
Q_PROPERTY(QNdefRecord record READ record WRITE setRecord NOTIFY recordChanged)
- Q_ENUMS(TypeNameFormat)
public:
enum TypeNameFormat {
Empty = QNdefRecord::Empty,
@@ -62,6 +61,7 @@ public:
ExternalRtd = QNdefRecord::ExternalRtd,
Unknown = QNdefRecord::Unknown
};
+ Q_ENUM(TypeNameFormat)
explicit QQmlNdefRecord(QObject *parent = 0);
explicit QQmlNdefRecord(const QNdefRecord &record, QObject *parent = 0);
diff --git a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
index f4ddd8aa..3f9f4bc7 100644
--- a/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothdevicediscoveryagent/tst_qbluetoothdevicediscoveryagent.cpp
@@ -44,9 +44,6 @@
QT_USE_NAMESPACE
-Q_DECLARE_METATYPE(QBluetoothDeviceDiscoveryAgent::InquiryType)
-Q_DECLARE_METATYPE(QBluetoothDeviceDiscoveryAgent::Error)
-
/*
* Some parts of this test require a remote and discoverable Bluetooth
* device. Setting the BT_TEST_DEVICE environment variable will
diff --git a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
index ef460289..d39dde9f 100644
--- a/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
+++ b/tests/auto/qbluetoothserver/tst_qbluetoothserver.cpp
@@ -45,7 +45,6 @@ QT_USE_NAMESPACE
#define TEST_SERVICE_UUID "e8e10f95-1a70-4b27-9ccf-02010264e9c8"
Q_DECLARE_METATYPE(QBluetooth::SecurityFlags)
-Q_DECLARE_METATYPE(QBluetoothServer::Error)
// Max time to wait for connection
static const int MaxConnectTime = 60 * 1000; // 1 minute in ms
diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
index 280dd893..a6e64d20 100644
--- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
+++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp
@@ -47,8 +47,6 @@
QT_USE_NAMESPACE
-Q_DECLARE_METATYPE(QBluetoothDeviceDiscoveryAgent::Error)
-
// Maximum time to for bluetooth device scan
const int MaxScanTime = 5 * 60 * 1000; // 5 minutes in ms
diff --git a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp
index de77046e..deebcf21 100644
--- a/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp
+++ b/tests/auto/qlowenergycharacteristic/tst_qlowenergycharacteristic.cpp
@@ -42,8 +42,6 @@
#include <QLowEnergyController>
#include <QBluetoothLocalDevice>
-Q_DECLARE_METATYPE(QBluetoothDeviceDiscoveryAgent::Error)
-
QT_USE_NAMESPACE
// This define must be set if the platform provides access to GATT handles