aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/helper.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when garbage collecting in a non-GUI threadFriedemann Kleint2018-10-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | If a GUI class happens to be detected unreferenced when garbage collecting in a non-GUI thread and is subsequently deleted, crashes can occur for QWidgets and similar classes. The hitherto unimplemented delete-in-main-thread" attribute should be used. Add the missing implementation. Add the field to shiboken's type entry and SbkObjectTypePrivate class and pass it via newly introduced flags to introduceWrapperType(). Defer the deletion when invoked from the background thread and store the list of destructors in a list in binding manager run by Py_AddPendingCall(). Task-number: PYSIDE-743 Task-number: PYSIDE-810 Change-Id: Id4668a6a1e32392be9dcf1229e1e10c492b2a5f5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* libshiboken: Fix clang-tidy warnings about class definitionsFriedemann Kleint2018-08-311-1/+6
| | | | | | | | | | | | - Add override - Use = default for trivial constructors/destructors - Delete copy and move constructors/assignment and move assignment operators where not needed - Use member initialization and remove constructors from simple structs - Use explicit where applicable Change-Id: Id293dd0008b05243e665347f12fd1dee3b1b70f7 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>
* Remove dead / unused code regarding conversionsAlexandru Croitor2017-11-021-41/+0
| | | | | | | | | | | | | | | | | | | | | There's a lot of code that was previously used for doing conversions between C++ / Python types (apparently relying on extensive RTTI / typeid manipulations), which got superseded by a cleaner templated approach. The old code was left behind, and there were a few instances where it was still used even though it wasn't needed, like in QtScript typesystem XML and shiboken's enum handling. Remove the old code, apply the small changes needed to make it work with new the code. This is cleanup to reduce the confusion regarding conversion behavior, and also preparation for a proper implementation of handling "void*" types. Change-Id: I8f16bb31436f9a677bb2d64c7197c4375005b656 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix the signature of the Q*Application constructorChristian Tismer2017-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | Q*Application had PySequence as Parameter, although only QStringList is accepted. That resulted in an implausible error message when a list of, say, Integers was given. This patch - replaces PySequence by QStringList (one more tuple layer), - fixes QCoreApplication to give the same kind of error messages, - renames the shiboken function sequenceToArgcArgv to listToArgcArgv and changes it to only allow list descendents. We also changed signature.typing in one line to display List[str] correctly. I think this belongs more to PySide-331, a fixed qApp. Task-number: PYSIDE-510 Task-number: PYSIDE-331 Change-Id: Ib256c6a2db05a3db826454e1bf1b4729d59a240b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* move everying into sources/shiboken2Oswald Buddenhagen2017-05-221-0/+136
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.