diff options
-rw-r--r-- | cppgenerator.cpp | 2 | ||||
-rw-r--r-- | tests/libother/otherderived.h | 1 | ||||
-rw-r--r-- | tests/libsample/abstract.h | 2 | ||||
-rw-r--r-- | tests/libsample/derived.h | 2 |
4 files changed, 6 insertions, 1 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index 01d46bc5..63c0ef65 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 994aaca6..d980ec78 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 63ac5944..b9c0713c 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 9e0e33a8..29639bdd 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(); |