Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -171,12 +171,15 @@ void PluginDumper::onLoadPluginTypes(const QString &libraryPath, const QString &
// add default qmltypes file if it exists
const QLatin1String defaultQmltypesFileName("plugins.qmltypes");
const QString defaultQmltypesPath = makeAbsolute(defaultQmltypesFileName, canonicalLibraryPath);
if (QFile::exists(defaultQmltypesPath))
if (!plugin.typeInfoPaths.contains(defaultQmltypesPath) && QFile::exists(defaultQmltypesPath))
plugin.typeInfoPaths += defaultQmltypesPath;
// add typeinfo files listed in qmldir
foreach (const QmlDirParser::TypeInfo &typeInfo, libraryInfo.typeInfos())
plugin.typeInfoPaths += makeAbsolute(typeInfo.fileName, canonicalLibraryPath);
foreach (const QmlDirParser::TypeInfo &typeInfo, libraryInfo.typeInfos()) {
QString pathNow = makeAbsolute(typeInfo.fileName, canonicalLibraryPath);
if (!plugin.typeInfoPaths.contains(pathNow) && QFile::exists(pathNow))
plugin.typeInfoPaths += pathNow;
}
// watch plugin libraries
foreach (const QmlDirParser::Plugin &plugin, snapshot.libraryInfo(canonicalLibraryPath).plugins()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment