Make QAccessible::State's equality operator a hidden friend
Reduce ADL nose. We already have an inline default constructor calling memset, so can have the comparison operator calling memcmp also inlined. Task-number: QTBUG-87973 Change-Id: If8e0ae98b0c44fc3fddac7ef57c5ff021c80dad6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
a45a3b1ece
commit
be10808279
@ -1820,12 +1820,6 @@ const char *qAccessibleEventString(QAccessible::Event event)
|
||||
return QAccessible::staticMetaObject.enumerator(eventEnum).valueToKey(event);
|
||||
}
|
||||
|
||||
/*! \internal */
|
||||
bool operator==(const QAccessible::State &first, const QAccessible::State &second)
|
||||
{
|
||||
return memcmp(&first, &second, sizeof(QAccessible::State)) == 0;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
/*! \internal */
|
||||
Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface)
|
||||
|
@ -217,6 +217,10 @@ public:
|
||||
State() {
|
||||
memset(this, 0, sizeof(State));
|
||||
}
|
||||
friend inline bool operator==(const QAccessible::State &first, const QAccessible::State &second)
|
||||
{
|
||||
return memcmp(&first, &second, sizeof(QAccessible::State)) == 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -437,8 +441,6 @@ private:
|
||||
friend class QAccessibleCache;
|
||||
};
|
||||
|
||||
Q_GUI_EXPORT bool operator==(const QAccessible::State &first, const QAccessible::State &second);
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QAccessible::Relation)
|
||||
|
||||
class QAccessible2Interface;
|
||||
|
Loading…
Reference in New Issue
Block a user