comparison generator/generator.cpp @ 357:9784459f0750

An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables Q_CLASSINFO implementation Now Qtd can be built on Windows
author Max Samukha <maxter@spambox.com>
date Wed, 02 Jun 2010 19:38:05 +0300
parents 073b9153ed8a
children
comparison
equal deleted inserted replaced
356:12cec2d14e1c 357:9784459f0750
138 } 138 }
139 } 139 }
140 return false; 140 return false;
141 } 141 }
142 142
143 // hackery to get qt module names
144 QString Generator::packageToQtModule(QString package, ModuleNameType nameType)
145 {
146 if (!package.startsWith("qt."))
147 qFatal(qPrintable("Package " + package + " does not start with 'qt.'"));
148
149 QString module = package.right(package.length() - 3);
150
151 if (nameType == ShortUpper)
152 return module.toUpper();
153 else if (nameType == LongCamel) {
154 module[0] = module[0].toTitleCase();
155 return "Qt" + module;
156 }
157 else
158 Q_ASSERT(0);
159 }
160
143 bool isLinearContainer(const ContainerTypeEntry *type) 161 bool isLinearContainer(const ContainerTypeEntry *type)
144 { 162 {
145 if (type->type() == ContainerTypeEntry::ListContainer 163 if (type->type() == ContainerTypeEntry::ListContainer
146 || type->type() == ContainerTypeEntry::VectorContainer 164 || type->type() == ContainerTypeEntry::VectorContainer
147 || type->type() == ContainerTypeEntry::StringListContainer 165 || type->type() == ContainerTypeEntry::StringListContainer