Commit a04a1653 authored by Fawzi Mohamed's avatar Fawzi Mohamed
Browse files

qml: avoid dumping or reading type info multiple times



Change-Id: Id0c52f6a96a5c36893f64cbc96cc7eee300e6afa
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 6d3939db
...@@ -171,12 +171,15 @@ void PluginDumper::onLoadPluginTypes(const QString &libraryPath, const QString & ...@@ -171,12 +171,15 @@ void PluginDumper::onLoadPluginTypes(const QString &libraryPath, const QString &
// add default qmltypes file if it exists // add default qmltypes file if it exists
const QLatin1String defaultQmltypesFileName("plugins.qmltypes"); const QLatin1String defaultQmltypesFileName("plugins.qmltypes");
const QString defaultQmltypesPath = makeAbsolute(defaultQmltypesFileName, canonicalLibraryPath); const QString defaultQmltypesPath = makeAbsolute(defaultQmltypesFileName, canonicalLibraryPath);
if (QFile::exists(defaultQmltypesPath)) if (!plugin.typeInfoPaths.contains(defaultQmltypesPath) && QFile::exists(defaultQmltypesPath))
plugin.typeInfoPaths += defaultQmltypesPath; plugin.typeInfoPaths += defaultQmltypesPath;
// add typeinfo files listed in qmldir // add typeinfo files listed in qmldir
foreach (const QmlDirParser::TypeInfo &typeInfo, libraryInfo.typeInfos()) foreach (const QmlDirParser::TypeInfo &typeInfo, libraryInfo.typeInfos()) {
plugin.typeInfoPaths += makeAbsolute(typeInfo.fileName, canonicalLibraryPath); QString pathNow = makeAbsolute(typeInfo.fileName, canonicalLibraryPath);
if (!plugin.typeInfoPaths.contains(pathNow) && QFile::exists(pathNow))
plugin.typeInfoPaths += pathNow;
}
// watch plugin libraries // watch plugin libraries
foreach (const QmlDirParser::Plugin &plugin, snapshot.libraryInfo(canonicalLibraryPath).plugins()) { foreach (const QmlDirParser::Plugin &plugin, snapshot.libraryInfo(canonicalLibraryPath).plugins()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment