diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-02-01 18:32:38 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-02-01 18:32:38 -0200 |
commit | 8edbbe2723eedc2c013dc1e23a18a4db3713da25 (patch) | |
tree | ce1a34fa33d89b72e3c31aee6e67d59ce2991fd1 /shibokengenerator.cpp | |
parent | b792bd74dd76a3e58e3ce69714d7432c8aa007a6 (diff) |
Fix crash when a virtual function with enum in they arguments is called from C++ and have an
implementation in Python.
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r-- | shibokengenerator.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp index db73507ca..078c33938 100644 --- a/shibokengenerator.cpp +++ b/shibokengenerator.cpp @@ -349,6 +349,8 @@ QString ShibokenGenerator::getFormatUnitString(const AbstractMetaFunction* func) || arg->type()->isObject() || arg->type()->isValue() || arg->type()->isValuePointer() + || arg->type()->isEnum() + || arg->type()->isFlags() || arg->type()->isReference()) { result += 'O'; } else if (arg->type()->isPrimitive()) { @@ -362,7 +364,9 @@ QString ShibokenGenerator::getFormatUnitString(const AbstractMetaFunction* func) } else if (arg->type()->isNativePointer() && arg->type()->name() == "char") { result += 'z'; } else { - result += 'Y'; + Q_ASSERT(false); + ReportHandler::warning("Unknown type used in ShibokenGenerator::getFormatUnitString!"); + result += '?'; } } return result; |