aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltyperegistrar
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-01-18 12:13:44 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-01-18 13:43:05 +0100
commit1fa352f0e0a62d0b445e9a2a01953f8afca29858 (patch)
tree72fa445babaeaa1a0bb385507667a29a7ad6fe8e /src/qmltyperegistrar
parentbdb2b66f3d7d027e3022aabd63fe73d305ed058f (diff)
qmltyperegistrar: Remove QML.ManualRegistration
This was needed because we couldn't automatically generate the types for the Qt object/namespace. Now we can. We should not offer this possibility to users as we need to see all the types at compile time. Such an escape hatch will only give us problems in the future. Change-Id: Ib86fddd0352cf1877a4123cad273c99c4252d8ac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmltyperegistrar')
-rw-r--r--src/qmltyperegistrar/metatypesjsonprocessor.cpp14
-rw-r--r--src/qmltyperegistrar/qmltyperegistrar.cpp3
-rw-r--r--src/qmltyperegistrar/qmltypesclassdescription.cpp2
3 files changed, 1 insertions, 18 deletions
diff --git a/src/qmltyperegistrar/metatypesjsonprocessor.cpp b/src/qmltyperegistrar/metatypesjsonprocessor.cpp
index 0e0723d072..06f504fecc 100644
--- a/src/qmltyperegistrar/metatypesjsonprocessor.cpp
+++ b/src/qmltyperegistrar/metatypesjsonprocessor.cpp
@@ -303,20 +303,6 @@ void MetaTypesJsonProcessor::processTypes(const QJsonObject &types)
qPrintable(include));
}
m_includes.append(include);
- {
- bool shouldRegister = true;
- const QJsonArray classInfos = classDef.value(QLatin1String("classInfos")).toArray();
- for (const QJsonValue &v : classInfos) {
- if (v[QLatin1String("name")].toString()
- == QLatin1String("QML.ManualRegistration")) {
- shouldRegister = QStringView(u"true").compare(
- v[QLatin1String("value")].toString(),
- Qt::CaseInsensitive) != 0;
- }
- }
- classDef.insert(QLatin1String("registerable"), shouldRegister);
- }
-
m_types.append(classDef);
break;
}
diff --git a/src/qmltyperegistrar/qmltyperegistrar.cpp b/src/qmltyperegistrar/qmltyperegistrar.cpp
index 7ae59b3e37..a3fe58dbcf 100644
--- a/src/qmltyperegistrar/qmltyperegistrar.cpp
+++ b/src/qmltyperegistrar/qmltyperegistrar.cpp
@@ -209,9 +209,6 @@ int main(int argc, char **argv)
const QVector<QJsonObject> types = processor.types();
for (const QJsonObject &classDef : types) {
- if (!classDef.value(QLatin1String("registerable")).toBool())
- continue;
-
const QString className = classDef[QLatin1String("qualifiedClassName")].toString();
if (classDef.value(QLatin1String("namespace")).toBool()) {
diff --git a/src/qmltyperegistrar/qmltypesclassdescription.cpp b/src/qmltyperegistrar/qmltypesclassdescription.cpp
index 5af8ea5be6..70a4e49d19 100644
--- a/src/qmltyperegistrar/qmltypesclassdescription.cpp
+++ b/src/qmltyperegistrar/qmltypesclassdescription.cpp
@@ -126,7 +126,7 @@ void QmlTypesClassDescription::collect(
const QJsonObject *classDef, const QVector<QJsonObject> &types,
const QVector<QJsonObject> &foreign, CollectMode mode, QTypeRevision defaultRevision)
{
- if (file.isEmpty() && classDef->value(QLatin1String("registerable")).toBool())
+ if (file.isEmpty())
file = classDef->value(QLatin1String("inputFile")).toString();
const auto classInfos = classDef->value(QLatin1String("classInfos")).toArray();