diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-29 16:12:06 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-29 16:12:06 +0200 |
commit | f870501469c9165f16c792e1167a8a897a3b0d5a (patch) | |
tree | a9f6c4e36ab0d244b3f9e58a69f03ae7391c9aec /src | |
parent | 3e5a32e9a40916e0bae882ba22b9d2b1131d6326 (diff) | |
parent | 80ceeeed3c15d307784be66b5dafdc9cfc12b8cb (diff) | |
download | qtconnectivity-f870501469c9165f16c792e1167a8a897a3b0d5a.tar.gz |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
.qmake.conf
src/nfc/doc/src/nfc-index.qdoc
Change-Id: Ie12d3023ff934f6579ae93617c95fc654e85a7f0
Diffstat (limited to 'src')
22 files changed, 307 insertions, 38 deletions
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); |