aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-04-29 13:05:03 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2019-05-02 05:56:03 +0000
commit6a8d4f614171444a77a127dc2e22f295d1ffabe2 (patch)
treeafdb20d76d481db3ac57960ec8df597502bb54e7
parentac0d313ab15aa78c444d00ed6a1a202a1351dfa1 (diff)
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 <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qml/qml/qqmlprivate.h5
1 files changed, 1 insertions, 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<typename T>
class AttachedPropertySelector<T, 1>
{
- static inline QObject *attachedProperties(QObject *obj) {
- return T::qmlAttachedProperties(obj);
- }
template<typename ReturnType>
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);