diff options
Diffstat (limited to 'src/bluetooth/qbluetoothhostinfo.h')
-rw-r--r-- | src/bluetooth/qbluetoothhostinfo.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bluetooth/qbluetoothhostinfo.h b/src/bluetooth/qbluetoothhostinfo.h index 42dfcaab..9330cba7 100644 --- a/src/bluetooth/qbluetoothhostinfo.h +++ b/src/bluetooth/qbluetoothhostinfo.h @@ -54,9 +54,14 @@ public: ~QBluetoothHostInfo(); QBluetoothHostInfo &operator=(const QBluetoothHostInfo &other); - - bool operator==(const QBluetoothHostInfo &other) const; - bool operator!=(const QBluetoothHostInfo &other) const; + friend bool operator==(const QBluetoothHostInfo &a, const QBluetoothHostInfo &b) + { + return equals(a, b); + } + friend bool operator!=(const QBluetoothHostInfo &a, const QBluetoothHostInfo &b) + { + return !equals(a, b); + } QBluetoothAddress address() const; void setAddress(const QBluetoothAddress &address); @@ -65,6 +70,7 @@ public: void setName(const QString &name); private: + static bool equals(const QBluetoothHostInfo &a, const QBluetoothHostInfo &b); Q_DECLARE_PRIVATE(QBluetoothHostInfo) QBluetoothHostInfoPrivate *d_ptr; }; |