diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-01-16 16:07:18 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-01-28 07:48:13 +0000 |
commit | fd88da6bf12c7c8edfd6c3d44cc641aed7477f0b (patch) | |
tree | da59011c858baa683ba4594c6cab8807c5f219df /tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp | |
parent | 769a597083a60dc530b9a28fe606dae6d1b02369 (diff) |
Convert qRegisterMetaType<T>(const char*) to qRegisterMetaType<T>()
This is much safer and cleaner.
[ChangeLog][QtBluetooth][Important Behavior Changes] Q_DECLARE_METATYPE
added for QBluetoothServiceDiscoveryAgent::Error,
QBluetoothSocket::SocketState, QBluetoothSocket::SocketError and
QBluetoothDeviceInfo. This breaks source compatibility if application
code has defined the above metatypes already. The applications
Q_DECLARE_METATYPE must be removed to fix the compile error.
Change-Id: I1c7cb1ee25832b7e5337c9aca6f36b21e8caf22e
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp')
-rw-r--r-- | tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp index 341c6918..b0c97d07 100644 --- a/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp +++ b/tests/auto/qbluetoothservicediscoveryagent/tst_qbluetoothservicediscoveryagent.cpp @@ -47,8 +47,7 @@ QT_USE_NAMESPACE -Q_DECLARE_METATYPE(QBluetoothDeviceInfo) -Q_DECLARE_METATYPE(QBluetoothServiceDiscoveryAgent::Error) +Q_DECLARE_METATYPE(QBluetoothDeviceDiscoveryAgent::Error) // Maximum time to for bluetooth device scan const int MaxScanTime = 5 * 60 * 1000; // 5 minutes in ms @@ -98,11 +97,11 @@ tst_QBluetoothServiceDiscoveryAgent::tst_QBluetoothServiceDiscoveryAgent() localDeviceAvailable = QBluetoothLocalDevice().hostMode() != QBluetoothLocalDevice::HostPoweredOff; #endif - qRegisterMetaType<QBluetoothDeviceInfo>("QBluetoothDeviceInfo"); - qRegisterMetaType<QBluetoothServiceInfo>("QBluetoothServiceInfo"); - qRegisterMetaType<QList<QBluetoothUuid> >("QList<QBluetoothUuid>"); - qRegisterMetaType<QBluetoothServiceDiscoveryAgent::Error>("QBluetoothServiceDiscoveryAgent::Error"); - qRegisterMetaType<QBluetoothDeviceDiscoveryAgent::Error>("QBluetoothDeviceDiscoveryAgent::Error"); + qRegisterMetaType<QBluetoothDeviceInfo>(); + qRegisterMetaType<QBluetoothServiceInfo>(); + qRegisterMetaType<QList<QBluetoothUuid> >(); + qRegisterMetaType<QBluetoothServiceDiscoveryAgent::Error>(); + qRegisterMetaType<QBluetoothDeviceDiscoveryAgent::Error>(); } |