diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-12-20 13:50:01 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:12:50 -0300 |
commit | 996b4b18d72528ed963611365ea48452d85014a7 (patch) | |
tree | 808f96205c9b8ddac3d34304be7fd449e20f4cbc /generator/shibokengenerator.cpp | |
parent | 9b020d07568c986c3d3363180c20a4a5e15560a8 (diff) |
Fix bug#484 - "Error compiling QtContacts 1.1 (problems with const QList<QVariant>)"
Reviewer: Renato Araújo <renato.filho@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'generator/shibokengenerator.cpp')
-rw-r--r-- | generator/shibokengenerator.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generator/shibokengenerator.cpp b/generator/shibokengenerator.cpp index 8be8964e8..697c89e58 100644 --- a/generator/shibokengenerator.cpp +++ b/generator/shibokengenerator.cpp @@ -1660,12 +1660,14 @@ Generator::Options ShibokenGenerator::getConverterOptions(const AbstractMetaType Options flags; const TypeEntry* type = metaType->typeEntry(); bool isCStr = isCString(metaType); - if (metaType->indirections() && !isCStr) + if (metaType->indirections() && !isCStr) { flags = ExcludeConst; - else if (type->isPrimitive() && !isCStr) + } else if (metaType->isContainer() + || (type->isPrimitive() && !isCStr) + // const refs become just the value, but pure refs must remain pure. + || (type->isValue() && metaType->isConstant() && metaType->isReference())) { flags = ExcludeConst | ExcludeReference; - else if (type->isValue() && metaType->isConstant() && metaType->isReference()) - flags = ExcludeConst | ExcludeReference; // const refs become just the value, but pure refs must remain pure. + } return flags; } |