diff options
Diffstat (limited to 'src/quickcontrols2/qquickattachedobject.cpp')
-rw-r--r-- | src/quickcontrols2/qquickattachedobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quickcontrols2/qquickattachedobject.cpp b/src/quickcontrols2/qquickattachedobject.cpp index 8b75e42a..722f22f9 100644 --- a/src/quickcontrols2/qquickattachedobject.cpp +++ b/src/quickcontrols2/qquickattachedobject.cpp @@ -48,8 +48,8 @@ static QQuickAttachedObject *attachedObject(const QMetaObject *type, QObject *ob { if (!object) return nullptr; - int idx = -1; - return qobject_cast<QQuickAttachedObject *>(qmlAttachedPropertiesObject(&idx, object, type, create)); + auto func = qmlAttachedPropertiesFunction(object, type); + return qobject_cast<QQuickAttachedObject *>(qmlAttachedPropertiesObject(object, func, create)); } static QQuickAttachedObject *findAttachedParent(const QMetaObject *type, QObject *object) @@ -119,7 +119,7 @@ static QList<QQuickAttachedObject *> findAttachedChildren(const QMetaObject *typ if (window) { item = window->contentItem(); - const auto windowChildren = window->children(); + const auto &windowChildren = window->children(); for (QObject *child : windowChildren) { QQuickWindow *childWindow = qobject_cast<QQuickWindow *>(child); if (childWindow) { |