aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest
Commit message (Collapse)AuthorAgeFilesLines
* PySide6/Property: Fix read-only properties when using the decorator syntaxFriedemann Kleint2025-11-031-0/+77
| | | | | | | | | | | The @setter decorator causes the property to be recreated with Py_None set for the non-existent members, apparently due to a long-closed Python bug (see_property_copy()). As a band-aid fix, check for Py_None. Fixes: PYSIDE-3227 Pick-to: 6.10 Change-Id: Ib818e9930bd598306270377e26e625bfa9692a92 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Lazy Load: Remove exclusion for testbindingFriedemann Kleint2025-08-051-2/+2
| | | | | | | | | Use .value to compare against the Enum value in a hidden namespace. Task-number: PYSIDE-2404 Change-Id: I2a7bda2aeac6aa69b3d38d2e377ac9b1127e1fee Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Enumerations: Enable the forgiveness feature ENOPT_NO_ZERODEFAULT for 3.14Friedemann Kleint2025-07-281-3/+26
| | | | | | | | | | | Adapt the op codes for detecting a parameterless __init__() call in enum code to 3.14. Pick-to: 6.9 6.8 Task-number: PYSIDE-3147 Task-number: PYSIDE-1735 Change-Id: I7dcaaae82b4c136db5dbd9ef36519783b73c15ce Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Tests: Fix remaining flake 8 warningsFriedemann Kleint2025-07-282-3/+2
| | | | | Change-Id: I3eae10ca459eae88632357ae5334c93fa2d0254f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Tests: Fix flake 8 warning F841 local variable is assigned to but never usedFriedemann Kleint2025-07-281-1/+1
| | | | | | Pick-to: 6.9 6.8 Change-Id: Idff689832a68fadf6c4492032df3ed94b9343389 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Tests: Fix flake 8 warning E402 module level import not at top of fileFriedemann Kleint2025-07-282-4/+4
| | | | | | Pick-to: 6.9 6.8 Change-Id: Ibcd0ee3190638ac224c6dd770de0dffe93ed9dda Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Disable GIL: Remove NoGIL codeFriedemann Kleint2025-07-091-1/+0
| | | | | | | | The new approach is disable-gil. Task-number: PYSIDE-2221 Change-Id: I1b1e783883aa2e94f62548385d3f19b61cf6d1ed Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Include this non-Qt module into normal testingFriedemann Kleint2025-07-071-1/+2
| | | | | | | | | | | QtAsyncio has tests like other modules, although they were not automatically tested. Add a way to specify this kind of modules without conflicts in cmake. Initial-patch-by: Christian Tismer <tismer@stackless.com> Task-number: PYSIDE-769 Change-Id: I9897f37c98c400846af77d18533486fb048aca80 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add tests that were missing from CMakeLists.txtFriedemann Kleint2025-07-041-0/+1
| | | | | | | | Some tests were also missing imports and checks, add them as well. Pick-to: 6.9 Change-Id: Id73b7ab0ec06e5d87613719d0b2f267fa165db77 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix QMetaEnum conversions into QVariantRenato Araujo Oliveira Filho2025-04-233-0/+10
| | | | | | | | | Make sure to store QtEnums in QVariant when the enum has a metatype. Fixes: PYSIDE-3084 Change-Id: I94b89f89e6fb3c58560325f2a6843a5260d86557 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Print erroneous PYI files, but only if COIN is presentChristian Tismer2025-02-281-1/+1
| | | | | | | | | It turned out to be boring if the PYI files are printed locally. Task-number: PYSIDE-3012 Change-Id: Ic47e1828367c1f00c263451a6090cb5e03313103 Pick-to: 6.8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Print erroneous PYI files for COIN support (cleanup)Christian Tismer2025-02-271-1/+0
| | | | | | | | | Reason: We cannot find an error which happens in CI on Windows 11, only Task-number: PYSIDE-3012 Change-Id: I99a2d72e49027cc76767c70bdc94d8d3f6451782 Pick-to: 6.8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Print erroneous PYI files for COIN supportChristian Tismer2025-02-251-1/+21
| | | | | | | | | Reason: We cannot find an error which happens in CI on Windows 11, only Task-number: PYSIDE-3012 Change-Id: I8f2e4c56ee8c81e8d3b348c624be5df80d5df275 Pick-to: 6.8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Make the error messages more verboseChristian Tismer2025-02-201-1/+1
| | | | | | | | | | | | | The --pretty switch shows a little context. If that does not help, we will have to send the whole PYI file back from CI. Task-number: PYSIDE-2846 Task-number: PYSIDE-3012 Change-Id: I45a4111c6ea78bf6c487077c43eb37b946602ec8 Pick-to: 6.8 Reviewed-by: Ece Cinucen <ece.cinucen@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix crash of signals with object-type parameter being passed by const-refFriedemann Kleint2025-02-113-0/+21
| | | | | | | | | Add a further indirection in callPythonMetaMethodHelper() when only a pointer conversion is available for a const-ref parameter. Task-number: PYSIDE-3004 Change-Id: I6ec7c5a9d4d30c8e4973ec79534d5f3eb3bf8204 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide6/Tests: Use fully qualified enumerationsFriedemann Kleint2024-12-205-41/+47
| | | | | | | | | As a drive-by fix flake errors. Pick-to: 6.8 Task-number: PYSIDE-1735 Change-Id: I9829b011fee78fc8edd1aefdd3066ae89e63644b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Remove unnecessary use of 'object' in class constructionremoteobjectsdevCristián Maureira-Fredes2024-12-183-7/+7
| | | | | | | | | | | Considering we are not compatible with Python 2 anymore, we can drop the 'object' explicit inheritance in the class declaration. Pick-to: 6.8 Change-Id: Iac3a95aa9721c3ff1a755f457c0936ca157a8470 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix trailing empty linesFriedemann Kleint2024-12-1310-10/+0
| | | | | | Pick-to: 6.8 Change-Id: I1a5964463f703ade0657816cb974206355a5ae5b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* tests: handle unused imports and fix type issuesCristián Maureira-Fredes2024-12-126-19/+16
| | | | | | | | | | 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>
* Raise Python version to 3.8Friedemann Kleint2024-12-031-9/+0
| | | | | | | | | | | | | | Fix some oversights of previous changes: - Bump limited API - Fix CMake files - Remove outdated version checks from Python code - Adapt some documentation Pick-to: 6.8 Task-number: PYSIDE-2943 Change-Id: Id8d9c4c6bb0629948de28beb3c4274991f84ff08 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* type hints: add __hash__, fix __copy__, __repr__ and __dir__Christian Tismer2024-11-081-1/+3
| | | | | | | | | | | | | | | The other missing things are sequence and mapping methods which need some more support from cppgenerator. Will be added later. typing.Self is only known since Python 3.11 . We emulate that by patching it into typing and adjusting the Python version for mypy. Task-number: PYSIDE-2846 Change-Id: Icb1060c7bba355061d8f134c8e76fb14369d7dda Pick-to: 6.8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove traces of Python 2: tests and flake fixesCristián Maureira-Fredes2024-11-052-38/+40
| | | | | | | | | Addressing a few comments from tests that were related to the Python 2 compatibility. Pick-to: 6.8 Change-Id: I88c614549cfb91f879fe3e0d82a6988362e0ce19 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Make the mypy cache more permanent, amendedChristian Tismer2024-11-041-1/+9
| | | | | | | | | | | | | It turned out that mypy is not loaded by COIN tests when requirements_coin.txt is used. Also enforce mypy existence in COIN to prevent further configuration errors. As a drive-by, a new cache is used that is > 10% faster. Task-number: PYSIDE-2846 Change-Id: I75a27cfd0cb0fb0d7cd44c2a121291af052b0d8f Pick-to: 6.8 6.8.0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* setup: fix PySide6.__all__ after the wheel split, amendment 3Christian Tismer2024-11-011-2/+10
| | | | | | | | | | | | | | | | | | | | The __all__ support for the PySide6 module works just fine. But there is a last incompatibility that might strike others as it did hit ourselves when using PySide6.__dict["__all__"]: Use a derived dict type and define a __missing__ attribute. Derive further a module type, then it works without problems. A little support function in Shiboken allows to replace the dict of PySide6 with this derived type. amends 703d975f16aff95bc9014a2689a3ae824b5a552f. Pick-to: 6.8 Task-number: PYSIDE-2895 Task-number: PYSIDE-1890 Change-Id: I018228116a5fdd1401c1ebd42ceb886f6829deeb Reviewed-by: Christian Tismer <tismer@stackless.com>
* type hints: Make the mypy cache more permanentChristian Tismer2024-11-011-1/+12
| | | | | | | | | | | | | | By default, mypy stores its cache data in $(pwd)/.mypy_cache . It is better to save it in the pyside_setup folder under a version specific name. This makes the cache survive full rebuilds. We tested that this folder is really writable. Task-number: PYSIDE-2846 Change-Id: I739e74cb24b5aaa1b2b457195e8a143b56a2bc44 Pick-to: 6.8 6.8.0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Lazy Init: Support Lazy Subtypes in star imports, amendment 2Christian Tismer2024-10-211-5/+9
| | | | | | | | | | | | | | After addition of subtypes support, filtering is necessary to exclude subtypes from resolving. Deleting the subtype was a bad idea with an unordered_map. Better is to use a list of names to resolve. Task-number: PYSIDE-2404 Change-Id: Ide5b13fbd37bab44881a25d4466ec30c89cd9918 Fixes: PYSIDE-2898 Pick-to: 6.8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Install a permanent test for error-free pyi filesChristian Tismer2024-10-172-0/+48
| | | | | | | | | | | | | | | | | Testing Mypy on the whole project costs some time, about 33 s on a Mac Studio Max M1 in debug mode. On CI with release Windows, this is about 8 sec. An option "--skip-mypy-test" is added to save time. The mypy tool is only enforced to exist in COIN. Otherwise it is optional. Task-number: PYSIDE-2846 Change-Id: Ibbabbf6b893537ac923fbbaba9ff832ebd675a21 Fixes: PYSIDE-2672 Fixes: PYSIDE-2886 Pick-to: 6.8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Lazy Init: Support Lazy Subtypes, amendedChristian Tismer2024-10-142-4/+6
| | | | | | | | | | | | | | | The addition of nested types made it necessary to filter subtypes out of resolveLazyClasses because incarnateType should be called for toplevel types, only. Added a star test to pyenum_relax_options_test.py to test this case without using extra time. Task-number: PYSIDE-2404 Change-Id: I4b95c0f65c055376defb6a8e9ea888285c82a8e2 Fixes: PYSIDE-2888 Pick-to: 6.8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* type hints: Fix some systematic problemsChristian Tismer2024-09-061-1/+1
| | | | | | | | | | | | | | __str__ and __repr__ are simply fixed by returning str instead of PyObject. __reduce__ actually has return type "str | tuple[Any, ...]", but using str here too fits the purpose. Errors before: 533 Errors after: 450 Change-Id: I6dd3527d3f5f3f035e667d0ca3c8f123e94e844f Task-number: PYSIDE-2846 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken6: Prevent converter name clashes between classes and partially ↵Friedemann Kleint2024-06-267-3/+61
| | | | | | | | | | | | | | | | | | | | | qualified aliases Change the behavior of registerConverterName() to always overwrite existing entries. It should then only be used for fully qualified names. Add a function registerConverterAlias() which does not overwrite existing entries for registering partially qualified names. Use registerConverterAlias() for the primitive types since they are re-registered in multiple modules. This prevents clashes when registering duplicate classes. For example, registering a globally scoped class "Connection" will then overwrite the partially qualified alias "Connection" of "QMetaObject::Connection". Fixes: PYSIDE-2792 Change-Id: I2bd3c0bff96da6d3ceddd46a2368fe6b94bbed68 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-2034-0/+34
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Do the transition to Python 3.13, GIL-partChristian Tismer2024-06-121-12/+29
| | | | | | | | | | | | | * opcodes have changed numbers. That made "import *" etc. fail. * PUSH_NULL is sometimes inserted before a call. * enum_test needed an overhaul due to opcode changes. Python 3.13 works fine. Supporting --disable-gil is a different issue. Task-number: PYSIDE-2751 Change-Id: I37b447148787e2923a58c091a5c8ac808d579bc0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Implement multiple inheritance correctly, 2nd. amendmentChristian Tismer2024-03-281-5/+35
| | | | | | | | | | | | | When a Python class does _not_ implement __init__, then we might get the default of object.__init__, which must be skipped like the object class alone. Change-Id: I0416c97854e8d1c9edf0b9ac44d3df58223fef84 Fixes: PYSIDE-2654 Task-number: PYSIDE-2294 Pick-to: 6.5 6.6 6.7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken6: Register typedefs of container typesFriedemann Kleint2024-03-183-1/+24
| | | | | | | | | | | | | | | | | | For signals like QRemoteObjectRegistry.remoteObjectAdded(QRemoteObjectSourceLocation) where using QRemoteObjectSourceLocation = std::pair<QString,QRemoteObjectSourceLocationInfo> one needed to specify the fully qualified C++ name in @Slot() for the metaobject system to work and the shiboken converter to be found. Record the typedefs and register the container converters under the typedef name, too. Fixes: PYSIDE-2633 Change-Id: Ifc62f096277949a507957a0466adb47d082695c7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Enum: Move special Flag patch into a snippetChristian Tismer2024-03-051-15/+4
| | | | | | | | | | | | | | A patch that corrects Qt.Modifier and Qt.KeyboardModifier causes early loading of QtCore.Qt . Move the patch into snippets, running it only when needed. Task-number: PYSIDE-1735 Task-number: PYSIDE-2404 Change-Id: I26cc7aa767d5474bf54a22fbad24fae62daafa5f Pick-to: 6.6 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix connecting to signals with QFlags<>Friedemann Kleint2024-03-013-2/+20
| | | | | | | | | | | | | | Additionally register the shiboken converter under the type alias name ("Qt::Alignment"), which appears in the meta method signature besides the full name ("QFlags<Qt::AlignmentFlag>"). Manifests as signal: QBluetoothDeviceDiscoveryAgent::deviceUpdated(QBluetoothDeviceInfo, QBluetoothDeviceInfo::Fields) Pick-to: 6.6 Fixes: PYSIDE-2613 Change-Id: I7ecce8e0b3f8ddf790c40260fc156184e83cad69 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix conversion of QVariant<->QMatrix<n>x<m>Friedemann Kleint2024-02-224-2/+24
| | | | | | | | | | | | | | | | QMatrix<n>x<m> is a template specialization of QGenericMatrix<n,m,float> which the type name of the QVariant contains. To find the proper Shiboken converter for this, change the name back. As a drive-by, fix @snippet conversion-sbkobject to return a PyObjectWrapper() with warning in cases where the QMetaType is valid but no converter can be found. Fixes: PYSIDE-2599 Pick-to: 6.6 Change-Id: I4f41dcbaa394fcc1732536c0b7a6569f694f3c45 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add QLatin1StringFriedemann Kleint2024-01-083-0/+25
| | | | | | | | | It is needed For the QIcon::ThemeIcon fields. Task-number: PYSIDE-2497 Task-number: PYSIDE-2537 Change-Id: I11d94c150dfa614797038e56cd37128bf3e88cff Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PyPySide: Fix some new bug that should ignore featuresChristian Tismer2023-12-212-3/+8
| | | | | | | Task-number: PYSIDE-535 Change-Id: I9dc87afba17ceed9bd24c54e468e634155877e61 Pick-to: 6.6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Tests: Fix some flake warningsFriedemann Kleint2023-11-2810-16/+42
| | | | | | | | Mostly spacing related. Pick-to: 6.6 Change-Id: I748a8a06f456c5d4bafb94c397c43b3b2ee9e3e9 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* pysidetest: Fix some static code analysis warningsFriedemann Kleint2023-10-106-10/+13
| | | | | | Pick-to: 6.6 6.5 Change-Id: If0050eadfc36444300b61498e46034ad3b4c8cdd Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Support running PySide on Python 3.12Christian Tismer2023-10-091-1/+18
| | | | | | | | | | | | | | | | | | Builtin types no longer have tp_dict set. We need to use PyType_GetDict, instead. This works without Limited API at the moment. With some great cheating, this works with Limited API, too. We emulate PyType_GetDict by tp_dict if that is not 0. Otherwise we create an empty dict. Some small changes to Exception handling and longer warm-up in leaking tests were found, too. Pick-to: 6.6 6.5 6.2 Task-number: PYSIDE-2230 Change-Id: I8a56de6208ec00979255b39b5784dfc9b4b92def Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Replace typedef by usingFriedemann Kleint2023-09-201-5/+3
| | | | | | | Pick-to: 6.6 6.5 Change-Id: I23d8ea03ec578a897352c2627417a706ca71ef82 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Clean up some unused suppression warningsFriedemann Kleint2023-08-011-8/+0
| | | | | | Pick-to: 6.5 Change-Id: I261ec7ec933e21658d357ad1ffbeb4de5b84d13f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PyEnum: Remove the now unreachable test cases for old enumsChristian Tismer2023-06-191-2/+0
| | | | | | | Task-number: PYSIDE-1735 Change-Id: I51e68c50872f1d1254218ae7556ba607f73c4ea9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PyEnum: Update docs and rename the optionChristian Tismer2023-06-162-7/+7
| | | | | | | | | | | | | The new Enum implementation can no longer be switched off. Individual features can still be deselected with the environment variable PYSIDE6_OPTION_PYTHON_ENUM which had the name PYSIDE63_OPTION_PYTHON_ENUM before. This change is meant for PySide 6.6 . Task-number: PYSIDE-1735 Change-Id: Iae5b7a9d42a0d7b005dbba20201a80713ef79be9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Enum: Enable toInt for QVariant(PyEnum/SbkEnum)Shyamnath Premnadh2023-06-136-1/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | - For Python/Shiboken types not known to Qt that requires wrapping around a QVariant, we use the PyObjectWrapper type. This patch registers a toInt() QMetaType converter for PyObjectWrapper, which enables automatic conversion to int for a QVariant(PyObjectWrapper) within C++ i.e. QVariant(PyObjectWrapper).toInt() will work - This means that cases like QAbstractItemModel::data() that calls QtPrivate::legacyEnumValueFromModelData(const QVariant &data) would work without explicit conversion from QVariant(PyObjectWrapper) to QVariant(int). But for cases like QMetaProperty::write() explcit handling is still required. - This would also work for cases where the QVariant(PyObjectWrapper) is simply channeled from Python to C++, and from C++ back to Python without performing any operations on it. - Incase, the wrapped object is not a PyEnum/ShibokenEnum object, then toInt() would return a -1. Pick-to: 6.5 Task-number: PYSIDE-1930 Task-number: PYSIDE-2339 Change-Id: I983351f2ff88c79c29399c257e38421116efc7a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Implement multiple inheritance correctly, amendedChristian Tismer2023-04-121-0/+20
| | | | | | | | | | | | | | | | | | In multiple inheritance, it makes no sense to pass positional arguments into a mixin class. This was correctly implemented but later "corrected" because of wrong user input. Correct and compatible to the competitor's implementation is passing keyword arguments, only. This is rarely a problem since people should use keyword arguments only in multiple inheritance. Change-Id: If5eb19368a50ee2a5534f10081d84511453993e5 Fixes: PYSIDE-2294 Pick-to: 6.5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Implement multiple inheritance correctly, compatible versionChristian Tismer2023-03-212-0/+128
| | | | | | | | | | | | | | | | PySide does not implement multiple inheritance. Please see "About Multiple Inheritance in Python" at the issue. This patch just supports the `__init__` call. A more consequent implementation will follow that supports multiple inheritance with every method. [ChangeLog][pyside6] Cooperative multiple inheritance is now implemented for all __init__ methods. Fixes: PYSIDE-1564 Change-Id: I8df805d22c2052c3a9747420a86341f64e29a5ad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>