From 8cc6c7cd6eb88b197defc3e4f73d2f5706455bd4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 20 Sep 2021 12:05:38 -0700 Subject: [PATCH] QProperty: attempt to fix compilation with GCC 10 Somehow it's not expanding properly in constexpr time. qproperty_p.h:554:30: error: \u2018(QItemSelectionModelPrivate::modelChanged != 0)\u2019 is not a constant expression if constexpr (Signal != nullptr) { ~~~~~~~^~~~~~~~~~ Fixes: QTBUG-96659 Change-Id: I3eb1bd30e0124f89a052fffd16a69d2eb4b45784 Reviewed-by: Fabian Kosmale --- src/corelib/kernel/qproperty_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qproperty_p.h b/src/corelib/kernel/qproperty_p.h index 6fcef939f7e..742ef446ca2 100644 --- a/src/corelib/kernel/qproperty_p.h +++ b/src/corelib/kernel/qproperty_p.h @@ -551,7 +551,7 @@ public: const bool inWrapper = inBindingWrapper(storage); if (bd && !inWrapper) notify(bd); - if constexpr (Signal != nullptr) { + if constexpr (!std::is_null_pointer_v) { if constexpr (SignalTakesValue::value) (owner()->*Signal)(value()); else