Minor cleanup for QProperty constructor
Declare it inline Change-Id: If8fe72a1f8e8e8af387d9bc3a2f731d61eda02cd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>bb10
parent
818de32db2
commit
0c4bc39002
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue