diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 0d7613e8ff..79a3ea3378 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -671,6 +671,19 @@ public: QInputMethodEvent(const QInputMethodEvent &other); + inline friend bool operator==(const QInputMethodEvent::Attribute &lhs, + const QInputMethodEvent::Attribute &rhs) + { + return lhs.type == rhs.type && lhs.start == rhs.start + && lhs.length == rhs.length && lhs.value == rhs.value; + } + + inline friend bool operator!=(const QInputMethodEvent::Attribute &lhs, + const QInputMethodEvent::Attribute &rhs) + { + return !(lhs == rhs); + } + private: QString m_preedit; QList m_attributes;