From 0c4bc39002763d2b0298586674a774821f52aa00 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 24 Apr 2020 13:02:49 +0200 Subject: Minor cleanup for QProperty constructor Declare it inline Change-Id: If8fe72a1f8e8e8af387d9bc3a2f731d61eda02cd Reviewed-by: Fabian Kosmale --- src/corelib/kernel/qproperty.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h index e43f59053d..24aa1804f2 100644 --- a/src/corelib/kernel/qproperty.h +++ b/src/corelib/kernel/qproperty.h @@ -230,7 +230,9 @@ public: #ifndef Q_CLANG_QDOC template explicit QProperty(Functor &&f, const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION, - typename std::enable_if_t> * = 0); + typename std::enable_if_t> * = 0) + : QProperty(QPropertyBinding(std::forward(f), location)) + {} #else template explicit QProperty(Functor &&f); @@ -357,15 +359,6 @@ private: mutable QtPrivate::QPropertyValueStorage d; }; -#ifndef Q_CLANG_QDOC -template -template -QProperty::QProperty(Functor &&f, const QPropertyBindingSourceLocation &location, - typename std::enable_if_t> *) - : QProperty(QPropertyBinding(std::forward(f), location)) -{} -#endif - namespace Qt { template QPropertyBinding makePropertyBinding(const QProperty &otherProperty, -- cgit v1.2.3