summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2020-04-24 13:02:49 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2020-04-30 19:39:37 +0200
commit0c4bc39002763d2b0298586674a774821f52aa00 (patch)
treeea037fe0e898e39290c699eff49ea128f5fa7dd9 /src
parent818de32db28375dbe5d8bd93121fe751720911f2 (diff)
Minor cleanup for QProperty constructor
Declare it inline Change-Id: If8fe72a1f8e8e8af387d9bc3a2f731d61eda02cd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qproperty.h13
1 files changed, 3 insertions, 10 deletions
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 <typename Functor>
explicit QProperty(Functor &&f, const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
- typename std::enable_if_t<std::is_invocable_r_v<T, Functor&>> * = 0);
+ typename std::enable_if_t<std::is_invocable_r_v<T, Functor&>> * = 0)
+ : QProperty(QPropertyBinding<T>(std::forward<Functor>(f), location))
+ {}
#else
template <typename Functor>
explicit QProperty(Functor &&f);
@@ -357,15 +359,6 @@ private:
mutable QtPrivate::QPropertyValueStorage<T> d;
};
-#ifndef Q_CLANG_QDOC
-template <typename PropertyType>
-template <typename Functor>
-QProperty<PropertyType>::QProperty(Functor &&f, const QPropertyBindingSourceLocation &location,
- typename std::enable_if_t<std::is_invocable_r_v<PropertyType, Functor&>> *)
- : QProperty(QPropertyBinding<PropertyType>(std::forward<Functor>(f), location))
-{}
-#endif
-
namespace Qt {
template <typename PropertyType>
QPropertyBinding<PropertyType> makePropertyBinding(const QProperty<PropertyType> &otherProperty,