From 355a66dddef76b2f0244294af7bfc296d072ec43 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Tue, 15 Sep 2020 00:03:09 +0200 Subject: Do not store fail-to-load items in the prototype cache It doesn't seem right to store such items in the cache. We do not try to load them in the future anyway since the names of the invalid files are discarded on the higher level. Change-Id: I48c23878df664dd5b761ebe42a6730f81850a904 Reviewed-by: Christian Kandeler --- src/lib/corelib/language/moduleloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/corelib') diff --git a/src/lib/corelib/language/moduleloader.cpp b/src/lib/corelib/language/moduleloader.cpp index 32d431386..eda40516b 100644 --- a/src/lib/corelib/language/moduleloader.cpp +++ b/src/lib/corelib/language/moduleloader.cpp @@ -3319,7 +3319,6 @@ Item *ModuleLoader::getModulePrototype(ProductContext *productContext, } } Item * const module = loadItemFromFile(filePath, CodeLocation()); - prototypeList.emplace_back(module, productContext->profileName); if (module->type() != ItemType::Module) { qCDebug(lcModuleLoader).nospace() << "Alleged module " << fullModuleName << " has type '" @@ -3327,6 +3326,7 @@ Item *ModuleLoader::getModulePrototype(ProductContext *productContext, *triedToLoad = false; return nullptr; } + prototypeList.emplace_back(module, productContext->profileName); // Module properties that are defined in the profile are used as default values. // This is the reason we need to have different items per profile. -- cgit v1.2.3