summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bluetooth/android/serveracceptancethread.cpp2
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent.h2
-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/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/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
23 files changed, 37 insertions, 44 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/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/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/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