diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-08-16 17:51:41 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-08-17 11:15:03 -0300 |
commit | 08027d04146bf528ac33a0686aa1a1a81312b9a3 (patch) | |
tree | 73ebd5e1fa7045c9adcb7b78a700b63b02d34dd4 /headergenerator.cpp | |
parent | a61017d620189108ab844ce9398f453f534de5f3 (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.cpp | 4 |
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 |