aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-01-15 17:48:07 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-01-26 22:15:51 -0200
commit96ec538edebf7f754fbb6cbff7f126a71673a0e1 (patch)
tree7be3a0ebaf6527d10ee0734caa26b439c7c2296c
parent08d106b8d67ca22045d3a59b4a05ac0e35d09bd9 (diff)
Write the enum name based on enum module, not the current module being generated.
-rw-r--r--shibokengenerator.cpp4
-rw-r--r--tests/libother/otherderived.h12
2 files changed, 12 insertions, 4 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index 673587710..6821c709d 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -235,12 +235,12 @@ static QString cpythonEnumFlagsName(QString moduleName, QString qualifiedCppName
QString ShibokenGenerator::cpythonEnumName(const EnumTypeEntry* enumEntry)
{
- return cpythonEnumFlagsName(moduleName(), enumEntry->qualifiedCppName());
+ return cpythonEnumFlagsName(enumEntry->targetLangPackage().replace(".", "_"), enumEntry->qualifiedCppName());
}
QString ShibokenGenerator::cpythonFlagsName(const FlagsTypeEntry* flagsEntry)
{
- return cpythonEnumFlagsName(moduleName(), flagsEntry->originalName());
+ return cpythonEnumFlagsName(flagsEntry->targetLangPackage().replace(".", "_"), flagsEntry->originalName());
}
QString ShibokenGenerator::cpythonSpecialCastFunctionName(const AbstractMetaClass* metaClass)
diff --git a/tests/libother/otherderived.h b/tests/libother/otherderived.h
index e449e29af..994aaca66 100644
--- a/tests/libother/otherderived.h
+++ b/tests/libother/otherderived.h
@@ -35,8 +35,12 @@
#ifndef OTHERDERIVED_H
#define OTHERDERIVED_H
-#include <libsample/libsamplemacros.h>
-#include <libsample/abstract.h>
+#include "libsamplemacros.h"
+#include "abstract.h"
+#include "derived.h"
+
+class ObjectType;
+class Complex;
class LIBSAMPLE_API OtherDerived : public Abstract
{
@@ -46,6 +50,10 @@ public:
virtual void pureVirtual();
virtual void unpureVirtual();
+ void useObjectTypeFromOtherModule(ObjectType*) {}
+ void useValueTypeFromOtherModule(const Complex&) {}
+ void useEnumTypeFromOtherModule(OverloadedFuncEnum) {}
+
// factory method
static Abstract* createObject();