aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/glue
Commit message (Collapse)AuthorAgeFilesLines
...
* PySide6/SerialBus: Fix crash in CAN bus exampleFriedemann Kleint2024-09-181-1/+9
| | | | | | | | | Add snippet for QCanBus::availableDevices(QString*), adapting to qtserialbus/0eab51e1e451f92fbaf0df69793cbb4137a5ece4 . Task-number: PYSIDE-2620 Change-Id: I0667931000a8446db2e14d72fbba254a6866cc3c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add QModelRoleDataSpanFriedemann Kleint2024-09-111-0/+20
| | | | | | | | | | | | | Implement QModelRoleDataSpan with an index operator returning QModelRoleData* for modification. This enables QAbstractItemModel::multiData(). [ChangeLog][PySide6] QModelRoleDataSpan for implementing QAbstractItemModel.multiData() has been added. Fixes: PYSIDE-2859 Change-Id: I35e4812bd999538f6dbd9e63a623791640287bab Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Refactor __getitem__/__setitem__ code generationFriedemann Kleint2024-09-113-19/+28
| | | | | | | | | | | | - Introduce a shiboken message with parameters, reducing strings generated into code. - Return nullptr from __getitem__. - Adapt injected code. Task-number: PYSIDE-2859 Task-number: PYSIDE-2701 Change-Id: I4de98e40609cab400e4d7e11fe00f07594702b3a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Fix some clang-tidy warnings in generated codeFriedemann Kleint2024-09-111-4/+4
| | | | | | | | | | | - Remove inline from inlined functions, fixing [readability-redundant-inline-specifier] - Do not call parameterless base constructors, fixing [readability-redundant-member-init] - Use nullptr [modernize-use-nullptr] - Remove unneeded reinterpret_cast<>() - Fix some warnings about uninitialized variables [cppcoreguidelines-init-variables] Change-Id: I38e9ddc192556cf0d5770bd858b240f013c97c79 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* QtHttpServer: Fix build after API review changeFriedemann Kleint2024-09-091-9/+10
| | | | | | | | | | | Adapt to qthttpserver/6acb3ccf221923a19118b3f3b15ffbebb3f33d4c. The example will be fixed in a follow-up change. Task-number: QTBUG-128113 Task-number: PYSIDE-2620 Change-Id: Ic454bcb8a37aa89ef6e9718df6dd8a7135e0b36c Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Add QDirListingFriedemann Kleint2024-09-051-0/+20
| | | | | | | Task-number: PYSIDE-2620 Change-Id: I4e4826c5ab01a36022f43d2aa7d23558e6964a66 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Adapt to 6.8Friedemann Kleint2024-09-051-1/+1
| | | | | | | Task-number: PYSIDE-2620 Task-number: QTBUG-125719 Change-Id: I6efeb1770c9bd7cddc3dbd91ca6294b9fddc9cc9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Reimplement signal connections for Python callables not targeting ↵Friedemann Kleint2024-08-211-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a QMetaMethod The code previously used a instances of class GlobalReceiverV2 inheriting QObject in a hash in SignalManager per slot tracking the list of senders to be able to use standard signal/slot connections in Qt. This was a complicated data structure and had issues with cleanups. This has been replaced by using an invoker object based on QtPrivate::QSlotObjectBase which can be passed to QObjectPrivate::connect(const QObject *, int signal, QtPrivate::QSlotObjectBase *, ...). The connections (identified by ConnectionKey) are now stored in a hash with QMetaObject::Connection as value, which can be used to disconnect using QObject::disconnect(QMetaObject::Connection). Deletion tracking is done by using signal QObject::destroyed(QObject*) which requires adapting some tests checking on the connection count and weak ref notification on receivers as was the case before. [ChangeLog][PySide6] Signal connections for Python callables not targeting a QMetaMethod has be reimplemented to simplify code and prepare for removal of the GIL. Task-number: PYSIDE-2810 Task-number: PYSIDE-2221 Change-Id: Ib55e73d4d7bfe6d7a8b7adc3ce3734eac5789bea Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix clang warning: lambda capture 'count' is not used [-Wunused-lambda-capture]Friedemann Kleint2024-08-011-1/+1
| | | | | | | | | It shows up in macOS builds: qcoreapplication_wrapper.cpp:2200:44: warning: lambda capture 'count' is not used [-Wunused-lambda-capture] Pick-to: 6.7 Change-Id: Ie886c9e4f23c8da61096e7c95129d44c04fb072e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Shiboken: Get rid of the fullName field in generated codeChristian Tismer2024-07-051-1/+2
| | | | | | | | | | | | | | | | | This patch does the actual removal of the fullName field. Unfortunately, not all fields can be removed but only the ones which are reachable by the TypeInitStructs. (meanwhile less than 500) This result is pretty much better (at least on macOS), so we would not want to optimize it any further. Many thanks to Friedemann's help with improving the generator and removing the quirks that I could not solve. Task-number: PYSIDE-2701 Change-Id: Ie350766c450da1d86359c4e24c313ade3146233f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QMessageBox.open() with a slotFriedemann Kleint2024-07-042-19/+8
| | | | | | | | | Extract a helper function from QTimer::singleShot() implementation and use that to implement it. Fixes: PYSIDE-2805 Change-Id: Ib758d355b36c598052cfa495b53d7da423999976 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix suppressed exceptions for 0-delay singleShotAdrian Herrmann2024-05-271-0/+2
| | | | | | | | | | | Fix an issue where exceptions were not shown when raised inside a slot called from a zero-delay singleshot timer, causing problems further down the line. Pick-to: 6.7 Fixes: PYSIDE-2745 Change-Id: Iab7696663e5dfa00d99d28ee21ac687fde4cf731 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Python 3.12: Avoid issues with reference counting of immortal Python typesFriedemann Kleint2024-05-161-4/+2
| | | | | | | | | | Use the PY_RETURN_* macros for returning them. Pick-to: 6.7 6.5 Task-number: PYSIDE-2747 Change-Id: I48db8b958925e6ae39ce8ae8fb926429d0e4cd02 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Shiboken: Simplify Python Error MessagesChristian Tismer2024-05-104-17/+9
| | | | | | | | | | | | | | | | | | | The function PyErr_SetString is used quite often, which has no return value. The bracketed sequence PyErr_SetString(...); return nullptr; can in most cases be replaced by a single call to return PyErr_Format(...); To simplify matters, PyErr_Format is now used everywhere. Task-number: PYSIDE-2404 Change-Id: I5988fcd2430be700415d14d7a5cc740211e61d08 Pick-to: 6.7 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* shiboken6: Generate Python override code for added virtualsFriedemann Kleint2024-04-221-0/+14
| | | | | | | | | | | | Introduce "Python override" as a special type of user-added function which will cause a function calling a Python override into the native wrapper. This can then be called from a virtual that has a signature which cannot be handled in Python. Fixes: PYSIDE-2602 Pick-to: 6.7 Change-Id: I5fc44ebe3f585078e87d3230d5e6f4faa67a4ee1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Release dialogs when using QDialog.exec()Friedemann Kleint2024-04-121-0/+8
| | | | | | | | | | | | | | | In the typical pattern ported from C++ dialog = QDialog(mainWin) dialog.exec() one would expected the dialog to be deleted. However, due to the constructor heuristics creating a parent-child relationship, the dialog leaks. Add a modification to remove the relationship in case exec() is called. Change-Id: Ibc6f8c150cbd80a4085af4a5b713ee7c2c62abf3 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Multimedia: Adapt to revert of QAudio->QtAudio namespace renamingFriedemann Kleint2024-04-121-1/+2
| | | | | | | | | | | | Partially revert 4d761eaaf852f8d82925e111150f25c0dd5f3e83. Adapt to qtmultimedia/7fcea568c9c64f3bcebda21f0df02aa0107dfd0c, reverting qtmultimedia/edaec2bf714c98d65f12c8ed9a2ffbd1603635a7. Task-number: QTBUG-123997 Pick-to: 6.7 Change-Id: Ibd0ad737293f4b9107909f37554c03f64bce5d1e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix warning about invalid printf()-formatFriedemann Kleint2024-03-201-1/+1
| | | | | | | | | | | | | | Change d8910df3ccea2897f5e228058f17176cb1fe4093 moved the qWarning() out of the function were %FUNCTION_NAME is defined, causing: format '%F' expects a matching 'double' argument [-Wformat=] Replace by function name. Amends d8910df3ccea2897f5e228058f17176cb1fe4093. Change-Id: Ib25cbb20c6ffe9c225cefa1a22fab8b37406fb59 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix crash when adding None to a QLayoutFriedemann Kleint2024-03-141-8/+33
| | | | | | | | | | | | | | | This caused a crash in PySide's addLayoutOwnership() code snippet, whereas Qt errors out with a warning. Guard all input parameters of the layout snippets with a check. Rename the snippet "addownership-0" which is used for the itemAt() functions "addownership-item-at" for clarity and add a check there. Pick-to: 6.6 6.5 Fixes: PYSIDE-2638 Change-Id: Ia89532059e7a27cc38d790a0d17e24e19d68887f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* LazyInit: Move the get arguments into a static structureChristian Tismer2024-03-131-3/+4
| | | | | | | | | | | | | | | | | | | | The central get function is used very often. Since the string constants are repeated many times and there seems to be no constant folding, it is better to re-arrange the structure a bit to avoid code bloat. By moving the get arguments into a struct, we avoid all repetitions of string constants and minimize the runtime overhead. The structure is now fully backward compatible and works with unchanged scriptableapplication. Task-number: PYSIDE-2404 Change-Id: Ie7c788ef75cc3d58366532c5f14ab013ebd792b5 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* LazyInit: Implement Lazy Initialization by Delayed Module EntriesChristian Tismer2024-03-131-0/+2
| | | | | | | | | | | | | | | | | | | | Lazy init is done by module entries which are delayed. Although visible in the module, the classes are only created when actually accessed by getattr. Internally, the access to the global Init_xxx functions is redirected to a Shiboken::Module::get function which resolves the classes if not already present in the global type array. PYSIDE6_OPTION_LAZY 0 - no lazy loading 1 - lazy load all known modules 2 - lazy load all modules Task-number: PYSIDE-2404 Change-Id: I98c01856e293732c166662050d0fbc6f6ec9082b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: fix systemLocale goes out of scopeShyamnath Premnadh2024-03-131-1/+1
| | | | | | | | | | - remove the Shiboken:AudoDecRef wrapper for the locale Pick-to: 6.6 Fixes: PYSIDE-2639 Task-number: PYSIDE-2485 Change-Id: I4b56544ae23dfd762e4d711681bceffca05af527 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix a crash when using struct.unpack() on a QByteArray with Limited APIFriedemann Kleint2024-03-071-2/+2
| | | | | | | | | | | Unconditionally setting view->strides on the Py_Buffer causes a crash. Update the code in our copy of PyBuffer_FillInfo() from CPython. Fixes: PYSIDE-2628 Pick-to: 6.6 6.5 Change-Id: I6f244090a65442003cecfce70c6f8164b41ba99a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Long live PyObjectHolderFriedemann Kleint2024-03-054-45/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a class PyObjectHolder for passing around Python objects in C++. It is mainly intended for callables. There are some cases in which callables are invoked several times or not at all. The usual construct of passing a lambda which decrefs the callable after the invocation only works in the case when there is exactly one single shot invocation. Otherwise, the callable leaks if there is no invocation or a crash occurs on multiple invocation due to repeated decref. To fix this, introduce a class PyObjectHolder which holds a PyObject with a reference and implements move/copy semantics as well as destruction with the GIL held. It serves as a base class for functors which implement a call operator for the invocation. For the singleshot case, release() can be called after the invocation as not to unnecessarily delay the release. Port over the known cases where multiple invocation is documented to occur to use it. Change-Id: I2f4c7d497d4be8e48946f77a5a40dc9712dc05dd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Enum: Move special Flag patch into a snippetChristian Tismer2024-03-051-0/+36
| | | | | | | | | | | | | | 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 error about deleted C++ object when calling QWidget.style() in embedded ↵Friedemann Kleint2024-03-011-5/+10
| | | | | | | | | | | | application Do not create a parent relationship if the application was not created in Python. Fixes: PYSIDE-2605 Change-Id: I55e96b2f7120d557b1c1c62499843c053bf53945 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add public native interface classesFriedemann Kleint2024-02-281-0/+33
| | | | | | | | | | Some native interface classes were included in public headers. Task-number: PYSIDE-2497 Task-number: PYSIDE-1568 Change-Id: I2e61ed8cd1a8dfc7d5d04d2730d456ec800eb446 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Adapt to renaming of namespace QAudio->QtAudioFriedemann Kleint2024-02-281-0/+5
| | | | | | | | | | | - Adapt the examples. - Create an alias into the module. - Add a hack to the signal manager for signals which maintain the old string-based signature. Task-number: PYSIDE-2497 Change-Id: I9db5e59851a2cb9161fdcecf87e78d980eda2045 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Adapt to Qt 6.7Friedemann Kleint2024-02-281-0/+62
| | | | | | Task-number: PYSIDE-2497 Change-Id: Id506616710ba06851401cf62511e49967acde71e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Adapt to QtGraphs changed APIFriedemann Kleint2024-02-281-1/+1
| | | | | | | | Task-number: QTBUG-114091 Task-number: PYSIDE-2497 Change-Id: I62b6c50ea4cafd240ef75b2814849821f4eb2c3b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix conversion of QVariant<->QMatrix<n>x<m>Friedemann Kleint2024-02-221-11/+42
| | | | | | | | | | | | | | | | 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>
* Desktop Deployment: link permission libraries for macOSShyamnath Premnadh2024-02-212-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | - The macOS permission backends are packaged as static libraries which are linked directly to the C++ application during the build step. Since this is not possible to be done dynamically when pyside6-deploy is run, we link the QtCore PySide6 binary (QtCore.abi3.so) to the permission static binaries. This also makes sense since the Qt permission API is a part of QtCore. ~Note~: The idea of checking and requesting permissions for macOS only exists when the Python application is packaged as a macOS application bundle. When Python is run in interpreter mode, the Qt permission API does not work. - The QtLocation Permission plugin cannot be statically linked to QtCore PySide6 binary because it required QtCore Qt framework bundle to be loaded prior to calling Q_IMPORT_PLUGIN. Hence, we statically link QDarwinLocationPermissionPlugin to QtPositioning because QtPositioning has the classes that requires permissions. Pick-to: 6.6 6.5 Task-number: PYSIDE-2468 Change-Id: I2ff64ed8f01f8318755a30eb4a66f7f968bd2d04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QTimer: Call C++ function for singleShot timersAdrian Herrmann2024-02-131-57/+67
| | | | | | | | | | | | | The current implementation of singleshot timers is very old and bypasses the C++ function. Instead, a timer object is manually created and started. This incurs a performance penalty, as this bypasses the optimized code path for 0 timers that eschews a timer object in favor of directly calling QMetaObject::invokeMethod. This is now fixed, and for 0 timers, the C++ function is called directly. Change-Id: Idfed06d60eb34355242818ac2df46f75dd27353c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Fix the polymorphic names in styleOptionTypeChristian Tismer2024-02-121-22/+22
| | | | | | | | | | | | | There is a bug that actually creates new types instead of using the existing ones. Amends de5f162a70dda9d74cfce2337a9f90ddcb4ca75f Change-Id: I9516574d04465b206777e86f46df593ea53fcc43 Pick-to: 6.6 Task-number: PYSIDE-2404 Fixes: PYSIDE-1909 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QTimer: Fix singleShot overload with contextAdrian Herrmann2024-02-071-23/+25
| | | | | | | | | | | The singleShot overload with context had a problem where if the functor was a slot of a QObject, it would not have a sender when it should. To fix this, the newly added QObject.connect() overload with context is used. Pick-to: 6.6 Change-Id: I654c09efb0d1b37ea0c014e9f17cd5e1913d1a96 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QObject: Add connect() overload with context argAdrian Herrmann2024-02-071-0/+6
| | | | | | | | | | | On C++, there is an overload of QObject::connect() that allows passing a context object. This creates a connection in the context object's event loop instead of that of the caller. This implements said overload in Python. Pick-to: 6.6 Change-Id: Ia6a098a04470741efd450818c31aa5bffb1bd9f8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Fix callable invocationsFriedemann Kleint2024-02-014-20/+22
| | | | | | | | | | | | | | | | | | | | | | | - Always make sure to decref the result by using AutoDecref. - Check whether the callback passed to QAbstractOAuth::setModifyParametersFunction() really returns a dict. - Fix bool return of the callback passed to QWebEngineCookieStore::setCookieFilter(). - Some code cosmetics Amends f56329c995d4a708d4169ef52f819b38de1810b0, 535a781d534f4c9d102342a9813528e48c576ffd, 96715550f3d980dc5554c67a3660e94b6a9a3e76, cd394249fc77063a2bd6ba7a7633fdbc10621475, 5fac301e8e5a8d15eaff91d78b5deeeb2204c7b4, Task-number: PYSIDE-1612 Task-number: PYSIDE-1815 Task-number: PYSIDE-1912 Task-number: PYSIDE-2234 Pick-to: 6.6 6.5 Change-Id: I180ed4dfa63fe8ac06a898492244a85ed926c2d6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* LazyInit: Make imports computable from offset constantsChristian Tismer2024-01-312-8/+8
| | | | | | | | | | | | | | | | | | | | | The function cpythonTypeNameExt uses getTypeIndexVariableName to compute the offset to a class variable. For LazyInit we want to change this, creating an expression that can compute the referenced types on demand when no value is found at the offset. These types are hidden in the offset expression. By no longer using "toUpper" here, we can easily compute the needed imports from the offset constant name. We will keep both versions until PySide7. [ChangeLog][PySide6] Type index constants are no longer in uppercase. Uppercase is retained until deprecation in PySide7. Task-number: PYSIDE-2404 Change-Id: I422ead0540a7bdcb4c7ac9905c8e6ab71b5b0634 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Adapt to glue code to namespaced Qt buildsFriedemann Kleint2024-01-301-0/+2
| | | | | | Task-number: PYSIDE-2590 Change-Id: I7269b0f1c1758a9d26579267fc0b423c6a0422ac Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide6: Use PyType_GetSlot() instead of accessing PyTypeObject's slots in ↵Friedemann Kleint2024-01-161-6/+12
| | | | | | | | | | | | | snippets PyTypeObject is not exposed in the stable API; accessor functions should be used to retrieve the slots. Task-number: PYSIDE-560 Change-Id: Ic6573f16929b9e88fcff0c37134ba7c08d072eb9 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide6: Add QQmlEgine.singletonInstance()Friedemann Kleint2024-01-091-0/+26
| | | | | | | | | [ChangeLog][PySide6] QQmlEgine.singletonInstance() has been added. Pick-to: 6.6 Change-Id: Ib1b48df49ca8a183dba415a04f414903f58e435c Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add QLatin1StringFriedemann Kleint2024-01-081-0/+22
| | | | | | | | | 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>
* Fix qCompress/qUncompress() taking a PyBuffer/len argumentsFriedemann Kleint2024-01-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | | The overloads taking a uchar * data argument were generated using the converter for uchar, causing warnings: qbytearray.h:639: There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive type 'const uchar *' of argument 1 in function 'qCompress(const uchar * data, qsizetype nbytes, int compressionLevel)'. qbytearray.h:640: There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive type 'const uchar *' of argument 1 in function 'qUncompress(const uchar * data, qsizetype nbytes)'. This was never noticed since we have a conversion from PyBuffer to QByteArray and the overload decisor checks only whether the minimum argument is satifisfied, so, so qCompress(data,len,level) it called qCompress(bytearry,len), passing the length as level. To fix this, modify the argument to PyBuffer as is done for QImage and give it overload-number 0, so that PyBuffer is checked first without conversion to QByteArray. Add a test for both cases. Amends ae51319fa8a7c02642f5d35f5d613c22e9ce8ecb. Task-number: PYSIDE-838 Change-Id: Ib9b22a24257fcf93ce3458d8514cdda2e4843f64 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add QtQuickTestFriedemann Kleint2023-12-241-0/+50
| | | | | | | | | | [ChangeLog][PySide6] QtQuickTest has been added. Fixes: PYSIDE-2543 Change-Id: I949a0e50a2e522589863ade1e2b2335be580a0d7 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Add QQuaternion getAxisAndAngle()/getEulerAngles()Friedemann Kleint2023-12-211-0/+18
| | | | | | | | Address a fixme-comment in the typesystem file. Change-Id: I9242a04cab75229480efa81a98dc0bbef9bb4e61 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Implement QLockFile::getLockInfo()Friedemann Kleint2023-12-201-0/+9
| | | | | | Change-Id: Idd19498383f3a785a6a393ff8e9d07b6d45bb14e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove hash-specializations for QPoint, QRect, QSizeFriedemann Kleint2023-12-191-25/+0
| | | | | | | | | | | | For these classes, the qHash() function should be found by the code model after 9c37876d6f649b3c9bd1411d3c7ffe620786f1a8. This leaves QLine, for which no qHash() exists in Qt. Task-number: PYSIDE-1906 Change-Id: If6bd7ebbf015d9b140684bf3b1f4b0a141d3879b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Modernize qHash functions preparing introduction of Qt's comparison helpersFriedemann Kleint2023-12-191-2/+1
| | | | | | | | | 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>
* 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>
* PySide6: Fix build when defining QT_NO_CAST_FROM_ASCII for the modulesFriedemann Kleint2023-12-082-4/+4
| | | | | | | | This unearthes a few conversion errors. Pick-to: 6.6 Change-Id: Iad09bb08612938bd6890f3d1aa444d78e8fb8618 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>