| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
Change-Id: Idd19498383f3a785a6a393ff8e9d07b6d45bb14e
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a QtAsyncio.run() function as the new recommended method to launch
QtAsyncio programs. This abstracts the event loop policy and reduces the
API to one single call. Additionally, this will allow to transparently
replace the event loop policy with a loop factory when event loop
policies are removed in Python 3.15 following their deprecation in 3.12.
More information:
https://discuss.python.org/t/removing-the-asyncio-policy-system-asyncio-set-event-loop-policy-in-python-3-15/37553
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I59d7eeb81debe92315351995f041caead4f51d8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Catch keyboard interrupts by catching the SIGINT signal and handling
it with the default handler. Register the handler with the
QAsyncioEventLoopPolicy so that this is always done when using
QtAsyncio.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I7b35367a50ab03eb014faabf6b6a3b21a6a3cd6c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Task-number: PYSIDE-1106
Change-Id: I28b3fa16f37d0d689956b55caa949307472efda6
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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 the sequence of the checks and check for waitForStarted()
as well.
Change-Id: I46c4ac203886de7d7997b8847c82897574c95bb6
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
This unearthes a few conversion errors.
Pick-to: 6.6
Change-Id: Iad09bb08612938bd6890f3d1aa444d78e8fb8618
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
QAbstractItemView.setModel()/QGraphicsView.setScene()
Pick-to: 6.6 6.5
Fixes: PYSIDE-2514
Change-Id: I565f13de6515d441f7848d3b5c2477937b7af496
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
[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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Reproducible in macOS terminal/QtCreator because the environment
does not explicitly set the locale unless the locale is changed.
- If the locale of the system has not been changed, then the Python
locale module's getLocale() returns 'None' as the language code. In
this case, use the POSIX locale or 'C' locale as the default as stated
in the Python locale module's documentation:
``
According to POSIX, a program which has not called
setlocale(LC_ALL, '') runs using the portable 'C' locale.
``
- This issue does not exist in VSCode because VSCode set the locale
in its terminal.
Pick-to: 6.6 6.5
Fixes: PYSIDE-2485
Change-Id: I23ccfa0ef59912ad950143d4a1080c5a201a4865
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
qsgrendernode_renderstate_wrapper.cpp and
qsgmaterialshader_renderstate_wrapper.cpp have static helper functions
named "renderstate_..." that might clash when the order changes due
further sources being added.
Amends 277783b47e704505f19d00dd80f26239082974d6.
Pick-to: 6.6 6.5
Task-number: PYSIDE-2155
Change-Id: I9873f2697b03aa1650847d0daaa622930d74c39d
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
qtextframe_iterator_wrapper.cpp and qtextblock_iterator_wrapper.cpp
have static helper functions named "iterator_..." that might clash
when the order changes due further sources being added.
Amends 277783b47e704505f19d00dd80f26239082974d6.
Pick-to: 6.6 6.5
Task-number: PYSIDE-2155
Change-Id: Ib545b8a08be400b9243a0a1d85827e2e97782666
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
| |
Pick-to: 6.6
Task-number: PYSIDE-2230
Change-Id: Id365e1dac6a4486dd1ff995dde9b834cf6bf95b4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Remove PepIndex_Check, fixing:
Python is at version 3.8 now. The file pep384_issue33738.cpp should be removed ASAP!
Amends bcfd0a1ad2f1c333b53db071fe40b2ee3569bd6b.
Task-number: PYSIDE-1797
Pick-to: 6.6
Change-Id: Id195395fc81899c3881b2f9c6767e25d5bf8fb3d
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Do not schedule events from asyncio when the app is quit from outside
the event loop, as this would cause events to be enqueued after the
event loop was destroyed.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: Ib9ff3949653783e4a9484a8a28f1c0010dcff33f
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Remove left-over reinterpret_cast<> from SbkType to PyType (SbkType
was removed).
Fix warnings about implicit cast to bool (pointer/int).
Fix some auto * definitions of pointers.
Generate wrapper destructors as override when applicable.
Pick-to: 6.6 6.5
Change-Id: I961a1c64821bbf0f2648f5e897029f1aa7d61a43
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
This field is assumed by asyncio.gather() to exist in task or future
classes despite being undocumented.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: Ieab6f216db95e40bd02625fb9cff69be0ebccd50
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
An erroneous self._loop.stop() has sneaked into the end of
QAsyncioTask._step, causing the event loop to stop prematurely in some
scenarios.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: If155e43f81675c660766c00e766e8a8f3bbe8b38
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
- Use asyncio._register_task() and asyncio._unregister_task() as
demanded by the API (extending asyncio, Task lifetime support)
- Add some comments and a missing return type in signature
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I3ffdf0dc5f7b127c0dd9f2fb63eecb057d123744
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
|
| |
|
|
|
|
|
|
|
|
| |
QAsyncioFuture.cancel() and QAsyncioTask.cancel() should both return a
bool.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I2b507ad5c44ba9478bdf8a53c0cd5464028d3384
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Wrap a QAsyncioTask's step execution with calls to asyncio._enter_task()
and asyncio._leave_task() so that asyncio.current_task() will work.
Pick-to: 6.6
Task-number: PYSIDE-769
Change-Id: I7235c9ab2b8d68b0059b82a366909dc25ea6d60f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QtCore/qdatastream_test.py
Shiboken::Buffer::getPointer() asserts with in
Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS since some nested
function cannot retrieve the thread state.
Amends 940cad174f891a4b04af9bcc61aed1c8e8c6d4ae.
Pick-to: 6.6
Task-number: PYSIDE-2442
Change-Id: I27ca9fc485cf81fb47747db7cc40623a9f7fffec
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
| |
Pick-to: 6.5
Task-number: PYSIDE-2463
Change-Id: I5a1fba3d7d86b44f7fb35f9ed263481a4b850408
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Add a test for the asyncio queue for consumer/producer scenarios.
Additionally, fix a few bugs exposed by this test through the increased
code coverage.
Task-number: PYSIDE-769
Change-Id: I18e3be6d059b758868a7598b58704db216bcdcc8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
| |
loop.time() needs to return the time in seconds as a float, not in
milliseconds as an int.
Task-number: PYSIDE-769
Change-Id: Iac123132b49d3954abda8545d0830f1837a27c48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- The macOS version in the wheel name was picked up from Python's
build configuration instead of Qt.
- The solution involves writing the cmake variable
QT_DARWIN_MIN_DEPLOYMENT_TARGET into _config.py, and create_wheels.py
loads this _config.py to fetch the python variable storing it.
Pick-to: 6.5
Fixes: PYSIDE-2429
Change-Id: I85003174b83ba937c8b3e1498b728f13d960284e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Only relevant for platforms like Android, where QT_FEATURE_permissions
is turned ON.
- Used a callback from the wrapper code to establish a call back to the
passed Python functor.
- The passed functor can either have no parameters, or have a
QPermission object as parameter. In the latter case, the QPermission
object will store the result of requestPermission(). This is
similar to the Qt API.
Pick-to: 6.5
Task-number: PYSIDE-1612
Change-Id: I0de8d1c67e69590d2a63ee51c61dfb3a8b76a43f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- QPermission is an opaque wrapper around typed Permissions.
The conversion from specific typed Permission to QPermission for
usage within API functions like checkPermission(QPermission) involved
implicit conversion from the typed Permission to QPermission through
a templated constructor. Therefore, Shiboken needs to handle each
of the conversions explicitly.
- Only relevant for platforms like Android, where QT_FEATURE_permissions
is turned ON.
Pick-to: 6.5
Task-number: PYSIDE-1612
Change-Id: I097bf6f24a7ac79e9a62455dab9f3c8bdf6b8246
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
| |
Pick-to: 6.5 6.2
Fixes: PYSIDE-2444
Change-Id: Ic0b12f109452e7b395a1cd24402984a41875af03
Reviewed-by: Christian Tismer <tismer@stackless.com>
|