aboutsummaryrefslogtreecommitdiffstats
path: root/cppgenerator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adds support for property setting in QObject derived constructors.Marcelo Lira2010-08-131-15/+51
| | | | | | | | | | | | | | | | | | | | Now QObject properties can be set through named arguments passed to their constructors. E.g.: to add a new property-value pair to a newly created QObject just do: obj = QObject(objectName='bar') this is equivalent to obj = QObject() obj.setProperty('objectName', 'bar') The constructor way to set properties will only work for already existing properties, dynamic properties must be set with the QObject.setProperty method. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Register wrapper class on type resolver.Hugo Parente Lima2010-08-121-0/+4
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Use 0 as default value to Valuepointer.Renato Filho2010-08-101-1/+1
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* C++ wrapper code is generated for functions whose visibility was modified to ↵Marcelo Lira2010-08-041-2/+3
| | | | | | | private. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Create a new copy from object when convert from PyObject to const ref.Renato Filho2010-07-271-1/+1
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Fix char* converterRenato Filho2010-07-271-5/+20
| | | | | | | | Fix tests. Created warnning about return last ref of python object. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Fix elasticnodes segfault.Luciano Wolf2010-07-231-1/+1
| | | | | Reviewer: Renato Araújo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Fix error message, avoiding segfaults when dealing with primitive types.Luciano Wolf2010-07-211-1/+4
| | | | | Reviewer: Renato Araújo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Enable support for NativePointer type (eg.: void *, QChar *, etc)Luciano Wolf2010-07-131-0/+1
| | | | | Reviewer: Renato Araújo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Fixed wrong overload decisor generated code.Marcelo Lira2010-07-131-11/+16
| | | | | | | | | The decisor must check for the number of arguments before calling Converter::isConvertible method, to avoid passing NULL pointers to it. Unit tests were added. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Create referenceMap on demand.Renato Filho2010-07-091-5/+11
| | | | | | | Implemented 'variable-name' support on 'reference-count' tag. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Adapt to recent changed in ApiExtractor API.Hugo Parente Lima2010-07-091-11/+11
|
* Implemented support to properties.Renato Filho2010-07-081-18/+57
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
* Fixes bug#253 - "Segmentation Fault when clicked on ListWidget with TableModel"Hugo Parente Lima2010-07-061-1/+7
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Store class orignal name to future use.Renato Filho2010-07-051-1/+3
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente <hugo.lima@openbossa.org>
* Add support for static fields.Hugo Parente Lima2010-07-021-1/+21
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Do not write setters for const fields.Hugo Parente Lima2010-07-011-5/+7
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Fix bug#256 - "PySide does not support signals with containers."Hugo Parente Lima2010-06-291-0/+18
| | | | | Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
* Fix overload decisor written on constructors.Hugo Parente Lima2010-06-251-4/+4
| | | | | Reviewer: Renato Araújo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Generate cpp file with "using namespace ..." if class inside ofRenato Filho2010-06-251-1/+13
| | | | | | | namespace. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente <hugo.lima@openbossa.org>
* Do not export init_CLASSNAME functions.Hugo Parente Lima2010-06-251-8/+5
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
* Don't use PyAPI_FUNC in cpp files.Catalin Iacob2010-06-231-1/+1
| | | | | | | Using it leads to MSVC error: C2491 definition of dllimport function not allowed This is because dllimport should only be specified when declaring a function not when defining it.
* Implementad generation of objects without namespace if namespace wasRenato Filho2010-06-231-2/+2
| | | | | | | marked to gneration="no"; Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente <hugo.lima@openbossa.org>
* Adds support for named arguments in function calls.Marcelo Lira2010-06-171-33/+177
| | | | | Only C++ arguments with default values will be turned into Python named arguments.
* Fixes minor error in ternary expression.Marcelo Lira2010-06-171-2/+2
|
* Adds a method to tell if multiple Python arguments must be used in the code.Marcelo Lira2010-06-171-0/+8
| | | | | | The CppGenerator::pythonFunctionWrapperUsesListOfArguments(OverloadData) method returns true if the Python wrapper for the received OverloadData should handle with a single or multiple Python arguments.
* Added method fullPythonFunctionName(func) to ShibokenGenerator.Marcelo Lira2010-06-171-13/+2
| | | | | | It accepts an AbstractMetaFunction and returns the full name in Python, including the module namespace. E.g.: "sample.SimpleFile.exists"
* Fix bug#237 - "core dump when call wrong constructor inside of a class"Hugo Parente Lima2010-06-161-0/+7
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
* Overload decisor code modified to separate the decision and caller parts.Marcelo Lira2010-06-151-67/+193
| | | | | | | | This makes the generated code more clear and eases future improvements as named argument support. There is room for performance improvements. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Automatically register all primitive types on TypeResover.Hugo Parente Lima2010-06-101-5/+13
| | | | | Reviewer: Renato Araújo <renato.araujo@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Added Converter<T>::checkType.Hugo Parente Lima2010-06-091-11/+17
| | | | | | This method is needed because you can not call Converter<T>::isConvertible inside a Converter<Y>::isConvertible implementation, otherwise it'll create a 2-step implicit conversion.
* CppGenerator now considers user defined default constructors for primitive ↵Marcelo Lira2010-06-081-1/+5
| | | | | | | types. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
* Avoid crashing CppGenerator if the module entry couldn't be retrieved.Marcelo Lira2010-06-031-1/+3
|
* Added support for protected fields when not using the "protected hack".Marcelo Lira2010-06-031-9/+27
| | | | Tests were also added.
* Fixes code generation for classes with private destructors.Marcelo Lira2010-06-021-1/+13
| | | | | | This fix is specific for the cases when the "protected hack" is turned off. Also added some tests.
* Generator improved to handle protected enums without the protected hack.Marcelo Lira2010-06-021-17/+76
|
* Fixes generation of classes with protected virtual destructors.Marcelo Lira2010-05-311-1/+7
| | | | | The problem appears when the binding is generated without the protected hack.
* Fixed use of constructor for code snip.Renato Filho2010-05-261-2/+2
| | | | | Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>, Marcelo Lira <marcelo.lira@openbossa.org>
* Fix segfault in function return modification.Renato Filho2010-05-241-2/+6
| | | | | Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
* Cosmetic changes.Hugo Parente Lima2010-05-211-38/+44
| | | | | | | | | - Don't use stream operator on macros. - Avoid use of INDENT << INDENT. - Rename some variables on generated code to follow our coding style. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
* Add a call to PySide::initQtMetaType for every type when the pyside ↵Hugo Parente Lima2010-05-201-1/+9
| | | | | | | extensions mode is on. Reviewer: Renato Araújo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
* Moved creation of MetaObject before injection code on constructor.Renato Filho2010-05-191-7/+9
| | | | | Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
* API fixes.Renato Filho2010-05-181-1/+2
| | | | | | | | | * Export enums without macro * Declare virtual destructor on all classes with virtual functions * Fix extern "C" declaration scope Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Marcelo Lira <marcelo.lira@openbossa.org>
* Export signals to the generated cpp files.Luciano Wolf2010-05-171-2/+44
| | | | | Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
* generate code necessary to register signal and slot.Renato Filho2010-05-171-1/+11
| | | | | eviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
* Replaced current generated code to DynamicQMetaObject to new way, toRenato Filho2010-05-131-3/+1
| | | | | | | allow collect PyType info. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
* Created userdata on Python type object.Renato Filho2010-05-101-7/+19
| | | | | | | User type userdata to store metaobject information. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
* Register values types as object types too.Renato Filho2010-05-071-4/+6
| | | | | | | Fixes bug #121. Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
* Known what flag to use on PyBuildValue when a container is used.Hugo Parente Lima2010-04-291-0/+1
|
* Use qualified C++ names on multiple inheritance helper functions.Hugo Parente Lima2010-04-291-7/+8
|