| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
| |
Use PyLong_AsUnsignedLongLong if an overflow occurs. Use hex
for those large values.
Task-number: PYSIDE-2652
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I9c3404cf8b01b1fcda20516c1105797fc512ed53
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Run a signal handler cleanup in CoreApplication::aboutToQuit() already
before the general cleanup. This prevents them from leaking out of a
main() function, for example.
Task-number: PYSIDE-2646
Pick-to: 6.7 6.6 6.5
Change-Id: I87cce8d131c40c02b44b0102b3774477676b8f89
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
Amends 1270a9e82e5bc3bd53a1131698ece60403da1192.
Task-number: PYSIDE-2646
Task-number: PYSIDE-2141
Pick-to: 6.7 6.6 6.5
Change-Id: Ib8a5146766166ec4fa7ae7b42ce6d52ccae0b3c6
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
| |
Task-number: PYSIDE-2628
Change-Id: I34646f76f509ec30e3d63fc8df296d2b5692ff0e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
Refactor and streamline the code a bit.
Pick-to: 6.6
Task-number: PYSIDE-2633
Change-Id: I433b136ac036a9a297d2c22ad8dfa6af45ad46b0
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add an implementation for a QIODevice that can be used to work with
anonymous pipes. It needs to be able to emit the bytesWritten and
readyRead signals. This implementation is lifted from the qt5 source
tree (qtdeclarative/tests/auto/qmlls/lifecycle) and might be added to
Qt in the future, at which point it will be removed from the PySide
source tree.
Change-Id: Iff1208a366dad747352e7507da0818934c26aa4f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When lazy initialization is used, unexpected situations are
coming up. The feature switching may call into signature init
without knowledge that feature dicts are already switched.
Fix this by
- disabling feature switching during lazy init of a class
- allow this disabling from PySide and Shiboken
- Create a way to find the unchanged type dict of features
UPDATE: Switching speed is now as high as before.
This check-in was extracted after the fact, although it claims
to exist beforehand which would have been better. This was
quite a painful experience.
Change-Id: I6639b7a3c22d21d3b9dd0627e2880a7b7a03d134
Task-number: PYSIDE-1019
Task-number: PYSIDE-2404
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
| |
Task-number: QTBUG-103757
Task-number: PYSIDE-2497
Change-Id: I1b0fd5b1cad908ee612ab33ca0aacffc55947d87
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Task-number: QTBUG-99313
Task-number: QTBUG-97601
Change-Id: I2422a995d73f19e385c73d54410004f7b8f9d77b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Do not use the %S-formatting directive when an error is already set,
since that will invoke str() and thus cause an error.
Amends d7aa15abe25bd71ea19180743ce9b41e0b788520.
Task-number: PYSIDE-1275
Change-Id: I1125ca254efdeeb3652d6171d71f3e22fb686a7a
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
[ChangeLog][PySide6] QObject.disconnect() now returns False instead
of raising an exception for non-fatal cases.
Fixes: PYSIDE-1275
Change-Id: I860b69e1a7055c38f903ffafd7f816575c0d1f7a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
Using PepType_GetSlot() as is requires adding ugly casts. To work
around, add a new file with convenience helper functions in C++
linkage. This also allows for using templates for tp_alloc.
Task-number: PYSIDE-560
Change-Id: Ia50a226f5b545861f885d600445b91b4e11713c5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Fixes: PYSIDE-2510
Pick-to: 6.6 6.5
Change-Id: Icc1461299907cc116bc75f5de994a687b85c1786
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Modern QML registration code is based on QMetaClassInfo, which uses
QByteArray; so, this will avoid conversions in the future.
As a drive-by, shorten some code and move getGlobal*() helpers to the
top for future changes.
Task-number: PYSIDE-2484
Change-Id: Iceadca5a42b5fb7cee330e61d543ca712b521ab3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Change it to operate on a list of key/value pairs instead of a QMap
(no use in enforcing sorting) and extract a setter for setting
QMetaClassInfo data on a PyTypeObject of a QObject.
To be used for QML decorators.
As a drive-by, fix some static analysis warnings about implicit bool
casts.
Task-number: PYSIDE-2484
Change-Id: Ia759bb42740ed279f36c0850306ebd9bee526ecf
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
List all signatures, separated by ';'.
Pick-to: 6.6 6.5
Fixes: PYSIDE-2493
Change-Id: I3c7e3367c340ab142a388a3991dc08774b6c7075
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
| |
Task-number: PYSIDE-2487
Pick-to: 6.6 6.5
Change-Id: I93d2c350aecf1339c6b18496f376d04cdd37dc29
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Tags can be used like annotations and are for example
used in the DBus module.
[ChangeLog][PySide6] An optional parameter "tag" has been
added to @Slot, allowing to set QMetaMethod.tag().
Pick-to: 6.6
Fixes: PYSIDE-748
Change-Id: I62bef6179917307471cb72491ac3d05970572f3f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the course of fixing 3.12 issues, a 3.11 fix for PyEnum
was missing that created a 3.11 error.
A bug with deployment was fixed but not reflected in the tests.
This was only visible for pyenv users.
Also fixes a minor cosmetic bug introduced by
"Python 3.12: Fix the structure of class property"
Task-number: PYSIDE-2230
Change-Id: I3a6bd6426e23168dfccdda17b408f193aacd28a0
Pick-to: 6.2 6.5 6.6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The size of propertyobject as needed as basic size of PyClassProperty_spec needs to be adapted according to runtime version.
Otherwise, PyType_FromSpecWithBases fails with:
TypeError: tp_basicsize for type 'PySide6.QtCore.PyClassProperty' (56) is too small for base 'property' (64)
Pick-to: 6.6 6.5
Task-number: PYSIDE-2230
Change-Id: I03788edbb7031577f37db0fb2eb029b41f37c5f1
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Further tighten the check for non-virtual slots overwritten in Python
by checking that the QMetaObject actually returns a different
declaring class. This works around the underlying issue that the logic
automatically creating meta methods for non-decorated slots wrongly
adds the entry to the derived class.
Amends f048d13b4f042b04d94007fba951ed3080ccf8c9.
Task-number: PYSIDE-2418
Fixes: PYSIDE-2487
Pick-to: 6.6 6.5
Change-Id: I0c62cfd9fd6dcb2ddf6bcfd1db14aa274293b34f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few more cases of cppgenerator were added. This are
now really all cases, because tp_dict is no longer
exported.
As a very positive side effect, there is no longer
direct tp_dict access in the "init_<type>" functions.
Usage of PepType_GetDict would have created a permanent
extra-reference.
NOTE: It was necessary to set SKIP_UNITY_BUILD_INCLUSION
on pep384impl.cpp in order to let this work with unity.
Change-Id: I021dbc978b51265db96d5d3d438e06aa96230cc1
Pick-to: 6.2 6.5 6.6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is a long due task to finally remove the direct access
to type object fields.
With Python 3.12, direct access to tp_dict became
problematic. We use that as a reason to start removing
the direct access in favor of function calls.
Task-number: PYSIDE-2230
Change-Id: I6f8a7479ab0afdbef14d4661f66c3588f3a578aa
Pick-to: 6.2 6.5 6.6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
Pick-to: 6.6
Task-number: PYSIDE-2479
Change-Id: I6df19d487be7087f17e37bea3ea30a66e9b24ed7
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the non-limited API case, there was a cast to PyTupleObject *
required for argument tuples due to the PyTuple_GET_ITEM() macro
definition. Replace it by calling object().
Also deprecate the universal cast function.
[ChangeLog][shiboken6] Cast operators of the helper class
AutoDecRef have been deprecated.
Pick-to: 6.6
Task-number: PYSIDE-2479
Change-Id: Iff660fbc791b1a74ecbd247e71edc896767f308d
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.6 6.5
Change-Id: Ic64a2a2c162c54fbbfb6ddc5004ffe1944bfd37a
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Remove some usages of String::toCString(func_name) and
construction of a QByteArray.
Pick-to: 6.6 6.5
Change-Id: I9fb29341fba1be205e70d8d5ffc1a6d258ef87dd
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Replace out parameters by a struct and streamline code accordingly.
Return the function name as a PyObject to be able to delay the
conversion. Fix some implicit bool conversions along the way.
Pick-to: 6.6 6.5
Task-number: PYSIDE-229
Task-number: PYSIDE-2423
Change-Id: I0dcf14f5b719529117c0ccc119fb19802b399a35
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Output True/False directly. Also output methods and functions.
Amends 74a2ec0202af250828c10dfb10b71036a3af9dd8.
Task-number: PYSIDE-229
Pick-to: 6.6
Change-Id: I3625853ec5deef03cb6f94f24e0a2e80d4ac30a7
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- nullptr
- narrowing integer conversions
- else after return
- Use auto
- Missing move special functions
Pick-to: 6.6 6.5
Change-Id: Ib872481a46c8bb17592cdc1778ab3c4d9598c753
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|