aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtQml/bug_997.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: handle unused imports and fix type issuesCristián Maureira-Fredes2024-12-121-1/+1
| | | | | | | | | | Many modules were imported but unused in our tests. Additionally, some type hint issues were solved. Pick-to: 6.8 Change-Id: Ic2368690e9a6ce0fffea812206185aa4f3dc3c58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-201-0/+1
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* testing: modernize UsesQApplication and remove other versionsChristian Tismer2023-03-161-2/+2
| | | | | | | | | | | | The last change to UsesQApplication can be generalized to be able to remove the QtCore and QtGui versions. Instead, the module and class to use are computed from the content of sys.modules . Task-number: PYSIDE-1564 Change-Id: Iac1fe3a2d6bb5a9f7638eb889f55b079cb55c272 Pick-to: 6.4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-271-27/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PyPy: Fix timeout in bug_997.py, take 2Friedemann Kleint2022-03-121-10/+10
| | | | | | | | | | | | | | | Amends 6ffb2c3e852e2153b0c58ac659e7d8b60b691f19. The QML component is usually complete even before the window shows. Signal complete from QML and do not enter the event loop if that is the case. Pick-to: 6.2 Task-number: PYSIDE-1843 Task-number: PYSIDE-535 Change-Id: I7c68b7e16c197d9ec97e83cebb5b7919a5de71dc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* PyPy: Fix tests with timeoutsFriedemann Kleint2022-03-101-3/+4
| | | | | | | | | | | | | | | bug_997.py: Stop the timer. qqmlnetwork_test: Move the closing logic to a local function since the network factory classes are in a different thread. qquickitem_grabToImage.py: Use a longer timeout. Pick-to: 6.2 Task-number: PYSIDE-1843 Task-number: PYSIDE-535 Change-Id: I34a09739431cec4de8e68f455dc771a03527e526 Reviewed-by: Christian Tismer <tismer@stackless.com>
* tests: Use QGuiApplication where applicableFriedemann Kleint2021-12-061-2/+2
| | | | | | | Pick-to: 6.2 Change-Id: I9401fa0721ea6e3df413c5a9fccb5e802d57295d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Speed up test bug_997.pyFriedemann Kleint2021-12-021-7/+17
| | | | | | | | | Instead of waiting, add a timer checking whether the component is complete and close the view. Pick-to: 6.2 Change-Id: I8b711fe685e508532a89f39354676caf658bc90f Reviewed-by: Christian Tismer <tismer@stackless.com>
* qml: replace context properties and code updatesCristián Maureira-Fredes2021-07-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the qml code in the repository was outdated, and followed bad practices, like context properties. Complementary, after the major updates for Qt6 most of the code was not relying on the new ways of register types (singletons, and using the decorator QmlElement). Drop the context property usage in the following examples: - signals/qmltopy1 - signals/qmltopy2 - signals/pytoqml2 - usingmodel - quickcontrols2/gallery - textproperties Additionally: - all the tests related to context properties - tutorials/qmlapp - tutorials/qmlsqlintegration - Removing 'scrolling' example - Fixing some flake8 warnings Change-Id: I649248c0149876bf2bf94e78e27cef7110f42f1d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io>
* pathlib: extend QUrl.fromFilePath to support os.PathLikeChristian Tismer2021-07-021-1/+1
| | | | | | | | | | | [ChangeLog][PySide6] The function QUrl.fromFilePath supports now the os.PathLike structure in addition to string arguments. The new interface was applied, everywhere. Change-Id: I2d888383c54b7f964e448d210264c7e902759f43 Pick-to: 6.1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* tests: use exec() instead of exec_()Cristian Maureira-Fredes2021-05-041-1/+1
| | | | | | Change-Id: I0868f70d7dfeafa7762296da5aa6efc2f32fcb5e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Tests: Fix some space-related flake8 warningsFriedemann Kleint2021-04-291-0/+1
| | | | | Change-Id: I9b0ad08839bf1246620c557ec304dfa90882907b Reviewed-by: Christian Tismer <tismer@stackless.com>
* Tests: Use per-class importsFriedemann Kleint2021-04-271-5/+7
| | | | | Change-Id: I6dac1f54152fecab7af6831bc3c813a016408aae Reviewed-by: Christian Tismer <tismer@stackless.com>
* Port tests to pathlibFriedemann Kleint2021-04-061-2/+5
| | | | | | | | | | | | | Replace test helper function adjust_filename() by pathlib handling. Add asserts on the existence everywhere. Add error handling with helper functions to QML loading, printing the error message in the assert statements. Task-number: PYSIDE-1499 Task-number: PYSIDE-1532 Change-Id: I206929effb37f21d1f621be921bb996162398b4d Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Switch from os.path to pathlib.Path, systematic test changesChristian Tismer2021-02-081-1/+2
| | | | | | | | | | | | | | | | | | This patch does the systematic changes on all tests. Note that there was a bug in principle: os.path was used without importing os.path This worked through the way how the os module initializes itself, but you always will find the explicit import in the python library. But the problem is going away anyway after the transition to pathlib.Path :) Change-Id: I95144d7f9bb07a38376c3aa428df663f2e64bcb7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Rename PySide2 to PySide6Friedemann Kleint2020-11-021-0/+59
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>