aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/projectresolver.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-11-29 13:34:00 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-11-30 16:12:07 +0000
commitd4c00b33848a9155e2ae1b6002e9bb2c9d7dfcd7 (patch)
treec4ffe0cde00dadc54cfd26f4505529643a1a165f /src/lib/corelib/language/projectresolver.cpp
parentd455b2d19e9208e17b8ffea82a4aa95264a64c28 (diff)
Re-use VariantValue objects
These objects are self-contained, i.e. they have no additional context such as a scope. Therefore, there is no need to have more than one VariantValue for the same QVariant. We now share VariantValue objects for true, false and default QVariant, which is easy to do, has no trade-offs such as requiring a map and is enough to bring down the number of VariantValue objects by over 50% for larger projects. The overall memory savings are nothing to write home about (because there are far more JSSourceValues), but doing fewer allocations cannot be a bad thing. Change-Id: Ic0c1a5cbcf3bfd8e1ee06fa71899002e899f1202 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/lib/corelib/language/projectresolver.cpp')
-rw-r--r--src/lib/corelib/language/projectresolver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/language/projectresolver.cpp b/src/lib/corelib/language/projectresolver.cpp
index 3e3eac364..7f3df3047 100644
--- a/src/lib/corelib/language/projectresolver.cpp
+++ b/src/lib/corelib/language/projectresolver.cpp
@@ -479,7 +479,7 @@ void ProjectResolver::resolveProductFully(Item *item, ProjectContext *projectCon
fakeGroup->setProperty(StringConstants::excludeFilesProperty(),
item->property(StringConstants::excludeFilesProperty()));
fakeGroup->setProperty(StringConstants::overrideTagsProperty(),
- VariantValue::create(false));
+ VariantValue::falseValue());
fakeGroup->setupForBuiltinType(m_logger);
subItems.prepend(fakeGroup);
}