aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid converting to string for calculating the hash valueFriedemann Kleint2023-12-193-17/+38
| | | | | | | | | | | | | | | Partially revert bf8a60db4cdbfc3e7c9c98778b219e9c83746d44, which introduced a helper function converting to QString for Q(Date)(Time) and QUrl. For these classes, the qHash() function should be found by the code model after 9c37876d6f649b3c9bd1411d3c7ffe620786f1a8. Extend the test accordingly. Deprecate the QString-helper. Task-number: PYSIDE-1906 Change-Id: Ia210a2210bc6a43991d5b26374039f4e86d0e71e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Modernize qHash functions preparing introduction of Qt's comparison helpersFriedemann Kleint2023-12-193-13/+7
| | | | | | | | | Use qHashMulti, noexcept and make them inline friends. As a drive-by, also make comparison for Clang structures noexcept. Pick-to: 6.6 Change-Id: Ibdcbf3bde90af0fc419bd1640d3f45602f772f9a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add a documentation file hint to function/enum type entriesFriedemann Kleint2023-12-192-13/+14
| | | | | | Task-number: PYSIDE-1106 Change-Id: I28b3fa16f37d0d689956b55caa949307472efda6 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Build: Fix super project buildShyamnath Premnadh2023-12-181-0/+4
| | | | | | | | | | | | | - option USE_PYTHON_VERSION can be removed as an option since it does not need to be cached. Also, the default value of empty string did not really work and instead the default value was always set to OFF. - ensure that Python_EXECUTABLE is found during super build. - Related d5b56ebb1534a3359f03534a967bbe3cf2a5eb51 Pick-to: 6.6 Change-Id: I2a90a17a738c91117bcd62ff5e25e4ac7b1d2be4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Documentation: Fix list of additional documentsFriedemann Kleint2023-12-151-180/+27
| | | | | | | | | | | A number of examples have been removed and the Qt Quick Controls 2 module has been renamed. Pick-to: 6.6 Task-number: PYSIDE-1106 Task-number: PYSIDE-2206 Change-Id: I63f392c93d9f09edf60aeb3399d239ec995555c3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* QtAsyncio: Implement call_soon_threadsafe()Adrian Herrmann2023-12-142-19/+100
| | | | | | | | | | | | | | | Using the QTimer.singleShot(msec, context, functor) overload in QAsyncioHandle already turned call_soon() threadsafe, as that allowed callbacks to be scheduled from other threads. In order to follow the API and distinguish call_soon() and call_soon_threadsafe(), the former is reverted to using the old overload without the context argument, while the latter keeps the new overload. Pick-to: 6.6 Task-number: PYSIDE-769 Change-Id: Ib2591f994d082b46fe4ec747e590e4d8eb6ff24e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix hang in QDBusConnection::connect()Friedemann Kleint2023-12-131-0/+2
| | | | | | | | | Add allow-thread. Pick-to: 6.6 6.5 6.2 Task-number: PYSIDE-2547 Change-Id: I6cb6db502e7dfa72e7b1e9f4eaa5fef0761686e7 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* doc: typo on the signal and slots tutorialCristián Maureira-Fredes2023-12-121-1/+1
| | | | | | Change-Id: Ie0126cf06c2139ad1089a07efed089cf7a615a5d Pick-to: 6.2 6.5 6.6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Shiboken: Remove FindPythonInterp and FindPythonLibs CMake modulesShyamnath Premnadh2023-12-113-5/+4
| | | | | | | | | | | | | | | - They were deprecated since 3.12 and removed in 3.27 - Use FindPython module as replacement - all the Python cmake variables resulted are renamed to their respective variable names as per the FindPython module instead of FindPythonInterp or FindPythonLibs module Pick-to: 6.6 Fixes: PYSIDE-2439 Change-Id: I1d3106e2cc9ee97e2d4f62d4e19e1a591d1021ad Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix a crash accessing QDBusVariant.variant()Friedemann Kleint2023-12-111-1/+1
| | | | | | | | | | | Change it to be a value type since it is merely wrapping a QVariant. Modeling it as object type caused problems when a list was returned from QDBusMessage.result(). Fixes: PYSIDE-2544 Pick-to: 6.6 6.5 6.2 Change-Id: I984450acadd2840fa9d2b99c308fd070ad08e1f1 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* 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>