summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycharacteristic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qlowenergycharacteristic.h')
-rw-r--r--src/bluetooth/qlowenergycharacteristic.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/bluetooth/qlowenergycharacteristic.h b/src/bluetooth/qlowenergycharacteristic.h
index fe9b73fa..0ba08d35 100644
--- a/src/bluetooth/qlowenergycharacteristic.h
+++ b/src/bluetooth/qlowenergycharacteristic.h
@@ -73,8 +73,14 @@ public:
~QLowEnergyCharacteristic();
QLowEnergyCharacteristic &operator=(const QLowEnergyCharacteristic &other);
- bool operator==(const QLowEnergyCharacteristic &other) const;
- bool operator!=(const QLowEnergyCharacteristic &other) const;
+ friend bool operator==(const QLowEnergyCharacteristic &a, const QLowEnergyCharacteristic &b)
+ {
+ return equals(a, b);
+ }
+ friend bool operator!=(const QLowEnergyCharacteristic &a, const QLowEnergyCharacteristic &b)
+ {
+ return !equals(a, b);
+ }
QString name() const;
@@ -108,6 +114,9 @@ protected:
QLowEnergyCharacteristicPrivate *data = nullptr;
QLowEnergyCharacteristic(QSharedPointer<QLowEnergyServicePrivate> p,
QLowEnergyHandle handle);
+
+private:
+ static bool equals(const QLowEnergyCharacteristic &a, const QLowEnergyCharacteristic &b);
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QLowEnergyCharacteristic::PropertyTypes)