aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-03-27 14:05:12 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-02 14:14:09 +0000
commit66f466b6c80dc3bc016c7e8f98898805ab2d149e (patch)
tree04e986984afc2f3a2888f90eb93ddf9c213564c7 /sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
parentca7a5a9c3a40cc7c432ef1d9d4713fe1169a92b2 (diff)
shiboken: Further refactorings related to the package name
Let Generator::packageName() return the default package name of the type data base instead of storing it in a member variable. Instead, use a member variable for the module name which is derived from it, since it is queried many times. Use the default type system entry instead of searching for it via package name. Change-Id: I171330b3d73d2e3ceac239e4c1c6f130e9f5ee7b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/shibokengenerator.cpp')
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index c572a98d9..b5069db14 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -2489,7 +2489,6 @@ static void getCode(QStringList& code, const TypeEntry* type)
bool ShibokenGenerator::doSetup()
{
- TypeDatabase* td = TypeDatabase::instance();
QStringList snips;
const PrimitiveTypeEntryList &primitiveTypeList = primitiveTypes();
for (const PrimitiveTypeEntry *type : primitiveTypeList)
@@ -2501,7 +2500,7 @@ bool ShibokenGenerator::doSetup()
for (const AbstractMetaClass *metaClass : classList)
getCode(snips, metaClass->typeEntry());
- const TypeSystemTypeEntry *moduleEntry = td->findTypeSystemType(packageName());
+ const TypeSystemTypeEntry *moduleEntry = TypeDatabase::instance()->defaultTypeSystemType();
Q_ASSERT(moduleEntry);
getCode(snips, moduleEntry);