aboutsummaryrefslogtreecommitdiffstats
path: root/generator/cppgenerator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixes writeReturnValueHeuristics to not mess with constructors.Marcelo Lira2012-03-081-0/+1
| | | | | | | | Also fixes isWrapperType to avoid erring when the type is an object type passed as value. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Fix python 2.x generation.Renato Filho2012-03-081-4/+4
|
* Updated shiboken generator to works with python3 code.Renato Filho2012-03-081-19/+73
|
* Update string usage to new Shiboken::String API.Renato Filho2012-03-081-1/+1
|
* Create SHIBOKEN MODULE INIT macro.Renato Filho2012-03-081-11/+2
|
* Fix getattro function on Python3.Hugo Parente Lima2012-03-081-2/+1
|
* Added SBK_PyString_FromCString and SBK_PyString_FromFormat as helper macro ↵Hugo Parente Lima2012-03-081-1/+1
| | | | for Py3k port.
* Correctly prints the return type of virtual functions instead of a C++ ↵Hugo Parente Lima2012-03-081-7/+7
| | | | expression.
* Port module initialization to Python3.Hugo Parente Lima2012-03-081-7/+42
|
* Use PyBytes instead of PyString on generated code.Hugo Parente Lima2012-03-081-3/+5
|
* Use ErrorCode class when writing enums.Hugo Parente Lima2012-03-081-8/+8
|
* Port libsample typesystem and glue codes to Python 3.Hugo Parente Lima2012-03-081-2/+1
|
* Added sbkpython.h to deal with conflicts and missing symbols between ↵Hugo Parente Lima2012-03-081-1/+1
| | | | Python2 and 3.
* Revert "Implements PSEP-0106 and fixes bug 902 - "Expose Shiboken ↵Hugo Parente Lima2012-03-081-7/+4
| | | | | | | | functionality through a Python module"." This reverts commit bc8448d7fb91733ff08c2a6a3a878702c14a24e0. The PSEP didn't reach the final version yet, so this commit can't be released.
* Fix bug 995 - "QDeclarativeView.itemAt returns faulty reference. (leading to ↵Hugo Parente Lima2012-03-081-15/+7
| | | | SEGFAULT)"
* Use internal dynamic metaobject insted of created by pyside.Renato Filho2012-03-081-0/+3
| | | | | Reviewer: Hugo Parente <hugo.lima@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Fiexed default __repr__ function generation.Renato Filho2012-03-081-1/+1
| | | | | | | Fixes bug #991. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Implements PSEP-0106 and fixes bug 902 - "Expose Shiboken functionality ↵Hugo Parente Lima2012-03-081-4/+7
| | | | through a Python module".
* Implmented support to q_metacall function modification.Renato Filho2012-03-081-7/+22
| | | | | Reviewed by: Hugo Parente <hugo.lima@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Not print warning if the typedef used on signal is QFlags.Renato Filho2012-03-081-1/+1
| | | | Reviewed by Hugo Parente <hugo.lima@openbossa.org>
* Centralized the place where the TypeResolver creation is written.Marcelo Lira2012-03-081-11/+25
| | | | | Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Creates type registers for enums in createScopedEnum and createGlobalEnum.Marcelo Lira2012-03-081-4/+0
| | | | Instead of generating the register code.
* Fixed generator to consider conversion rules for the return type of wrapper ↵Marcelo Lira2012-03-081-6/+8
| | | | | | | | | methods. Tests were added. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Lauro Moura <lauro.neto@openbossa.org>
* CppGenerator's writeCopyFunction method now uses ↵Marcelo Lira2012-03-081-8/+4
| | | | | | | | | cpythonToPythonConversionFunction. The new overload of cpythonToPythonConversionFunction, that is. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* CppGenerator's method writeReprFunction now uses writeCppSelfDefinition.Marcelo Lira2012-03-081-10/+7
|
* Functions marked as deprecated will raises a python warning.Renato Filho2012-03-081-0/+7
| | | | Fixes bug #873.
* Improved the generation of argument conversion in modified functions.Marcelo Lira2012-03-081-45/+32
| | | | | | | | Added the SBK_UNUSED macro to libshiboken to prevent compilation warnings. An unit test was added. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* CppGenerator's writeHashFunction now uses writeCppSelfDefinition.Marcelo Lira2012-03-081-4/+3
|
* Method buildAbstractMetaTypeFromString now uses a cache for the types it builds.Marcelo Lira2012-03-081-24/+7
|
* Added tests for a class that its only constructor is the copy one.Marcelo Lira2012-03-081-1/+1
| | | | | | | | This simulates a situation found in QtWebKit's QWebDatabase and QWebSecurityOrigin classes. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* The type checking now pays attention to the <no-null-pointer/> tag.Marcelo Lira2012-03-081-5/+11
| | | | An unit test was also added for it.
* The result of rich comparisons are stored in a return variable before ↵Marcelo Lira2012-03-081-8/+9
| | | | converting them to Python.
* Improved guessCPythonCheckFunction method to produce an AbstractMetaType for ↵Marcelo Lira2012-03-081-5/+14
| | | | | | | | | | known types. This is in opposition of simply returning a string with a custom type check. The details are in the docstring in ShibokenGenerator header. Also added a new modification test and refactored here and there in the sample binding type system.
* Check if the directory exists before writing C++ module definition file.Hugo Parente Lima2012-03-081-0/+1
|
* Removed huge if block to ease the code readbility.Hugo Parente Lima2012-03-081-187/+190
|
* Fixed type system variable replacement for arguments removed with conversion ↵Marcelo Lira2012-03-081-13/+7
| | | | | | | | | | rule. Also added an array argument modification test, and moved AutoArrayPointer from libpyside to libshiboken. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
* Disassembled ShibokenGenerator's writeCodeSnips method.Marcelo Lira2012-03-081-56/+47
| | | | | | | | Also added writeConversionRule methods to CppGenerator. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Removed unnecessary indentation from generated overload selector switch.Marcelo Lira2012-03-081-19/+13
| | | | | Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Improved and fixed the setter and getter writer functions.Marcelo Lira2012-03-081-46/+38
| | | | Also added an unit test to a protected container property.
* Moved many variables names used in generated code to macros.Marcelo Lira2012-03-081-123/+113
| | | | | | | | | | | Also fixed ShibokenGenerator::pythonFunctionWrapperUsesListOfArguments() method to consider call operators. Fixed code snippet variable replacement for when there's only one Python argument in the function. And CppGenerator::writeArgumentsInitializer() was sanitized, with never used code erased. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Revamped the virtual method writer.Marcelo Lira2012-03-081-75/+71
| | | | | It's way less messy now, and uses writeTypeCheck() as it should have been doing from the beginning.
* The rich comparison function writer now makes use of the C++ self variable ↵Marcelo Lira2012-03-081-19/+26
| | | | | | writer. That was the last one.
* Added functions to provide a cleaner enum and flags initialization.Marcelo Lira2012-03-081-65/+62
| | | | | | | | | | | The functions are: Shiboken::Enum::createGlobalEnum() Shiboken::Enum::createScopedEnum() Shiboken::Enum::createGlobalEnumItem() Shiboken::Enum::createScopedEnumItem() Also updated the generator to make use of them.
* Added the ErrorCode helper class to handle the current error code value.Marcelo Lira2012-03-081-27/+14
| | | | | Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Moved the generation of Python result error checking to a single function.Marcelo Lira2012-03-081-27/+15
|
* Sanitized CppGenerator's writeToPythonFunction() method.Marcelo Lira2012-03-081-9/+16
|
* Modified the generation of 'nb_bool' functions to use standard functions.Marcelo Lira2012-03-081-5/+7
| | | | Instead of writing everything on its own.
* Improved coding style in the terrible writeStdListWrapperMethods method.Marcelo Lira2012-03-081-34/+36
|
* Added a method to retrieve a function's argument typeMarcelo Lira2012-03-081-33/+50
| | | | | | | | The method in question is CppGenerator::getArgumentType(), and it resolves any type modification made in the type system. Also remove an unused convenience method for writeArgumentConversion, and unused variable on rich comparison writer function.
* Improved the code of two code generation functions for better readability.Marcelo Lira2012-03-081-30/+36
| | | | | | | | | The functions are CppGenerator::writeRichCompareFunction() CppGenerator::writeOverloadedFunctionDecisorEngine() In the case of the last one, the generated code was also improved.