aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix up error handling of the uic process for QUiLoader::load()Friedemann Kleint2023-12-081-12/+20
| | | | | | | | Fix the sequence of the checks and check for waitForStarted() as well. Change-Id: I46c4ac203886de7d7997b8847c82897574c95bb6 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Deployment: Update TestsShyamnath Premnadh2023-12-083-122/+214
| | | | | | | | | | | | - Use existing `BaseConfig` class instead of created a new class based on 'Configparser' for parsing .spec files. - Update and add Android deployment tests to CI. Pick-to: 6.6 Task-number: PYSIDE-1612 Change-Id: I32cd16e08781c71fb534bbfe7e3726818475366b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Fix obtaining properties from QDBusInterfaceFriedemann Kleint2023-12-081-1/+1
| | | | | | | | | | | | | | | | Disable the PySide6 meta object functions of QDBusInterface since they clash with the dynamic meta object builder it uses. Note that it is then no longer possible to derive a Python class with signals/slots from QDBusInterface. [ChangeLog][PySide6] It is no longer possible to derive a Python class with signals/slots from QDBusInterface. This is necessary to able to retrieve properties via DBus. Fixes: PYSIDE-2535 Change-Id: I6622c7d0bbc8e2684d1390e2888dc68053464189 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide6: Fix build when defining QT_NO_CAST_FROM_ASCII for the modulesFriedemann Kleint2023-12-083-5/+5
| | | | | | | | This unearthes a few conversion errors. Pick-to: 6.6 Change-Id: Iad09bb08612938bd6890f3d1aa444d78e8fb8618 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Move the documentation QUiLoader.registerCustomWidget() out of XMLFriedemann Kleint2023-12-082-31/+30
| | | | | | | Task-number: PYSIDE-1106 Change-Id: I52deebbfd2057dd99c2aafef37a2dd0eaf69ea98 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Build: Fix libshiboken not foundShyamnath Premnadh2023-12-071-2/+2
| | | | | | | | | | | | | - ldd on all the PySide6 modules and libpyside modules showed that libshiboken.abi3.so is not found. However, when loading the binaries there was no error because libshiboken was loaded at runtime. - This patch adds 'shiboken6' directory to the RPATH, which should resolve the not found error and find libshiboken. Pick-to: 6.2 6.5 6.6 Change-Id: I72ce453aa55065b086f79a699611eafc792f77bf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PEP 697: Use the new type extension provisionChristian Tismer2023-12-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | By Python 3.12, there is now an official way to extend heap types by custom extra data. When we supported PyPy, the old type extension of PySide did no longer work, and we introduced shadow dicts. With the interface found in Python 3.12, we can use direct extended data, again. The supporting structures are not Limited API compatible. We implemented a patch that enables this anyway, but it is valid for this version only without a new review. NOTE: The documentation lists `PyObject_GetTypeData` as Limited API since Version 3.12, but in fact we had to write a cheating patch. [ChangeLog][PySide6] Hidden Type Extensions according to PEP 697 are now used instead of shadow dictionaries. Change-Id: I4b724ba7bcc72470b13f55ea5ebf94666061420d Task-number: PYSIDE-2230 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Documentation: Print a warning if no URL can be found in inheritance graphsFriedemann Kleint2023-12-061-0/+20
| | | | | | | Pick-to: 6.6 Task-number: PYSIDE-2215 Change-Id: I9d9493411f1df6110de68de29e84209e4cf2a5df Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Deployment: Add icon for applicationShyamnath Premnadh2023-12-041-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | - For Android deployment, by default kivy's icon is used when the application is deployed. This patch makes use of PySide icon as the default for all applications created with pyside6-android-deploy. - Icon formats accepted by Nutika windows: .ico macOS: .icns (contains a 128x128 .png file) linux: all standard image formats. We use .jpg - For Desktop deployment - change the option --linux-onefile-icon to --linux-icon. Both are the same. - Add icon options for macOS and Windows. - Adapt deployment test accordingly. - As an addition, add a default value to the --config-file option so that it picks up the one in the project directory automatically, if it exists. It aligns with the desktop deployment tool as per 6337e4a306babdb4015c248a14ad734b320ed2c1 - As another extra, remove an unused typing import from config.py Pick-to: 6.6 Task-number: PYSIDE-1612 Change-Id: Ia67ea96f94ddffe4bc65652f91c8b394c4e56a33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Upgrade Nuitka to 1.8.0Shyamnath Premnadh2023-12-041-7/+7
| | | | | | | | | | | | - No more warning on 3.11. Still no support for 3.12. - As a drive by, remove deployment related packages from the project's requirements.txt file. Pick-to: 6.6 6.5 Task-number: PYSIDE-1612 Change-Id: I1d379b4241d3e40de107ceb8c8d28b893de39dec Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix usages of QLatin1String (deprecation candidate)Friedemann Kleint2023-11-294-8/+7
| | | | | | | | | Use QLatin1StringView or literals. Task-number: PYSIDE-2537 Change-Id: I03cb9ae80dacd84da9e53648dd179ad79e9189b1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Enable connecting signals to slots with default parametersFriedemann Kleint2023-11-292-8/+47
| | | | | | | | | | | | | | | Find the number of default parameters using PyFunction_GetDefaults() and change the argCount() helper to return the min/max argument count. With that, try to match the slot using the most argument. [ChangeLog][PySide6] It is now possible to connect signals to slots/lambdas with more arguments provided they have default parameters. Fixes: PYSIDE-2524 Change-Id: I134d33e3ee78b62689fa36887a9acd41951c02e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Remove QHash used when adding signals from QMetaObjectFriedemann Kleint2023-11-281-10/+19
| | | | | | | | | Replace it by a list. Task-number: PYSIDE-2524 Change-Id: I16089a2f53f10726377f4ed66bc466549f4f6474 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Avoid parsing signatures in Signal.connect()Friedemann Kleint2023-11-282-24/+23
| | | | | | | | | | | Store the argument count as obtained from QMetaMethod or Signal argument parsing via PySideSignalData::Signature in PySideSignalInstancePrivate and use that to find a matching slot instead of parsing the signature. Task-number: PYSIDE-2524 Change-Id: I7c30bd1ee7873b4d13c40e0a91a4ace9026890a2 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Remove struct SignalSignatureFriedemann Kleint2023-11-282-76/+29
| | | | | | | | | | | | | | | | SignalSignature is temporarily used while constructing Signal instances and finally converted into a PySideSignalData::Signature. Change the code to use PySideSignalData::Signature right away, which allows simplifying the code. As a drive-by, fix the less-than method. Shorten the data type for the attributes to be able to add further values. Pick-to: 6.6 Task-number: PYSIDE-2524 Change-Id: I4b67d55b65356fbf56633bbbe1d3ef466167227c Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Tests: Fix some flake warningsFriedemann Kleint2023-11-2856-72/+111
| | | | | | | | Mostly spacing related. Pick-to: 6.6 Change-Id: I748a8a06f456c5d4bafb94c397c43b3b2ee9e3e9 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix hang in QSql(Relational)TableModel.select() (PostGres with SSH tunnel)Friedemann Kleint2023-11-271-1/+3
| | | | | | | | | Complements 3bc23d37737184a89f780d84f431757cd7f725c2 Pick-to: 6.6 6.5 6.2 5.15 Fixes: PYSIDE-1931 Change-Id: I71605d64dbcd3c4d2d38e788d098cfcaccf4e609 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Add wrapper for calls in executorAdrian Herrmann2023-11-242-7/+87
| | | | | | | | | | | | | | | Executors require a bit of extra work for QtAsyncio, as we can't use naked Python threads, instead we must make sure that the thread created by executor.submit() has an event loop. This is achieved by submitting a small wrapper that attaches a QEventLoop to the executor thread, and then creates a singleshot timer to push the actual function for the executor into this new event loop. Pick-to: 6.6 Task-number: PYSIDE-769 Change-Id: I77569d8939d6040ddbe62a99448c6ced2785f27e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Do not raise exception at handle cancelAdrian Herrmann2023-11-243-11/+5
| | | | | | | | | | | Do not raise an exception when cancelling a handle. The exception should be raised later, when retrieving the future's result. Pick-to: 6.6 Task-number: PYSIDE-769 Change-Id: I8243cf16e8be5afe167d69313054e97e9aafc75c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* QtAsyncio: Handle exceptions properly in task stepAdrian Herrmann2023-11-242-11/+14
| | | | | | | | | | | Refactor the task step function to handle exceptions properly, as the self._coro.throw() code path was not usually reachable. Pick-to: 6.6 Task-number: PYSIDE-769 Change-Id: I31d50f700857a47bf1df5f0f02fb2fa313c1c045 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QTimer: Implement singleShot signatures w/ contextAdrian Herrmann2023-11-243-2/+71
| | | | | | | | | | | | On C++, it is possible to call singleShot timers with a context object as an argument. This allows posting events to the event loop of the given context object's thread, instead of the thread of the current thread. Implement corresponding signatures to add this capability to Qt for Python. Pick-to: 6.6 Change-Id: I0c4e3ef4b859cdfaac07415ff64c440821e7f442 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add a tutorial for QML DebuggingFriedemann Kleint2023-11-212-0/+33
| | | | | | | | Pick-to: 6.6 6.5 Change-Id: I65ed5d7983099e115429d1af09fd03888eb37f97 Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: remove double white spaceCristián Maureira-Fredes2023-11-2113-23/+23
| | | | | | Pick-to: 6.6 Change-Id: I68b835bb5fa00d35fe5406deee2acc83c7bac7cb Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Shiboken: Fix an oversight when removing ob_typeChristian Tismer2023-11-201-4/+42
| | | | | | | | | | | | | | | | SbkObjectType's meta type was changed due to a wrong fix. This has strange side effects when applying PEP 697 because a wrong action is taken. The meta class for class property was also rewritten to have its own meta class for PEP 697 compatibility. Amends: 73adefe22ffbfabe0ef213e9c2fe2c56efdd7488 Change-Id: I2d5c0a58e274c0a60496e29cbd714b9e69bfffbd Pick-to: 6.6 6.5 6.2 Task-number: PYSIDE-2230 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* libpyside: Port the signal signature code from QString to QByteArrayFriedemann Kleint2023-11-164-24/+25
| | | | | | | | | | Since the name ends up in QMetaObject::addSlot() taking a QByteArray anyways, there is no point in constructing the name using QString. Task-number: PYSIDE-2524 Change-Id: Ib27a55efa8b22eb983d5e27e3a981efd72e9996f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Fix slot names in GlobalReceiverV2Friedemann Kleint2023-11-161-0/+4
| | | | | | | | | | | Replace "<lambda>" by "_lambda_" when one is passed. Task-number: PYSIDE-2524 Pick-to: 6.6 Change-Id: I9839c5e2862fc8c0153653eff1d29cf759dc5875 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Shiboken: Fix subtle bug caused by PyPy support and "bug_825"Christian Tismer2023-11-143-5/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When implementing PyPy support, all Shiboken types lost their hidden extra fields, because they were replaced by shadow dicts. This creates a problem with multiple inheritance. In Python < 3.12, the decision which base type will create the instance is driven simply by the size of the type. In class MetaC(MetaA, MetaB): pass when MetaA is derived from type and MetaB is derived from SbkObjectType, MetaA is not the type that should win. Fixed by simply adding 1 to the default size of PyType_Type. Caused by bug_825 corrected version. The old test is retained as bug_825_old.py . NOTE: This touches a Python 3.8 bug that was fixed in 3.9.12 and 3.10.4 - unfortunately CI Python is older in all cases. Task-number: PYSIDE-2230 Change-Id: I6e82cafb83c8351bbbeafcc80e11d5e45568f73d Pick-to: 6.2 6.5 6.6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add static create() function for decorated QML singletonsFriedemann Kleint2023-11-094-7/+74
| | | | | | | | | | | | | Check for static method named "create()" and use that as a singleton creation callback. [ChangeLog][PySide6] It is now possible to use a static method create(engine) for creating decorated QML singletons. Fixes: PYSIDE-2432 Change-Id: I76c47385a0064733a1949a30d22cc01c280d0423 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Introduce a callback functor for QML singleton creationFriedemann Kleint2023-11-051-41/+109
| | | | | | | | | | | | | | | Add a functor class with shared data that keeps a reference to an object. Preparing for handling a static create() function as a singleton creation callback, this allows for clean separation of the object to keep the reference and the object to be called and provides a way of cleaning up. The cleanup cannot be currently activated since QML registration data are kept in global variables. Task-number: PYSIDE-2432 Pick-to: 6.6 Change-Id: Id57811316e8803638ac3148fdad18a854be99cca Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* doc: add tooling section to the main gridCristián Maureira-Fredes2023-11-024-24/+73
| | | | | | | | | This add the existing section to our main grid page, so people can found the information quickly. Change-Id: I7f920c91886ebcd591e1aa5dcaf396af941d56c7 Pick-to: 6.6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QRhi and related classesFriedemann Kleint2023-11-027-2/+266
| | | | | | | | | | | | CMake logic borrowed from the native interface patch. [ChangeLog][PySide6] QRhi and related classes have been added. Pick-to: 6.6 Task-number: QTBUG-113331 Change-Id: I9dd8b0b92f71027fc9f2c170af2993a5b09a4cfd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* CMake: Tell shiboken to process Qt headers inside system include dirsAlexandru Croitor2023-11-021-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building Qt For Python using yocto, the Qt headers are in a sysroot which libclang considers as system headers. Shiboken skips processing system headers. To ensure Qt headers are still processed, introduce a new --force-process-system-include-paths option to shiboken and two new CMake variables: PYSIDE_TREAT_QT_INCLUDE_DIRS_AS_NON_SYSTEM and SHIBOKEN_FORCE_PROCESS_SYSTEM_INCLUDE_PATHS. When PYSIDE_TREAT_QT_INCLUDE_DIRS_AS_NON_SYSTEM is set to true, the build system will pass the Qt include dirs to --force-process-system-include-paths to ensure the Qt headers are processed and their types extracted. Similarly SHIBOKEN_FORCE_PROCESS_SYSTEM_INCLUDE_PATHS can be passed a list of extra dir paths when creating non-Qt related bindings. Sysroots usually contain headers other than Qt headers, so there's a chance that a non-Qt-related system header fails to be be parsed and will fail the shiboken execution. To avoid breaking setups that previously worked because of the issue described above, the new options are opt-in rather than opt-out. In case one such an issue is encountered, the solution would be to copy / move the Qt headers into a separate location and specify the new location as both an include path and a force process system include path (in case the copied headers are still somewhere under the sysroot). Pick-to: 6.6 Task-number: PYSIDE-1958 Change-Id: I1733478e9c6057f84de7864940c6150b378749cf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Improve the error handling of the QML singleton creationFriedemann Kleint2023-11-011-5/+17
| | | | | | | | | | Make the error messages more verbose and add additional checks. Move the INCREF out of the check function. Task-number: PYSIDE-2432 Pick-to: 6.6 Change-Id: I60e4ad90685f9a1a013aafb5b68503fcc59cec7d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Allow None in type hints of ↵Friedemann Kleint2023-11-011-2/+2
| | | | | | | | | QAbstractItemView.setModel()/QGraphicsView.setScene() Pick-to: 6.6 6.5 Fixes: PYSIDE-2514 Change-Id: I565f13de6515d441f7848d3b5c2477937b7af496 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Add QMetaMethod::invoke()Friedemann Kleint2023-11-013-0/+137
| | | | | | | | | | [ChangeLog][PySide6] QMetaMethod.invoke() has been added. Pick-to: 6.6 Fixes: PYSIDE-2500 Change-Id: I270489ec9372ddfee19e9342c1312d8c446ee5d9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix QMetaObject method invocation to accept all of the 10 argumentsFriedemann Kleint2023-11-014-69/+220
| | | | | | | | | | | | | Refactor the helper injected into the QMetaObject wrapper code into helper functions in the QtCore glue code that handle all arguments of the QMetaObject::invokeMethod() overloads. Extract a std::function for the actuall call that helps to implement QMetaMethod::invoke() in a follow-up change. Pick-to: 6.6 Task-number: PYSIDE-2500 Change-Id: I4f2b509a13d252dad92e388e1dfd607ae3eafcd1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* CMake: Allow specifying a shiboken debug-level from the build systemAlexandru Croitor2023-11-011-0/+3
| | | | | | | | | | | | | | | The SHIBOKEN_DEBUG_LEVEL CMake or env var variables can now be set so that the build system passes that value to --debug-level of each shiboken invocation. The possible values are the ones that shiboken's command line parser expects: sparse, medium, full. This is useful for getting shiboken debug output in the CI. Pick-to: 6.6 Change-Id: I62d99e8f67884638449a69b10803aca3b1230e7b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: Allow passing extra generator flags via a CMake variableAlexandru Croitor2023-11-011-5/+7
| | | | | | | | | | | | | | | | | | | | When building shiboken or pyside directly using CMake, allow passing extra command line options to the shiboken executable when generating bindings. The variable is called SHIBOKEN_GENERATOR_EXTRA_FLAGS and expects a semicolon list of extra options to pass. This is useful for cross-compilation to specify things like extra compiler flags or include paths that the API extractor should take into account when parsing sources. Pick-to: 6.6 Task-number: PYSIDE-1958 Change-Id: I4896fc870d85861e7cc5adbb0e5ae7222ab61a40 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use correct install locationsSamuli Piippo2023-10-312-2/+2
| | | | | | | | | | | Use the correct install locations for QtAsyncio and designer plugin. Pick-to: 6.6 Fixes: PYSIDE-2494 Change-Id: I760e8f52f19cd1f1cdf742a15df071c4f4deffa5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix C-assert in qmlRegisterType()/QmlSingleton when passing non-QObject (3.12)Friedemann Kleint2023-10-271-2/+6
| | | | | | | | | | Do the check for QObject before setting the QClassInfo. Amends 91bf9aa10faad14de557136664f58005c935d11c. Task-number: PYSIDE-2484 Task-number: PYSIDE-2230 Change-Id: I3db5244360e8498c8c0e322302446b1b3f1ccd2a Reviewed-by: Christian Tismer <tismer@stackless.com>
* Set error when instantiating a Signal on a non-QObjectFriedemann Kleint2023-10-271-1/+2
| | | | | | | Fixes: PYSIDE-2510 Pick-to: 6.6 6.5 Change-Id: Icc1461299907cc116bc75f5de994a687b85c1786 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix signature of SignalInstance.connect()Friedemann Kleint2023-10-271-1/+3
| | | | | | | | | | Amends 7878a88aa638da63b8a2ec2200bbe18882277d21. Pick-to: 6.6 6.5 Fixes: PYSIDE-2509 Task-number: PYSIDE-1334 Change-Id: I92fc4021054b1473bd6769ffb9ff0e6803b5439e Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* docs: deprecate 'build_rst_docs' in favor of 'build_base_docs'Dennis Oberst2023-10-263-29/+35
| | | | | | | | | | | | | | | | | | | The command for building documentation files has been renamed to 'build_base_docs' and the previous command, 'build_rst_docs', has been deprecated. All relevant occurrences of the command have been updated accordingly. In addition, the documentation config and build directory 'build/pyside6/doc/rst' has been renamed to 'build/pyside6/doc/base'. To ensure a fresh start when generating new documentation, the auto-generated `examples` and `html` directories are now deleted before generating new documentation. This change has been made because these directories are generated anyway, and starting fresh ensures that there are no conflicts or issues with the new documentation. Task-number: PYSIDE-2504 Change-Id: I395ad7e9482b0b68311820d58da362513ebb44b2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PEP 697: Introduce the SbkObjectType_Check functionChristian Tismer2023-10-251-0/+2
| | | | | | | | | | | | | | | By Python 3.12, there is now an official way to extend heap types by custom extra data. In order to make that most effective, we can no longer accept every type in PepType_SOTP, but keep the types carefully apart. This is done with SbkObjectType_Check, which is very rarely necessary. Change-Id: I9cc4b594f2f676712ba92bf7733c4321b717f252 Pick-to: 6.6 Task-number: PYSIDE-2230 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Unify the structure of type creation functionsChristian Tismer2023-10-258-180/+224
| | | | | | | | | | | | | | | | It is the better concept to use the same structure for all type creation functions. We move the type slots and type specs into these functions. The calling function then always has the same structure of one static expression and returning the type. This might also save some space for shatic structures. Task-number: PYSIDE-2230 Change-Id: Ib972f210f44422eb1ebe47a0d92ac18a8377ac87 Pick-to: 6.6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix threading deadlocks of QObject::(dis)connect() with (dis)connectNotify()Friedemann Kleint2023-10-241-2/+9
| | | | | | | | | Do the connect/disconnect within allow-threads. Fixes: PYSIDE-2367 Pick-to: 6.6 6.5 Change-Id: I95c908d438a4a6c9cd0a23d3fce31a53e02ea19d Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpysideqml: Fix C++ version propertyFriedemann Kleint2023-10-241-1/+1
| | | | | | | | | Amends 862948599999e4e5701452a3f479182606e16a89. Task-number: PYSIDE-1709 Pick-to: 6.6 6.5 Change-Id: I1b01f088cbcb99f0c7ac60324bbd98dc4c52f6b0 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpysideqml: Fix non-Unity buildFriedemann Kleint2023-10-241-1/+1
| | | | | | | | | Amends 91bf9aa10faad14de557136664f58005c935d11c. Task-number: PYSIDE-2484 Change-Id: I0c2abd65d97eb34f9c11a585e00d3ac2abd695b4 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
* QML registration code: ModernizeFriedemann Kleint2023-10-237-134/+237
| | | | | | | | | | | | | | | Use QQmlPrivate::RegisterTypeAndRevisions and information set as QMetaClassInfo as recommended by QML team. The only remaining old code path is for qmlRegisterSingletonType() for the hypothetical case of a value type. [ChangeLog][PySide6] QML type registration has been ported to use RegisterTypeAndRevisions. Fixes: PYSIDE-2484 Change-Id: I7134cbfe1fad1fb543a560cc13b68327b9bd9c2b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QML registration code: Unify checks for QObject inheritanceFriedemann Kleint2023-10-231-9/+4
| | | | | | Task-number: PYSIDE-2484 Change-Id: Idc006c7c355be5e2f740837ee56b12d64d21f477 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>