From 7c9e51e7e7b358fb9c4829ee8f02918ec4cfd016 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Mon, 18 Jan 2016 22:53:49 +0300 Subject: QmlPluginDump: use QFileInfo::exist(f) instead of ... QFileInfo(f).exists(). It's faster. Change-Id: Id9dd30f5532ed73c487caffcaad3860a6475e832 Reviewed-by: Lars Knoll --- tools/qmlplugindump/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/qmlplugindump/main.cpp') diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index aa2e8755e6..070ea041d6 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -794,9 +794,9 @@ static bool readDependenciesData(QString dependenciesFile, const QByteArray &fil return true; } -static bool readDependenciesFile(QString dependenciesFile, QStringList *dependencies, +static bool readDependenciesFile(const QString &dependenciesFile, QStringList *dependencies, const QStringList &urisToSkip) { - if (!QFileInfo(dependenciesFile).exists()) { + if (!QFileInfo::exists(dependenciesFile)) { std::cerr << "non existing dependencies file " << dependenciesFile.toStdString() << std::endl; return false; -- cgit v1.2.3 From a28bf00a6c1faa550602b8d5b80de5e3ff79a0c0 Mon Sep 17 00:00:00 2001 From: Marco Benelli Date: Wed, 6 Jan 2016 12:49:02 +0100 Subject: qmlplugindump: avoid generating conflicting types. qmlplugindump used to import QtQuick, therefore skipping all QtQuick types when dumping. Now that it imports only Qt, it is no longer the case, and all QtQuick types would be dumped in the module's qmltypes file. It can be avoided by specifyng 'QtQuick' as dependency in qmldir file or in a json file passed as -dependencies option. It seems however that people are not used to that, so in order to restore the old behavior, the QtQuick dependency is automatically added when the dependency list is empty. Change-Id: I5fb2e57893607a877d284767b3fd09159b45ff42 Reviewed-by: Thomas Hartmann --- tools/qmlplugindump/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/qmlplugindump/main.cpp') diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 070ea041d6..fe92f80bad 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -791,6 +791,13 @@ static bool readDependenciesData(QString dependenciesFile, const QByteArray &fil << ": expected an array" << std::endl; return false; } + // Workaround for avoiding conflicting types when no dependency has been found. + // + // qmlplugindump used to import QtQuick, so all types defined in QtQuick used to be skipped when dumping. + // Now that it imports only Qt, it is no longer the case: if no dependency is found all the types defined + // in QtQuick will be dumped, causing conflicts. + if (dependencies->isEmpty()) + dependencies->push_back(QLatin1String("QtQuick 2.0")); return true; } -- cgit v1.2.3