aboutsummaryrefslogtreecommitdiffstats
path: root/shibokengenerator.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-01 18:32:38 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-02-01 18:32:38 -0200
commit8edbbe2723eedc2c013dc1e23a18a4db3713da25 (patch)
treece1a34fa33d89b72e3c31aee6e67d59ce2991fd1 /shibokengenerator.cpp
parentb792bd74dd76a3e58e3ce69714d7432c8aa007a6 (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.cpp6
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;