aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltyperegistrar/qmltypescreator.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-05-18 19:55:25 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-05-26 14:04:43 +0200
commit6d3aae3cf47fbf21bd27eda7a249c2a23308156e (patch)
tree02dd24091b28bfc05fa60185bf63b2daf36d459b /src/qmltyperegistrar/qmltypescreator.cpp
parentfe42d2ea631b82974dbccbe65c6f039b837c9150 (diff)
Remove --dependencies option from qmltyperegistrar
We don't need to list the dependencies in the qmltypes files. The information given in the qmldir file should be enough. Ultimately, we should get rid of all hidden dependencies. Task-number: QTBUG-84286 Change-Id: Iaf67d476b449215715270043591d8c4858104ea6 Reviewed-by: Christian Kamm <mail@ckamm.de> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmltyperegistrar/qmltypescreator.cpp')
-rw-r--r--src/qmltyperegistrar/qmltypescreator.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/qmltyperegistrar/qmltypescreator.cpp b/src/qmltyperegistrar/qmltypescreator.cpp
index d74d59062f..34e3e053a8 100644
--- a/src/qmltyperegistrar/qmltypescreator.cpp
+++ b/src/qmltyperegistrar/qmltypescreator.cpp
@@ -336,7 +336,7 @@ void QmlTypesCreator::writeComponents()
}
}
-void QmlTypesCreator::generate(const QString &outFileName, const QString &dependenciesFileName)
+void QmlTypesCreator::generate(const QString &outFileName)
{
m_qml.writeStartDocument();
m_qml.writeLibraryImport(QLatin1String("QtQuick.tooling"), 1, 2);
@@ -347,29 +347,6 @@ void QmlTypesCreator::generate(const QString &outFileName, const QString &depend
"\n// This file was auto-generated by qmltyperegistrar.\n\n"));
m_qml.writeStartObject(QLatin1String("Module"));
- QStringList dependencies;
- if (!dependenciesFileName.isEmpty()) {
- QFile file(dependenciesFileName);
- if (!file.open(QIODevice::ReadOnly)) {
- fprintf(stderr, "Failed to open %s\n", qPrintable(dependenciesFileName));
- } else {
- QJsonParseError error { -1, QJsonParseError::NoError };
- QJsonDocument doc = QJsonDocument::fromJson(file.readAll(), &error);
- if (error.error != QJsonParseError::NoError) {
- fprintf(stderr, "Failed to parse %s\n", qPrintable(dependenciesFileName));
- } else {
- const QJsonArray array = doc.array();
- for (const QJsonValue &value : array)
- dependencies.append(enquote(value.toString()));
- }
- }
- } else {
- // Default dependency is QtQuick 2.0
- dependencies.append(enquote(QLatin1String("QtQuick 2.0")));
- }
-
- m_qml.writeArrayBinding(QLatin1String("dependencies"), dependencies);
-
writeComponents();
m_qml.writeEndObject();