aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cppgenerator.cpp2
-rw-r--r--tests/libother/otherderived.h1
-rw-r--r--tests/libsample/abstract.h2
-rw-r--r--tests/libsample/derived.h2
4 files changed, 6 insertions, 1 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 01d46bc51..63c0ef65a 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -627,7 +627,7 @@ void CppGenerator::writeMinimalConstructorCallArguments(QTextStream& s, const Ab
if (type->isPrimitive() || type->isObject()) {
s << "0";
- } else if (type->isContainer() || type->isFlags()){
+ } else if (type->isContainer() || type->isFlags() || type->isEnum()){
s << metaType->cppSignature() << "()";
} else {
// this is slowwwww, FIXME: Fix the API od APIExtractor, these things should be easy!
diff --git a/tests/libother/otherderived.h b/tests/libother/otherderived.h
index 994aaca66..d980ec780 100644
--- a/tests/libother/otherderived.h
+++ b/tests/libother/otherderived.h
@@ -49,6 +49,7 @@ public:
virtual ~OtherDerived();
virtual void pureVirtual();
virtual void unpureVirtual();
+ virtual PrintFormat returnAnEnum() { return Short; }
void useObjectTypeFromOtherModule(ObjectType*) {}
void useValueTypeFromOtherModule(const Complex&) {}
diff --git a/tests/libsample/abstract.h b/tests/libsample/abstract.h
index 63ac59441..b9c0713c7 100644
--- a/tests/libsample/abstract.h
+++ b/tests/libsample/abstract.h
@@ -61,6 +61,8 @@ public:
virtual void pureVirtual() = 0;
virtual void unpureVirtual();
+ virtual PrintFormat returnAnEnum() = 0;
+
void callPureVirtual();
void callUnpureVirtual();
diff --git a/tests/libsample/derived.h b/tests/libsample/derived.h
index 9e0e33a82..29639bddd 100644
--- a/tests/libsample/derived.h
+++ b/tests/libsample/derived.h
@@ -56,6 +56,8 @@ public:
virtual void pureVirtual();
virtual void unpureVirtual();
+ virtual PrintFormat returnAnEnum() { return Short; }
+
// factory method
static Abstract* createObject();