From 6a8d4f614171444a77a127dc2e22f295d1ffabe2 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 29 Apr 2019 13:05:03 +0200 Subject: Don't wrap the attachedProperties function into a template Otherwise it gets a separate address for each CU in which the template is instantiated. We want to use the address as key to the attached properties, though. Fixes: QTBUG-75385 Change-Id: Iaec82db116a032f7cb1d40670bb47fdf610664a2 Reviewed-by: Mitch Curtis Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlprivate.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qml/qml/qqmlprivate.h b/src/qml/qml/qqmlprivate.h index fa05b3fe19..ae84803648 100644 --- a/src/qml/qml/qqmlprivate.h +++ b/src/qml/qml/qqmlprivate.h @@ -190,16 +190,13 @@ namespace QQmlPrivate template class AttachedPropertySelector { - static inline QObject *attachedProperties(QObject *obj) { - return T::qmlAttachedProperties(obj); - } template static inline const QMetaObject *attachedPropertiesMetaObject(ReturnType *(*)(QObject *)) { return &ReturnType::staticMetaObject; } public: static inline QQmlAttachedPropertiesFunc func() { - return &attachedProperties; + return QQmlAttachedPropertiesFunc(&T::qmlAttachedProperties); } static inline const QMetaObject *metaObject() { return attachedPropertiesMetaObject(&T::qmlAttachedProperties); -- cgit v1.2.3