diff options
author | Bernhard Rosenkraenzer <bero@lindev.ch> | 2020-02-12 16:29:15 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-01-12 01:03:15 +0000 |
commit | 234e0eadc83a4de6e48bce884542773fc1396e51 (patch) | |
tree | 301a80236adc1b9feb8c987624c7d0abae7f6651 /src/widgets | |
parent | f044664c685eb81205c2ebdd78e11367d2d44006 (diff) |
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>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index e584db0f15..5acc7b880f 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -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 |