aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-09-15 00:03:09 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-09-15 09:31:16 +0000
commit355a66dddef76b2f0244294af7bfc296d072ec43 (patch)
tree36ed956b5763941d2e906c9676886adabd1f0b6b /src/lib/corelib
parent4a2ecaf2e48e48cf5309b1877817ed6a1ffff64c (diff)
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 <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib')
-rw-r--r--src/lib/corelib/language/moduleloader.cpp2
1 files changed, 1 insertions, 1 deletions
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.