aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/samplebinding/enum_test.py
Commit message (Collapse)AuthorAgeFilesLines
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-281-178/+0
| | | | | | | | Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* remove traces of Python2 from Python codeChristian Tismer2020-10-271-5/+2
| | | | | | | | | | | | It will be assumed that Python is always Python 3. All checks for Python 2 are removed. This is the first part of cleaning up the Python code. We will then also clean the C code. Task-number: PYSIDE-904 Change-Id: I06050a8c1a18a19583f551b61775833a91673f4e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Remove Python2 from shiboken testsFriedemann Kleint2020-09-031-8/+1
| | | | | | | Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I78f18430eecf37c6a66593ac3a725d92b5a6c061 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Fix funny Python 2.7 glitchesChristian Tismer2020-02-191-0/+3
| | | | | | | | | | | | | | | | | | There are two funny glitches that happen with Python 2.7, only. One was the smartpointer test which only failed because Python 2.7 has no list.clear method. This test could be simplified since the tested object is a true list. The other one appeared after the introduction of the BUILD_DIR variable. Python 2.7 failed the enum_test.py because it now needs an import of shiboken2 to do initialization of the signature module. That is a timing problem that we did not have before we had BUILD_DIR. It makes me curious why this bug could slip through the COIN tests! Change-Id: I9b509e9998ad9f40431a8b148892429c0e865393 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix running the shiboken tests for Python 3.8/WindowsFriedemann Kleint2020-02-121-0/+4
| | | | | | | | | | | | | | | | | | | On Windows, DLL directories can no longer be specified via the PATH environment variable. They need to be added via os.add_dll_directory(). In order to fix this, move the entire environment setup from CMake to a python helper and set a single environment variable BUILD_DIR pointing to the build directory from CMake. In addition, this has a huge advantage: The tests can also be executed much more easily without ctest from the command line by just setting BUILD_DIR instead of a complex manipulation of PATH/LD_LIBRARY_PATH. Change-Id: I7dceafd2c38fed5320a534322f265489657b95d3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix wrongly generated code for enums passed by const-refFriedemann Kleint2018-05-161-0/+8
| | | | | | | | | | | | | | First encountered in: QtScxmlEvent::setEventType(const EventType &); The metatype was wrongly detected as NativePointerPattern in AbstractMetaType::determineUsagePattern(). Introduce a helper for detecting plain const-ref and use that consistently. Change-Id: I6b105bc99ae63e4737c5d628e79f23b7acbcca3d 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>
* Type system: Add attribute indicating C++ 11 enum classesFriedemann Kleint2018-02-281-0/+5
| | | | | | | | | | | | | Introduce enumeration for the type to EnumTypeEntry which can be specified by the boolean "class" attribute. For the enum classes, the value names need to be qualified by the enum name to match the C++ API. For the C++ generator, add an overload to Shiboken::createScopedEnumItem() that takes a PyTypeObject and add the enum items to the enum so that the name is in the enum scope. Change-Id: Ia0e469d13b08c196b9ddd965b9cf3cc62a38630b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* move everying into sources/shiboken2 (5.9 edition)Oswald Buddenhagen2017-05-221-0/+168
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.