aboutsummaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2012-05-02 21:45:52 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2012-05-03 03:13:50 +0200
commit54cce10fa8a9942450c9e1a9d9a9d2a1b688f243 (patch)
treeb15e041fc2a891846f38565c655c32a2546e7be3 /generator
parent9a8eaf81a4694088cb2a5f3fcea753ea588cb7cf (diff)
Set a default hash function for all ObjectTypes.
Fix bug PYSIDE-42 Change-Id: I1392374dcf0055309152082e674cc1e3e6472d4d Reviewed-by: Paulo Alcantara <paulo.alcantara@openbossa.org> Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/shiboken/cppgenerator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/generator/shiboken/cppgenerator.cpp b/generator/shiboken/cppgenerator.cpp
index fa19f7a3d..32fcdec7e 100644
--- a/generator/shiboken/cppgenerator.cpp
+++ b/generator/shiboken/cppgenerator.cpp
@@ -3385,6 +3385,8 @@ void CppGenerator::writeClassDefinition(QTextStream& s, const AbstractMetaClass*
if (!metaClass->typeEntry()->hashFunction().isEmpty())
tp_hash = '&' + cpythonBaseName(metaClass) + "_HashFunc";
+ else if (isObjectType(metaClass))
+ tp_hash = "&Shiboken::Object::hash";
const AbstractMetaFunction* callOp = metaClass->findFunction("operator()");
if (callOp && !callOp->isModifiedRemoved())