summaryrefslogtreecommitdiffstats
path: root/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-01-06 13:10:38 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-08 13:56:24 +0100
commit02a74dcea028f42d481774134a8b5915212e4c17 (patch)
tree9c4fddd93c2bab10b027c9c3474bd68a95c59048 /src/imports/bluetooth/qdeclarativebluetoothsocket.cpp
parent0abf615fe2f18dc2ebf66ca7874b40ed6ba126c9 (diff)
Use QLoggingCategory in Bluetooth QML import plugin.
Add some minor include cleanups as well. Task-number: QTBUG-32253 Change-Id: I2ccb813a9dd85ca16c1ed8aab962418df8157890 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/imports/bluetooth/qdeclarativebluetoothsocket.cpp')
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothsocket.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp
index a1329182..75a1b85c 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp
+++ b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp
@@ -41,13 +41,13 @@
#include "qdeclarativebluetoothsocket_p.h"
-#include <QPointer>
-#include <QStringList>
-#include <QDataStream>
-#include <QByteArray>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QPointer>
+#include <QtCore/QStringList>
+#include <QtCore/QDataStream>
+#include <QtCore/QByteArray>
-
-#include <qbluetoothdeviceinfo.h>
+#include <QtBluetooth/QBluetoothDeviceInfo>
#include <QtBluetooth/QBluetoothAddress>
#include <QtBluetooth/QBluetoothSocket>
@@ -75,6 +75,8 @@
or passing in the service return from BluetoothDiscoveryModel.
*/
+Q_DECLARE_LOGGING_CATEGORY(QT_BT_QML)
+
class QDeclarativeBluetoothSocketPrivate
{
public:
@@ -224,7 +226,7 @@ void QDeclarativeBluetoothSocket::setConnected(bool connected)
d->connect();
}
else {
- qWarning() << "BluetoothSocket::setConnected called before a service was set";
+ qCWarning(QT_BT_QML) << "BluetoothSocket::setConnected called before a service was set";
}
}
@@ -341,7 +343,7 @@ QString QDeclarativeBluetoothSocket::stringData()
void QDeclarativeBluetoothSocket::sendStringData(const QString &data)
{
if (!d->m_connected || !d->m_socket){
- qWarning() << "Writing data to unconnected socket";
+ qCWarning(QT_BT_QML) << "Writing data to unconnected socket";
return;
}