diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-26 19:22:30 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-26 22:15:52 -0200 |
commit | df3b7134e1ff05fde57e8e3f74835131e34110d4 (patch) | |
tree | 37a050de88ed8bcc7340efad5e9ab9506e177fc8 | |
parent | b62fe3b11c547f493196e97bceb1601fb1ad73d6 (diff) |
Use qualified C++ names on variables inside richComparison functions.
-rw-r--r-- | cppgenerator.cpp | 8 | ||||
-rw-r--r-- | cppgenerator.h | 2 | ||||
-rw-r--r-- | tests/libsample/derived.h | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index 8fc1cec0f..eda2e18fc 100644 --- a/cppgenerator.cpp +++ b/cppgenerator.cpp @@ -1765,9 +1765,11 @@ void CppGenerator::writeRichCompareFunction(QTextStream& s, const AbstractMetaCl { Indentation indent(INDENT); s << INDENT; - if (type->typeEntry()->isValue()) - s << type->name() << '*'; - else + if (type->typeEntry()->isValue()) { + AbstractMetaClass* clz = classes().findClass(type->typeEntry()); + Q_ASSERT(clz); + s << clz->qualifiedCppName() << '*'; + } else s << translateTypeForWrapperMethod(type, metaClass); s << " cpp_other = "; if (type->typeEntry()->isValue()) diff --git a/cppgenerator.h b/cppgenerator.h index 796273f82..0d7746ad6 100644 --- a/cppgenerator.h +++ b/cppgenerator.h @@ -34,6 +34,8 @@ class CppGenerator : public ShibokenGenerator { public: CppGenerator(); + void clazclasses(QString arg1); + void AbstractMeclasses(QString arg1); protected: QString fileNameForClass(const AbstractMetaClass* metaClass) const; QList<AbstractMetaFunctionList> filterGroupedOperatorFunctions(const AbstractMetaClass* metaClass, diff --git a/tests/libsample/derived.h b/tests/libsample/derived.h index 965cd871d..162acbb7b 100644 --- a/tests/libsample/derived.h +++ b/tests/libsample/derived.h @@ -55,6 +55,7 @@ public: public: void uselessMethod() {} SomeInnerClass operator+(const SomeInnerClass& other) { return other; } + bool operator==(const SomeInnerClass& other) { return true; } }; Derived(int id = -1); |