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 <fabian.kosmale@qt.io>
This commit is contained in:
Thiago Macieira 2021-09-20 12:05:38 -07:00
parent 67b2c84992
commit 8cc6c7cd6e

View File

@ -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<decltype(Signal)>) {
if constexpr (SignalTakesValue::value)
(owner()->*Signal)(value());
else