QWizardLayoutInfo: make == and != operators const

This fixes building with clang 10.0 in C++20 mode.
http://eel.is/c++draft/diff.cpp17.over

Thanks to Ville Voutilainen <ville.voutilainen@qt.io>
for pointing out this better fix.

Task-number: QTBUG-81917
Pick-to: 6.3 6.2 5.15
Change-Id: I8ce5776ddcd061b4615239e38caa5ad07950b66d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Bernhard Rosenkraenzer 2020-02-12 16:29:15 +01:00 committed by Marc Mutz
parent f044664c68
commit 234e0eadc8

View File

@ -254,11 +254,11 @@ public:
bool extension = false;
bool sideWidget = false;
bool operator==(const QWizardLayoutInfo &other);
inline bool operator!=(const QWizardLayoutInfo &other) { return !operator==(other); }
bool operator==(const QWizardLayoutInfo &other) const;
inline bool operator!=(const QWizardLayoutInfo &other) const { return !operator==(other); }
};
bool QWizardLayoutInfo::operator==(const QWizardLayoutInfo &other)
bool QWizardLayoutInfo::operator==(const QWizardLayoutInfo &other) const
{
return topLevelMarginLeft == other.topLevelMarginLeft
&& topLevelMarginRight == other.topLevelMarginRight