diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-11-27 17:01:22 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-11-27 17:01:22 +0100 |
commit | 1c9e0d95263480a5ae5d645cabb41f835d1dbb70 (patch) | |
tree | 25f46dc18d8f8430d46ad365452ce0d8a7c9d9d0 /sources/shiboken2/generator | |
parent | ad14f64972d182fca3e180c08750ca020a91b84e (diff) | |
parent | 2490c34325bb1b39922582090a4cb69c01726999 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.9
Change-Id: I79637555fbfbd596dee4313baf80149d03bb5206
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp index 74861e3d4..cb650dde3 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp @@ -530,7 +530,7 @@ void CppGenerator::generateClass(QTextStream &s, GeneratorContext &classContext) writeMappingMethods(s, metaClass, classContext); } - if (metaClass->hasComparisonOperatorOverload()) { + if (!metaClass->isNamespace() && metaClass->hasComparisonOperatorOverload()) { s << "// Rich comparison" << endl; writeRichCompareFunction(s, classContext); } @@ -3751,7 +3751,7 @@ void CppGenerator::writeClassDefinition(QTextStream &s, } QString tp_richcompare = QString(QLatin1Char('0')); - if (metaClass->hasComparisonOperatorOverload()) + if (!metaClass->isNamespace() && metaClass->hasComparisonOperatorOverload()) tp_richcompare = cpythonBaseName(metaClass) + QLatin1String("_richcompare"); QString tp_getset = QString(QLatin1Char('0')); |