summaryrefslogtreecommitdiffstats
path: root/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.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/qdeclarativebluetoothdiscoverymodel.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/qdeclarativebluetoothdiscoverymodel.cpp')
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
index 67b71902..6689d663 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
+++ b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
@@ -44,7 +44,8 @@
#include <QPixmap>
-#include <qbluetoothdeviceinfo.h>
+#include <QtCore/QLoggingCategory>
+#include <QtBluetooth/QBluetoothDeviceInfo>
#include <QtBluetooth/QBluetoothAddress>
#include "qdeclarativebluetoothservice_p.h"
@@ -91,6 +92,8 @@
\sa QBluetoothServiceDiscoveryAgent
*/
+Q_DECLARE_LOGGING_CATEGORY(QT_BT_QML)
+
class QDeclarativeBluetoothDiscoveryModelPrivate
{
public:
@@ -214,7 +217,7 @@ QVariant QDeclarativeBluetoothDiscoveryModel::data(const QModelIndex &index, int
if (discoveryMode() != DeviceDiscovery) {
if (index.row() >= d->m_services.count()){
- qWarning() << "index out of bounds";
+ qCWarning(QT_BT_QML) << "index out of bounds";
return QVariant();
}
@@ -239,7 +242,7 @@ QVariant QDeclarativeBluetoothDiscoveryModel::data(const QModelIndex &index, int
}
} else {
if (index.row() >= d->m_devices.count()) {
- qWarning() << "index out of bounds";
+ qCWarning(QT_BT_QML) << "index out of bounds";
return QVariant();
}
@@ -432,7 +435,7 @@ void QDeclarativeBluetoothDiscoveryModel::setUuidFilter(QString uuid)
QBluetoothUuid qbuuid(uuid);
if (qbuuid.isNull()) {
- qWarning() << "Invalid UUID providded " << uuid;
+ qCWarning(QT_BT_QML) << "Invalid UUID providded " << uuid;
return;
}
d->m_uuid = uuid;