summaryrefslogtreecommitdiffstats
path: root/src/imports/bluetooth/qdeclarativebluetoothservice.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/qdeclarativebluetoothservice.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/qdeclarativebluetoothservice.cpp')
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothservice.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/imports/bluetooth/qdeclarativebluetoothservice.cpp b/src/imports/bluetooth/qdeclarativebluetoothservice.cpp
index 7559968d..6d4e3dc0 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothservice.cpp
+++ b/src/imports/bluetooth/qdeclarativebluetoothservice.cpp
@@ -41,7 +41,9 @@
#include "qdeclarativebluetoothservice_p.h"
-#include <qbluetoothdeviceinfo.h>
+#include <QtCore/QLoggingCategory>
+
+#include <QtBluetooth/QBluetoothDeviceInfo>
#include <QtBluetooth/QBluetoothSocket>
#include <QtBluetooth/QBluetoothAddress>
#include <QtBluetooth/QBluetoothServer>
@@ -80,6 +82,8 @@
\endlist
*/
+Q_DECLARE_LOGGING_CATEGORY(QT_BT_QML)
+
class QDeclarativeBluetoothServicePrivate
{
public:
@@ -269,7 +273,7 @@ bool QDeclarativeBluetoothService::isRegistered() const
int QDeclarativeBluetoothServicePrivate::listen() {
if (m_service->socketProtocol() == QBluetoothServiceInfo::UnknownProtocol) {
- qWarning() << "Unknown protocol, can't make service" << m_protocol;
+ qCWarning(QT_BT_QML) << "Unknown protocol, can't make service" << m_protocol;
return -1;
}
QBluetoothServiceInfo::Protocol serverType = QBluetoothServiceInfo::UnknownProtocol;
@@ -331,7 +335,7 @@ void QDeclarativeBluetoothService::setRegistered(bool registered)
protocolDescriptorList.append(QVariant::fromValue(protocol));
}
else {
- qWarning() << "No protocol specified for bluetooth service";
+ qCWarning(QT_BT_QML) << "No protocol specified for bluetooth service";
}
d->m_service->setAttribute(QBluetoothServiceInfo::ProtocolDescriptorList,
protocolDescriptorList);
@@ -340,7 +344,7 @@ void QDeclarativeBluetoothService::setRegistered(bool registered)
emit registeredChanged();
}
else {
- qWarning() << "Register service failed";
+ qCWarning(QT_BT_QML) << "Register service failed";
//TODO propaget this error to the user
}
}
@@ -364,7 +368,7 @@ QDeclarativeBluetoothSocket *QDeclarativeBluetoothService::nextClient()
return new QDeclarativeBluetoothSocket(socket, this, 0);
}
else {
- qWarning() << "Socket has no pending connection, failing";
+ qCWarning(QT_BT_QML) << "Socket has no pending connection, failing";
return 0;
}
}
@@ -381,7 +385,7 @@ void QDeclarativeBluetoothService::assignNextClient(QDeclarativeBluetoothSocket
return;
}
else {
- qWarning() << "Socket has no pending connection, failing";
+ qCWarning(QT_BT_QML) << "Socket has no pending connection, failing";
return;
}
}