diff options
author | Marco Benelli <marco.benelli@theqtcompany.com> | 2016-01-06 12:49:02 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2016-01-20 09:01:17 +0000 |
commit | a28bf00a6c1faa550602b8d5b80de5e3ff79a0c0 (patch) | |
tree | 33de762bfc19d5f46c4202ae5e5485dc0a741d6a /tools/qmlplugindump | |
parent | 63652419b6098665aafb17f1175524685d504e24 (diff) |
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 <Thomas.Hartmann@theqtcompany.com>
Diffstat (limited to 'tools/qmlplugindump')
-rw-r--r-- | tools/qmlplugindump/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |