summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothhostinfo.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-02-26 17:10:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-27 09:53:54 +0100
commited49b5cda6d84793ffdfd433b2d2cea0583de219 (patch)
tree32faca81d528d9c3201ccf0084b178e82d8c20a2 /src/bluetooth/qbluetoothhostinfo.cpp
parentf58cddd97aa873d7d2b310d59e5fa1febbaba224 (diff)
Add copy operator to QBluetoothHostInfo.
The QBluetoothSocket unit test was sometimes failing because of it. Change-Id: I6071902e1aaa9e1138f071b7f2ce2a8ccb436789 Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothhostinfo.cpp')
-rw-r--r--src/bluetooth/qbluetoothhostinfo.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothhostinfo.cpp b/src/bluetooth/qbluetoothhostinfo.cpp
index 1e8dbc2e..00ce0680 100644
--- a/src/bluetooth/qbluetoothhostinfo.cpp
+++ b/src/bluetooth/qbluetoothhostinfo.cpp
@@ -82,6 +82,19 @@ QBluetoothHostInfo::~QBluetoothHostInfo()
}
/*!
+ Assigns \a other to this QBluetoothHostInfo instance.
+*/
+QBluetoothHostInfo &QBluetoothHostInfo::operator=(const QBluetoothHostInfo &other)
+{
+ Q_D(QBluetoothHostInfo);
+
+ d->m_address = other.d_func()->m_address;
+ d->m_name = other.d_func()->m_name;
+
+ return *this;
+}
+
+/*!
Returns the Bluetooth address as a QBluetoothAddress.
*/
QBluetoothAddress QBluetoothHostInfo::address() const