aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-10-22 13:55:44 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-10-24 15:23:55 +0200
commitfbe32d83b3e16bc51866daf5635cd36e1f70753b (patch)
tree3f2d615f851a129c00198056493ea994eacae3fb /tools
parent220e32c0925b060a5eed72b555bf47b02012e8ea (diff)
qmltyperegistrar: Register only classes with QML.Element classInfo
We may have QML.Attached in some classes we don't want to register. QML.Attached needs to be on the original class, even if the class is registered as a foreign type in some other context. Change-Id: I3d46fa351a2e595e879f0d2d8cc441d59c9dd754 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmltyperegistrar/qmltyperegistrar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/qmltyperegistrar/qmltyperegistrar.cpp b/tools/qmltyperegistrar/qmltyperegistrar.cpp
index 98bd0f8c6f..e64c23d2c9 100644
--- a/tools/qmltyperegistrar/qmltyperegistrar.cpp
+++ b/tools/qmltyperegistrar/qmltyperegistrar.cpp
@@ -51,7 +51,7 @@ static bool acceptClassForQmlTypeRegistration(const QJsonObject &classDef)
{
const QJsonArray classInfos = classDef[QLatin1String("classInfos")].toArray();
for (const QJsonValue &info: classInfos) {
- if (info[QLatin1String("name")].toString().startsWith(QLatin1String("QML.")))
+ if (info[QLatin1String("name")].toString() == QLatin1String("QML.Element"))
return true;
}
return false;