diff options
author | Liang Qi <liang.qi@qt.io> | 2019-11-21 11:34:57 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-11-22 09:50:11 +0100 |
commit | aa3813366a8e772cd58c9253461cf2dc50b97a9d (patch) | |
tree | e306a60fa9b2d1f7dd2e6b245fdf05214c7c55df /src/qml/qml/qqmlengine.cpp | |
parent | 4241bb4d26ef69eb212e0274bad0926ec71bead9 (diff) | |
parent | acb6ed0815f92588c3ff875a568e9561fe61218c (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
src/qml/qml/qqmlextensionplugin.cpp
tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
Change-Id: Ic58d36a8532015bae30f2690063db9829b3bf372
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index b84a9b843c..1f4e5528c7 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1624,6 +1624,9 @@ static QObject *resolveAttachedProperties(QQmlAttachedPropertiesFunc pf, QQmlDat } #if QT_DEPRECATED_SINCE(5, 14) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED + QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool create) { QQmlData *data = QQmlData::get(object, create); @@ -1634,7 +1637,9 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre return nullptr; QQmlEnginePrivate *engine = QQmlEnginePrivate::get(data->context); - return resolveAttachedProperties(QQmlMetaType::attachedPropertiesFuncById(engine, id), data, + + const QQmlType type = QQmlMetaType::qmlType(id, QQmlMetaType::TypeIdCategory::QmlType); + return resolveAttachedProperties(type.attachedPropertiesFunction(engine), data, const_cast<QObject *>(object), create); } @@ -1651,6 +1656,8 @@ QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object, return qmlAttachedPropertiesObjectById(*idCache, object, create); } + +QT_WARNING_POP #endif QQmlAttachedPropertiesFunc qmlAttachedPropertiesFunction(QObject *object, @@ -1679,6 +1686,8 @@ QObject *qmlAttachedPropertiesObject(QObject *object, QQmlAttachedPropertiesFunc } // namespace QtQml #if QT_DEPRECATED_SINCE(5, 1) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED // Also define symbols outside namespace to keep binary compatibility with Qt 5.0 @@ -1709,6 +1718,7 @@ Q_QML_EXPORT QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *o return QtQml::qmlAttachedPropertiesObject(idCache, object, attachedMetaObject, create); } +QT_WARNING_POP #endif // QT_DEPRECATED_SINCE(5, 1) class QQmlDataExtended { |