[Kde-bindings] [smokegen] generators/smoke: QFlags references are valid unless they are return types of field

Arno Rehn arno at arnorehn.de
Sun Jun 10 20:31:02 UTC 2012


Git commit 7b67ac626f27e1d405ab92a2d2a8bb91ffa98c2d by Arno Rehn.
Committed on 10/06/2012 at 22:27.
Pushed by arnorehn into branch 'master'.

QFlags references are valid unless they are return types of field
accessors.

Fixes compilation of smokekde.

CCMAIL: kde-bindings at kde.org

M  +1    -1    generators/smoke/helpers.cpp

http://commits.kde.org/smokegen/7b67ac626f27e1d405ab92a2d2a8bb91ffa98c2d

diff --git a/generators/smoke/helpers.cpp b/generators/smoke/helpers.cpp
index b15791d..4fb2c98 100644
--- a/generators/smoke/helpers.cpp
+++ b/generators/smoke/helpers.cpp
@@ -609,7 +609,7 @@ void Util::addAccessorMethods(const Field& field, QSet<Type*> *usedTypes)
 {
     Class* klass = field.getClass();
     Type* type = field.type();
-    if (type->getClass() && type->pointerDepth() == 0) {
+    if (type->getClass() && type->pointerDepth() == 0 && !(ParserOptions::qtMode && type->getClass()->name() == "QFlags")) {
         Type newType = *type;
         newType.setIsRef(true);
         type = Type::registerType(newType);


More information about the Kde-bindings mailing list