From 234e0eadc83a4de6e48bce884542773fc1396e51 Mon Sep 17 00:00:00 2001 From: Bernhard Rosenkraenzer Date: Wed, 12 Feb 2020 16:29:15 +0100 Subject: 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 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 --- src/widgets/dialogs/qwizard.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widgets') 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 -- cgit v1.2.3