aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qobjectwrapper.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-06-21 14:04:12 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-06-22 08:23:34 +0200
commit6654637a46eda100f20eec9146a9dafb232ec0a9 (patch)
tree7ad88fcc7e1ca63d82b6a5b92d78d6bc7e7dbab1 /src/qml/jsruntime/qv4qobjectwrapper.cpp
parent7a3448a8e4c56d6adc40ef5887c2f12ce7b68d64 (diff)
QtQml: Rename qmlobject_can_cast
We want a version that only casts using the first C++ metaobject, and another one that takes the full QML type hierarchy into account. Change-Id: Ie23cf774f7837955de63d5ccb6c7cead1d1948f2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index e16b347ded..b891534712 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -1672,7 +1672,7 @@ static int MatchScore(const Value &actual, QMetaType conversionMetaType)
QObject *wrapped = wrapper->object();
if (!wrapped)
return 0;
- if (qmlobject_can_cast(wrapped, conversionMetaType.metaObject()))
+ if (qmlobject_can_cpp_cast(wrapped, conversionMetaType.metaObject()))
return 0;
}
}
@@ -1693,7 +1693,7 @@ static int MatchScore(const Value &actual, QMetaType conversionMetaType)
}
} else if (QObject *object = wrapper->object()) {
if (conversionMetaType.flags() & QMetaType::PointerToQObject
- && qmlobject_can_cast(object, conversionMetaType.metaObject())) {
+ && qmlobject_can_cpp_cast(object, conversionMetaType.metaObject())) {
return 0;
}
}