aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/typesystem_templates.xml
Commit message (Collapse)AuthorAgeFilesLines
* Place templates per moduleCristian Maureira-Fredes2018-11-281-507/+0
| | | | | | | | | | | | | | | | | | | | | | | | There is a main template file that hosts most of the code-templates we use in the typesystems, but there were still several templates written in each module-typesystem file. The templates that are used on different typesystem are now placed in: sources/pyside2/PySide2/templates/core_common.xml Additionally, the templates used only by a certain module, are placed next to it, e.g.: sources/pyside2/PySide2/templates/widgets_common.xml Some simple templates were moved to the snippets files too. Task-number: PYSIDE-799 Change-Id: I4f355cf2ae983aba9e85414e910550189cd18dcb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove createIndex method that uses PyObject*Cristian Maureira-Fredes2018-11-131-7/+0
| | | | | | | | | | | | | | | | We have a proper `void*` treatment, so the extra function does not seems to be necessary. The injected code used for the interalPointer method was also removed since is better to leave on shiboken hands the conversion between void* and python types. A couple of test were adapted since wrongly used ModelIndex with Python objects. Change-Id: I082637c7d1dd1bb0f50a3c453513e5d722f4b783 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Friedemann Kleint2018-11-011-1/+1
|\ | | | | | | Change-Id: I5a8f41a2236601b7c5466586dd1cfc92c1afc391
| * QIODevice bindings: Fix invalid reads in read() functionsFriedemann Kleint2018-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running test in debug mode on Windows, failures occurred: File "sources/pyside2/tests/QtCore/qfileread_test.py", line 41, in readData return super(FileChild2, self).readData(maxlen) UnicodeDecodeError 'utf-8' codec can't decode byte 0xcd in position 21: invalid continuation byte File "C:/dev/pyside/pyside-setup511d/sources/pyside2/tests/QtCore/qfile_test.py", line 57, in testBasic self.assertFalse(obj.getChar()[0]) UnicodeDecodeError 'utf-8' codec can't decode byte 0xcc in position 0: unexpected end of data This is caused by missing initializers and terminating \0 characters in the QByteArrays introduced by ca806b438e8a27dc4562ac806d189765e93e09e5, unearthed by MSVC helpfully filling unitinialized data with random values. Fix by using a QByteArray of size n + 1 filled with 0. Initialize the character variable in the fix_char* template. Task-number: PYSIDE-40 Change-Id: Ia604841a89f1b1b9564c16d2f23cd9f7c20f5628 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | PySide2: Pass on the result from native event filtersFriedemann Kleint2018-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | Add missing conversion of the long *result variable. Amends f4a6d74852b0ba6711195a9c3fc9356e677a3409. Task-number: PYSIDE-790 Change-Id: I2db9ffd80b569f68b714b21e2adaa3e34949af83 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | PySide2: Re-enable native event filtersFriedemann Kleint2018-10-261-0/+20
| | | | | | | | | | | | | | | | | | | | | | Add QAbstractNativeEventFilter. Re-add the native event filter functions on QWindow and QWidget, modified to return a tuple bool/long, using a modification from PySide. Task-number: PYSIDE-790 Change-Id: I86fef1a0c168e69fb3391cd882ea05190985384d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | PySide2: Base the QMatrix<R>x<C> on QGenericMatrixFriedemann Kleint2018-09-141-10/+0
|/ | | | | | | | | | After fixing non-type templates, QGenericMatrix can be specified as their base class. The inherited functions can then be used instead adding templates. Change-Id: I5ec435cf04d8443626a86a78643e2ad5d29f4a5e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Invert return tuple order in QFont dialogsCristian Maureira-Fredes2018-08-071-0/+19
| | | | | | | | | | | The return order was wrong, and since it is based in templates used by other methods, a new template needed to be created. Task-number: PYSIDE-755 Change-Id: I905529844063f7e913f264e68cfceb6ce7b45358 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Pep 384 Final Cut: Remove PepTypeChristian Tismer2018-07-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | While trying to document the Limited API Project, it suddenly struck me: We can make the patch much much simpler and implement it without the necessity to have an extra PepType! Now I am happy to continue the documentation, because it is now no more improvable. This version will last as long as the layout of PyTypeObject does not change substantially. When that happens, then we need to rewrite stuff with the according PyType_GetSlot() access functions. These access functions will until then be complete enough so that we can live without the tricks like inventing a reduced PyTypeObject as was done in the current implementation. Task-number: PYSIDE-560 Change-Id: I49849cc377baa6794a5b53292691e21d6e2853ab Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* PEP 384-squash: Implement PEP 384Christian Tismer2018-05-301-2/+3
| | | | | | | | | | This is the condensed checkin of 18 commits which created the implementation of PEP 384. Task-number: PYSIDE-560 Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* 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>
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-03-051-0/+6
|\ | | | | | | Change-Id: I452d3a0a04e282b678879132ca1b3a272910ef04
| * Fix QValidator fixup() behaviorCristian Maureira-Fredes2018-03-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The return value from the fixup() method was ignored leaving an Intermediate or Invalid input intact. This was solved injecting code to the native wrapper for the fixup() method that allows to change its value. A test case is provided. Task-number: PYSIDE-106 Change-Id: I1d796955178dbdbcfff90adb6ede5c8b2dd1acc3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add QOpenGLFunctions::glGetString(), QOpenGLExtraFunctions::glGetStringi()Friedemann Kleint2017-11-291-0/+8
|/ | | | | | | | Modify the return type to be a QString. Task-number: PYSIDE-516 Change-Id: Ic79d4c69956cd439b60face4ce87788c451bfa96 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Support the qApp macro correctly, final version incl. debugChristian Tismer2017-10-271-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For short the new features: - there is a qApp in QtCore, QtGui and QtWidgets for compatibility, and also in __builtins__ for a true macro-like experience. - if you delete any qApp variable, the Q*Application is reset and you can start over. Long description: There is a qApp macro in Qt5 which is equivalent to Q*Application.instance() . Python does not have macros. Both PyQt5 and PySide2 have an according structure in QtWidgets. In the case of PySide2, the qApp variable is first initialized to None and later to QApplication(). This does not reflect the original sense of the qApp macro, because - it only handles QApplication, - it does not handle destruction. This "macro" should live in QtCore, but both PyQt5 and PySide2 decided to put this in QtWidgets. As a compromize, I propose to put qApp into all three modules, and into __builtins__ as well, so wherever you create an application, you find this "macro" in place. While changing the code, I stumbled over the template set_qapp_parent_for_orphan. I tried to make sense out of it and finally removed it. There were no side effects but bug PYSIDE-85 is gone, now. With some extra effort, I created a singleton qApp that changes itself. This way, a true macro was simulated. Note that this was not possible with a garbage collected variable, and I had to make shiboken aware of this. As the final optimization, I turned qApp also into a fuse variable: Delete any qApp variable and Q*Application will finish when there is no extra reference. Task-number: PYSIDE-85 Task-number: PYSIDE-571 Change-Id: I7a56b19858f63349c98b95778759a6a6de856938 Reviewed-by: Christian Tismer <tismer@stackless.com>
* move everying into sources/pyside2Oswald Buddenhagen2017-05-221-0/+474
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.