Fix build with MSVC2019
The error was: src\virtualkeyboard\qvirtualkeyboardinputcontext_p.cpp(305): error C2678: binary '!=': no operator found which takes a left-hand operand of type 'QList<QInputMethodEvent::Attribute>' (or there is no acceptable conversion) This patch fixes the issue by manually defining an operator== for QInputMethodEvent::Attribute. Change-Id: Idb283cf7b6ff4388a38ea7780c3d5c1c5f77038d Fixes: QTBUG-85789 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
0792188440
commit
46ec92dad0
@ -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<Attribute> m_attributes;
|
||||
|
Loading…
Reference in New Issue
Block a user