aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest/signalinstance_equality_test.py
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Tests: Fix some flake warningsFriedemann Kleint2023-11-281-0/+2
| | | | | | | | Mostly spacing related. Pick-to: 6.6 Change-Id: I748a8a06f456c5d4bafb94c397c43b3b2ee9e3e9 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* SignalInstance: Fix more very old errors due to unlucky exposureChristian Tismer2023-03-091-2/+11
| | | | | | | | | | | | | | | | | | | | | SignalInstance unfortunately can be created directly without a calling Signal. This is an old design error that cannot easily be reverted because that is now the API. Fixed by printing "(no signature)": * print(SignalInstance()) # prints "(no signature)" Fixed by producing a runtime error: * SignalInstance().connect(lambda: None) * SignalInstance().disconnect() * SignalInstance().emit() Thanks to <bers bers> who reported them all. Task-number: PYSIDE-79 Change-Id: I92598d963b9796453fbd17c1526a674fa007e5e8 Pick-to: 6.4 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@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>
* signal: Fix equality test for inherited signals, updateChristian Tismer2022-01-121-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | Signal initialization was improved by walking the MRO to find all signals. But this had the side effect that signals could be overwritten. This implementation resolves signals only once per name, so that only the most recent signal places an instance into the instance dict. Note: this does _not_ solve the equality problem of super().signal == super().signal # fails because the super call triggers a new signalInstance in the parent. This has to be addressed in a bigger rewrite if desired. [ChangeLog][PySide6] Signal initialization now respects the order of subclasses in the mro(). Change-Id: I7481576798ca272ebebf8e9a5ba875cfc94e8361 Fixes: PYSIDE-1751 Pick-to: 6.2 Task-number: PYSIDE-1431 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: build multiple inheritance pass-through for SignalsChristian Tismer2021-12-141-0/+68
Signals always had support for calling a method that is sitting at the same place as a signal with the same name. This is done by letting the signal act as a proxy for the hidden method. Lately, the equality check of signal instances was corrected (PYSIDE-1431) which had the side effect that now some method lookups failed in multiple inheritance. This patch extends the search for homonymous methods to look not only in the signal attribute, but extends the lookup along the whole tp_mro. The related tests were slightly re-arranged to keep them together. [ChangeLog][PySide6] Signal instances allow pass-through of methods with the same name, explicitly and with multiple inheritance. Change-Id: I92828855ada7aa8d98517918008b93fc79629d8e Fixes: PYSIDE-1730 Task-number: PYSIDE-1431 Pick-to: 6.2 5.15 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>