summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2018-09-11 10:55:14 +0200
committerMaurice Kalinowski <maurice.kalinowski@qt.io>2018-09-11 09:25:21 +0000
commitde7ecaa0c2bd90f26080a0a969832c92f9ea40d4 (patch)
tree7f2364aee9b6065bb8a97985e417a93fe09f0f88
parent37353480620d2910c71c678ae0e5dc5754c61e04 (diff)
MQTT5: Add QMqttStringPair::operator!=
This is meant for completeness and requested in the API review process. Change-Id: I960c8cd69bd7db86af1112c74bd1a3d68d225903 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/mqtt/qmqtttype.cpp8
-rw-r--r--src/mqtt/qmqtttype.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mqtt/qmqtttype.cpp b/src/mqtt/qmqtttype.cpp
index 373707b..51954f7 100644
--- a/src/mqtt/qmqtttype.cpp
+++ b/src/mqtt/qmqtttype.cpp
@@ -446,6 +446,14 @@ bool QMqttStringPair::operator==(const QMqttStringPair &other) const
return *data.constData() == *other.data.constData();
}
+/*!
+ Returns \c true if this instance does not match \a other.
+*/
+bool QMqttStringPair::operator!=(const QMqttStringPair &other) const
+{
+ return !operator==(other);
+}
+
QMqttStringPair &QMqttStringPair::operator=(const QMqttStringPair &rhs)
{
if (this != &rhs)
diff --git a/src/mqtt/qmqtttype.h b/src/mqtt/qmqtttype.h
index d791d63..6197875 100644
--- a/src/mqtt/qmqtttype.h
+++ b/src/mqtt/qmqtttype.h
@@ -56,6 +56,7 @@ public:
void setValue(const QString &v);
bool operator==(const QMqttStringPair &other) const;
+ bool operator!=(const QMqttStringPair &other) const;
QMqttStringPair &operator=(const QMqttStringPair &);
private:
QSharedDataPointer<QMqttStringPairData> data;