summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2014-04-28 12:00:06 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-29 10:46:24 +0200
commit29db481f5aa1c71072a0185537933a0fc7c19083 (patch)
tree7fa7c8d41dfb1367d0eff6f3319c7fdb974c10e7
parent34b32040ec0e80108890c0f97bcdc85989200409 (diff)
Add QDebug helper for QBluetoothAddress
[ChangeLog][QtBluetooth] Added QDebug helper for QBluetoothAddress Change-Id: I0d88fb220a8175705e68bec8a87f04a0c4b3b5cc Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r--src/bluetooth/qbluetoothaddress.cpp12
-rw-r--r--src/bluetooth/qbluetoothaddress.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothaddress.cpp b/src/bluetooth/qbluetoothaddress.cpp
index 798b325b..bbacfd26 100644
--- a/src/bluetooth/qbluetoothaddress.cpp
+++ b/src/bluetooth/qbluetoothaddress.cpp
@@ -42,6 +42,10 @@
#include "qbluetoothaddress.h"
#include "qbluetoothaddress_p.h"
+#ifndef QT_NO_DEBUG_STREAM
+#include <QDebug>
+#endif
+
QT_BEGIN_NAMESPACE
/*!
@@ -215,4 +219,12 @@ QBluetoothAddressPrivate::QBluetoothAddressPrivate()
m_address = 0;
}
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug debug, QBluetoothAddress &address)
+{
+ debug << address.toString();
+ return debug;
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/bluetooth/qbluetoothaddress.h b/src/bluetooth/qbluetoothaddress.h
index 27c5412d..265a1d96 100644
--- a/src/bluetooth/qbluetoothaddress.h
+++ b/src/bluetooth/qbluetoothaddress.h
@@ -82,6 +82,10 @@ private:
QBluetoothAddressPrivate *d_ptr;
};
+#ifndef QT_NO_DEBUG_STREAM
+Q_BLUETOOTH_EXPORT QDebug operator<<(QDebug, QBluetoothAddress &);
+#endif
+
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QBluetoothAddress)