aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2/cppgenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* shiboken: Replace more character #defines by char constantsFriedemann Kleint2018-09-051-1/+1
| | | | | | | | Break up macro concatenation and streamline code. Replace PYTHON_SELF_VAR by "self" since it is not going to change. Change-Id: Ibfffd12bd44eb4dc3390b0a0a2da99e003b04bdc Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* shiboken: Fix the allow-thread attribute to actually have an effectFriedemann Kleint2018-07-251-1/+3
| | | | | | | | | | | | | | | | Previously, calls to BEGIN_ALLOW_THREADS/END_ALLOW_THREADS were always generated since the value of XML attribute was not used. Fix it to actually use the value. Since having it default to "no" caused a number of deadlocks (related to thread functions or functions calling a virtual function (potentially reimplemented in Python), introduce "auto" as default value. "auto" turns off BEGIN_ALLOW_THREADS/END_ALLOW_THREADS for simple getter functions. Task-number: PYSIDE-743 Change-Id: I4833afef14f2552c75b3424417c2702ce25cb379 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix some clang-tidy warnings in shibokenFriedemann Kleint2018-07-231-4/+5
| | | | | | | | | | | | | | | | | - 'else if' after return/break/continue - Use const ref for complex arguments passed by value where possible - Fix 'if (foo) delete foo' to 'delete foo' - Use container.isEmpty() instead of container.size() in checks - Use ' = default' for trivial constructors/destructors - Use range based for where possible - Complete constructor initializer lists - Fix invocations of static methods - Replace some reinterpret_cast by static_cast - Remove unused variables/fields - Use initializer lists for return types Change-Id: Id5b44a2f9d429f66ef069d532a1cd31df796d38e Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Remove unused code from the generatorsFriedemann Kleint2018-06-281-3/+0
| | | | | Change-Id: I88c4148000acba2ba1e2013fe587e7f5fbe6c2ca Reviewed-by: Christian Tismer <tismer@stackless.com>
* Change license from all the filesCristian Maureira-Fredes2018-05-031-1/+1
| | | | | | | | | | | | | | | | | Removing the word 'project' from all the headers, and changing the PySide reference from the examples to Qt for Python: The following line was used inside the source/ and build_scripts/ directory: for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done and the following line was used inside the examples/ directory: for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Rename PySide references to Qt for PythonCristian Maureira-Fredes2018-04-271-1/+1
| | | | | | | | | When referring to the project one should use "Qt for Python" and for the module "PySide2" Change-Id: I36497df245c9f6dd60d6e160e2fc805e48cefcae Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Rename Generator::fileNamePrefix() to fileNameSuffix()Friedemann Kleint2018-03-211-1/+1
| | | | | | Change-Id: If7464f643fca74aa06099ca4b9905b34bd077193 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-09-281-2/+3
|\ | | | | | | Change-Id: I47521e21977b1f17fcc65590f565270b2440a48b
| * Implement introspection with __signature__ packageChristian Tismer2017-09-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature module was turned into a package under 'PySide2/support/signature'. The package is completely isolated so that nothing is leaking into the normal import machinery. The package is also not initialized unless a __signature__ attribute is accessed. The only change to Python during a PySide run is the existence of the __signature__ attribute. As a side effect, all tests run at the same speed as before this extension. The module does not actively import PySide modules. Instead, it inspects sys.modules and reloads its mapping.py if needed. Example usage: >>> PySide2.QtWidgets.QGraphicsAnchorLayout.addAnchors.__signature__ >>> PySide2.QtWidgets.QGraphicsAnchorLayout.__signature__ The module has been thoroughly tested on macOS. I consider this ready. Task-number: PYSIDE-510 Change-Id: Ibb231a7fbb4ccc1a7249df55e3881a4e21a19c0d Reviewed-by: Christian Tismer <tismer@stackless.com>
| * move everying into sources/shiboken2Oswald Buddenhagen2017-05-221-0/+370
| | | | | | in preparation for a subtree merge. this should not be necessary to do in a separate commit, but git is a tad stupid about following history correctly without it.
* move everying into sources/shiboken2 (5.9 edition)Oswald Buddenhagen2017-05-221-0/+370
in preparation for a subtree merge. this should not be necessary to do in a separate commit, but git is a tad stupid about following history correctly without it.