aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/QtQml
Commit message (Collapse)AuthorAgeFilesLines
* Rename PySide2 to PySide6Friedemann Kleint2020-11-0248-3074/+0
| | | | | | | | Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtQml: Implement QmlElementMaximilian Goldstein2020-10-221-4/+6
| | | | | | | | Equivalent to QML_ELEMENT in C++, this enables users to register classes for use in QML by using the QmlElement decorator. Change-Id: I697e486ef58b18cce4c310e4b556e28735a16d45 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Adapt to recent changes in qtbaseFriedemann Kleint2020-10-021-3/+4
| | | | | | | | | | | | | | | | - Remove QProcess::pid(), adapt test (qtbase/0f8848b7e25e4d8fb9265ff6e0aa31946addd741) - Remove enum from QPrinter - Add enum GrabTransition to QPointingDevice - Remove deprecated functions from QByteArray, QXmlStreamAttributes - Adapt Qml tests - Remove fake property from QLayout Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I98cc90723cbeda15b23c5b22d026cb2ab9a358ff Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtQml: Improve ListPropertyMaximilian Goldstein2020-08-262-0/+82
| | | | | | | | | * Support new methods * Do more type checking * Avoids segfaults when calling unimplemented methods Change-Id: Id0cfbc2f9a79c0f916db0bb9e950d707dc5da478 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtQml: Move uncreatable type test into separate fileMaximilian Goldstein2020-08-264-36/+84
| | | | | Change-Id: I01b052ffa85543d5779a87a331c78f77a6529e95 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Tests: Add registersingletontype.py to list of testsMaximilian Goldstein2020-08-191-0/+1
| | | | | Change-Id: I8b3925ceab632b0d5e0e5511ab6a86df594f96b0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Test/QtQml: Fix registertype.pyMaximilian Goldstein2020-08-191-1/+1
| | | | | Change-Id: Ib82cac47882220c53f688e53c9cf6429b9fa138a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-07-242-2/+3
|\ | | | | | | Change-Id: Ib38f2f4be9f214df79454ff972ccd20fbfc6d1cd
| * Test signal_arguments.py: Use Qt Quick Controls 2Friedemann Kleint2020-07-232-2/+3
| | | | | | | | | | | | | | | | | | Qt Quick Controls 1 is deprecated and has been removed in Qt 6. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: If70fde907c3984b0593186a9b570a921f270d45c Reviewed-by: Christian Tismer <tismer@stackless.com>
* | PySide2: Add qmlRegisterUncreatableType()Friedemann Kleint2020-07-242-4/+75
| | | | | | | | | | | | | | | | | | | | | | Extend the Quick register helper function by the bool creatable and string noCreationReason parameters, extract a QML helper taking the same parameters and add the overload. Task-number: PYSIDE-574 Change-Id: I955dbd158c7b22d2637bbac464937f9fda6d7901 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Implement qmlRegisterSingletonTypeMaximilian Goldstein2020-07-232-0/+122
|/ | | | | | Task-number: PYSIDE-574 Change-Id: I8828e22da42a5a47b207bb2e02d2f4fe67746a0b Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix running the PySide2 tests for Python 3.8/WindowsFriedemann Kleint2020-02-2821-21/+67
| | | | | | | | | | | | | | | | | | | | | 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 the environment variables BUILD_DIR and QT_DIR pointing to the build directory and Qt directory, respectively, 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 and QT_DIR instead of a complex manipulation of PATH/LD_LIBRARY_PATH. Change-Id: I7d518ccab19ca184c3112a126c779d4a6d7c6c5e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Pyside2/tests: Split the helper moduleFriedemann Kleint2020-02-2020-21/+37
| | | | | | | | | | The classes of the helper module were defined in the __init__.py file with complicated logic to test for presence of the modules. Split the classes apart and empty the __init__.py file (still required for Python2). Change-Id: I4f4971f9a48e2961233da5585aa0df53bfbb9c7a Reviewed-by: Christian Tismer <tismer@stackless.com>
* Make PySide2 tests using the helper modules from 'util' self-containedFriedemann Kleint2020-02-1920-1/+84
| | | | | | | | | | Add the relative import path to locate the modules "helper" and "py3kcompat". The tests can then be launched from the command line without the ctest environment. Change-Id: Ia50663d7381b52cb248de3e4d23002a195ca9139 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Change QtQml tests file permissions to 644Cristián Maureira-Fredes2019-07-1734-0/+0
| | | | | Change-Id: I0447da5e1ace3f6acc930aa4296576ec447f1be5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add support for parameterNames in SignalsCristian Maureira-Fredes2019-07-043-0/+127
| | | | | | | | | | | | | | | | | | | | | | There were many uses cases when a proper interaction between Python and Qml was needed, one of them was the case to emit signals from Python an get those values via an argument name in QML. A simple example describing this situation can be found in PYSIDE-634: Python: sumResult = Signal(int, arguments=["sum"]) sumResult.emit(42) Qml: onSumResult: console.log(sum) // will print 42 A test case based on the same example was added. Change-Id: I0908f97d88eaadc0c02d81bc4daca936f72f6c6a Fixes: PYSIDE-634 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Cleanup pointer and trailing whitespace (omissions)Christian Tismer2019-06-252-2/+2
| | | | | | | | | | | | | | | | | The "Cleanup pointer whitespace" patch was augmented by some C++11 changes. Unfortunately, this was done in the same commit, and so some old whitespace that was removed could re-appear invisibly, since it was in the original version. This fix tries to remove all trailing whitespace and also adds a few " *" corrections that were lost. The "type *" entries in XML files were changed back to "type*". Change-Id: Ic5c945ad64a47455fb15eebdf184b126af5ecd1d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Pyside2: Add free functions from namespace QtQmlFriedemann Kleint2019-01-041-1/+5
| | | | | | Change-Id: Ib4a9e8be733a3c8012e19c509ed98f87aad7cb6d Fixes: PYSIDE-892 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix QtQml/bug_814.pyCristian Maureira-Fredes2018-06-221-1/+1
| | | | | | | | | | Since roleNames() expects a QByteArray we should pass the roleName as bytes, not a Python string. Task-number: PYSIDE-722 Change-Id: I67bf78503cd1e6acf43aab3531bf3b184e9a9159 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change license from all the filesCristian Maureira-Fredes2018-05-0340-40/+40
| | | | | | | | | | | | | | | | | 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-2740-40/+40
| | | | | | | | | 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>
* Stabilize QtQml/bug_847.pyFriedemann Kleint2017-10-271-1/+8
| | | | | | | | | Add more checks for QML loading. Wait until the window is exposed until starting the safety timer and increase its interval. Task-number: PYSIDE-431 Change-Id: I6225f2357d9576be15c6134d26982939698a9984 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* move everying into sources/pyside2Oswald Buddenhagen2017-05-2241-0/+2463
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.