diff options
author | Christian Tismer <tismer@stackless.com> | 2017-12-01 16:53:58 +0100 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2017-12-05 11:32:45 +0000 |
commit | 4f11db4232d7ce5ac415d36d86fbf6e92f6e88a1 (patch) | |
tree | 96177d96ad705ceb9d88c7ece52413182a58be3e /sources/shiboken2/generator | |
parent | 4379a97592fb282c6e6acc9185a68953e7c46e3d (diff) |
Unify signature registry for py2 / py3 and clean up
It turned out that there are tiny differences between Python2 and Python3
which make the versions of the registry almost, but not totally equal.
There are functions which are slot wrappers in Python2 instead of
method wrappers in Python3, and we currently don't support slot wrappers.
There are other tiny differences when we switch to Qt 5.9, too.
Initially, I thought to split the files for Python2 and Python3, but then
it turned out that the problems vanish when we ignore the 'next' and '__next__'
functions in both python versions.
The filter function is both applied to the generating function and the testing
function. Therefore we can keep the existing data intact.
I further removed an indentation leftover in cppgenerator.cpp,
fixed handling of duplicate entries and improved modularisation of the
signature enumerator and formatter. This part will later be moved into the signature
library.
Task-number: PYSIDE-510
Change-Id: I18f5e8f08fb9b07534003919abe55ab4dafeb2c2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp index 8fbce8091..ce74c9887 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp @@ -439,7 +439,7 @@ void CppGenerator::generateClass(QTextStream &s, GeneratorContext &classContext) if (metaClass->typeEntry()->isValue() || metaClass->typeEntry()->isSmartPointer()) { writeCopyFunction(s, classContext); - signatureStream << INDENT << metaClass->fullName() << ".__copy__()" << endl; + signatureStream << metaClass->fullName() << ".__copy__()" << endl; } // Write single method definitions |