summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothsocket_android.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-01-16 16:07:18 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-01-28 07:48:13 +0000
commitfd88da6bf12c7c8edfd6c3d44cc641aed7477f0b (patch)
treeda59011c858baa683ba4594c6cab8807c5f219df /src/bluetooth/qbluetoothsocket_android.cpp
parent769a597083a60dc530b9a28fe606dae6d1b02369 (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 'src/bluetooth/qbluetoothsocket_android.cpp')
-rw-r--r--src/bluetooth/qbluetoothsocket_android.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bluetooth/qbluetoothsocket_android.cpp b/src/bluetooth/qbluetoothsocket_android.cpp
index e8d7d028..02440abc 100644
--- a/src/bluetooth/qbluetoothsocket_android.cpp
+++ b/src/bluetooth/qbluetoothsocket_android.cpp
@@ -40,7 +40,6 @@
#include <QtConcurrent/QtConcurrentRun>
#include <QtAndroidExtras/QAndroidJniEnvironment>
-
QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(QT_BT_ANDROID)
@@ -57,8 +56,8 @@ QBluetoothSocketPrivate::QBluetoothSocketPrivate()
adapter = QAndroidJniObject::callStaticObjectMethod("android/bluetooth/BluetoothAdapter",
"getDefaultAdapter",
"()Landroid/bluetooth/BluetoothAdapter;");
- qRegisterMetaType<QBluetoothSocket::SocketError>("QBluetoothSocket::SocketError");
- qRegisterMetaType<QBluetoothSocket::SocketState>("QBluetoothSocket::SocketState");
+ qRegisterMetaType<QBluetoothSocket::SocketError>();
+ qRegisterMetaType<QBluetoothSocket::SocketState>();
}
QBluetoothSocketPrivate::~QBluetoothSocketPrivate()