From 749e37efc5dd9eaa693c4f86253c48c37737aa09 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 17 Mar 2020 09:20:35 +0100 Subject: Property binding system: Fix developer build with MSVC 2019 (16.4.1) - Fix wrong forward declaration - De-inline constructor of QUntypedPropertyBinding(), fixing: qtbase\include/src/corelib/tools/qshareddata.h(184): error C2027: use of undefined type 'QPropertyBindingPrivate' qtbase\include/src/corelib/kernel/qpropertyprivate.h(60): note: see declaration of 'QPropertyBindingPrivate' qtbase\include/src/corelib/tools/qshareddata.h(184): note: while compiling class template member function 'QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer(void)' qtbase\src\corelib\kernel\qproperty.h(143): note: see reference to function template instantiation 'QExplicitlySharedDataPointer::~QExplicitlySharedDataPointer(void)' being compiled qtbase\src\corelib\kernel\qproperty.h(142): note: see reference to class template instantiation 'QExplicitlySharedDataPointer' being compiled qtbase\include\/src/corelib/tools/qshareddata.h(184): warning C4150: deletion of pointer to incomplete type 'QPropertyBindingPrivate'; no destructor called qtbase\include\/src/corelib/kernel/qpropertyprivate.h(60): note: see declaration of 'QPropertyBindingPrivate' Amends 9f9049b486a47aef0c7e2e3852b20aa4ffdce748. Change-Id: Idd613e2487d5ab7f8ead74747acd976d5d210c28 Reviewed-by: Fabian Kosmale Reviewed-by: Simon Hausmann --- src/corelib/kernel/qproperty.h | 4 ++-- src/corelib/kernel/qpropertybinding.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h index 45acfadd50..60e4193827 100644 --- a/src/corelib/kernel/qproperty.h +++ b/src/corelib/kernel/qproperty.h @@ -122,7 +122,7 @@ public: // already has. using BindingEvaluationFunction = std::function; - QUntypedPropertyBinding() = default; + QUntypedPropertyBinding(); QUntypedPropertyBinding(BindingEvaluationFunction function, const QPropertyBindingSourceLocation &location); QUntypedPropertyBinding(QUntypedPropertyBinding &&other); QUntypedPropertyBinding(const QUntypedPropertyBinding &other); @@ -337,7 +337,7 @@ private: Q_DISABLE_COPY(QProperty) friend struct QPropertyBasePointer; - friend struct QPropertyBinding; + friend class QPropertyBinding; friend struct QPropertyObserver; // Mutable because querying for the value may require evalating the binding expression, calling // non-const functions on QPropertyBase. diff --git a/src/corelib/kernel/qpropertybinding.cpp b/src/corelib/kernel/qpropertybinding.cpp index 23f7075998..8acaaeee72 100644 --- a/src/corelib/kernel/qpropertybinding.cpp +++ b/src/corelib/kernel/qpropertybinding.cpp @@ -89,6 +89,8 @@ bool QPropertyBindingPrivate::evaluateIfDirtyAndReturnTrueIfValueChanged() return changed; } +QUntypedPropertyBinding::QUntypedPropertyBinding() = default; + QUntypedPropertyBinding::QUntypedPropertyBinding(QUntypedPropertyBinding::BindingEvaluationFunction function, const QPropertyBindingSourceLocation &location) { -- cgit v1.2.3