aboutsummaryrefslogtreecommitdiffstats
path: root/headergenerator.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-08-16 17:51:41 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-08-17 11:15:03 -0300
commit08027d04146bf528ac33a0686aa1a1a81312b9a3 (patch)
tree73ebd5e1fa7045c9adcb7b78a700b63b02d34dd4 /headergenerator.cpp
parenta61017d620189108ab844ce9398f453f534de5f3 (diff)
Fix bug 294 - "If the function must return a QFlags<T> and you return T, an exception is throw."
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'headergenerator.cpp')
-rw-r--r--headergenerator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/headergenerator.cpp b/headergenerator.cpp
index 5e39ec95b..1c761639a 100644
--- a/headergenerator.cpp
+++ b/headergenerator.cpp
@@ -234,8 +234,10 @@ void HeaderGenerator::writeTypeConverterDecl(QTextStream& s, const TypeEntry* ty
s << "struct Converter<" << typeT << " >";
if (!hasCustomConversion) {
- if (type->isEnum() || type->isFlags())
+ if (type->isEnum())
s << " : EnumConverter";
+ else if (type->isFlags())
+ s << " : QFlagsConverter";
else if (isAbstractOrObjectType)
s << " : ObjectTypeConverter";
else