| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When invoking QAxBase::dynamicCall(const char *, QVariantList),
the overload taking single QVariants
QAxBase::dynamicCall(const char *, QVariant1, QVariant2,...)
was chosen by the overload
decisor since QVariantList can be converted to QVariant.
Specify the order manually.
Remove the internal protected function.
Fixes: PYSIDE-1410
Change-Id: I1bcffd34486d5ceebdeea3af47f42398896e9575
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 27aa24e589ca293298f88f3fd0d027d9f95dedc5)
|
|
|
|
|
|
| |
Task-number: PYSIDE-487
Change-Id: Ic5d15d67b821eff5cb59727ce2d749e6aa848441
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
This lays the foundation for adding further specializations
of QFuture and QFutureWatcher to dependent modules.
Task-number: PYSIDE-1202
Change-Id: I82f9940db9d50ced95d4e1388c6460c6efc0469b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
This enable to expose types like QNetworkCookie
which is required for the setCookie, and deleteCookie methods.
Fixes: PYSIDE-644
Change-Id: I28d0b81e59a6ca411f22e1f9afd7f4139927b1a2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The early signature module tried to minimize the visible
changes to the code base. It replaced the `PyType_Ready` call
by a special version which did other things as well.
We replace that special call by a more intuitive function
`InitSignatureStrings` that does exactly that and nothing more.
The functionality of the module is unchanged.
Change-Id: Ic2f9cd29b0352f0a24daa55b01420c77d103c0b2
Task-number: PYSIDE-510
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
This becomes a real Q_PROPERTY only in Qt 6, so, add it here.
Task-number: PYSIDE-1019
Change-Id: I98f8c674370c01605270d7c78bc199464e66642d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Mark the ownership of the C++ wrapper result as C++.
Fixes: PYSIDE-665
Change-Id: I2c5410bd2ebde03a246a3c1b047d99c0a0472e76
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The colors inside the namespace are defined:
constexpr Q_DECL_UNUSED QColor Black
{QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101};
Fixes: PYSIDE-1224
Change-Id: I84ba5fae74e336ab01b3bac467c8fc6e2b45d14b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add an attribute to specify a number by which the functions
will be sorted. This deactivates the default sorting
which tries to avoid implicit conversions.
Fixes: PYSIDE-1366
Change-Id: I9a891e21f86152b2fdfda9a48d685f19aa936508
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
QMimeData
Mark the return value as owned by C++.
Fixes: PYSIDE-1082
Change-Id: Id4be45cf90bbe480839cbe3d355831bf1ddb0c16
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it possible to turn off the generation of
using namespace. This is required in Qt 6 to avoid
a clash between Qt3DCore::QBuffer and QBuffer used
in __repr__.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Iaaf3e67f0ffaae86e2de82b9a1b8fe7d00c74e6b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Mark the returned objects of the create functions in native (wrapper
code) as owned by C++.
Fixes: PYSIDE-1070
Change-Id: I8774f2f0c9adafc73e0d969384e4c0357b7c896d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it possible to inject code into module headers by
specifying "declaration" on type system code snippets.
Use that to insert the struct definition into pyside2_qtqml_python.h
and remove the include. Add the required includes via code injection
into the wrapper and extra includes for the types.
Fixes: PYSIDE-1381
Change-Id: I8dfda4c33d66f56e8fb516e1b174cc43664ca318
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
In case the signal connections are routed via
some GlobalReceiverV2 instance, it needs to be
moved to the receiver's thread.
Fixes: PYSIDE-1354
Change-Id: I85926efeab157e47ec42a830fda024d299807786
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Task-number: PYSIDE-487
Change-Id: Ida9e7d23bb06e5a9b76ef0b7d8e3618375c5d508
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a pre-header defining QT_WIDGETS_LIB so that they become visible,
similar to what is done for QtSql.
Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fixes: PYSIDE-1374
Task-number: PYSIDE-487
Change-Id: I0fe1d8c6ca07a79ea9aa1acff00153239ca9a4cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removing all the different overloads that don't make much
sense in Python land, leaving only one for integers (qlonglong),
and one for floats (double), since in Python those are the general
primitive types to handle, and having a proper transformation
for uint, qulonglong, float, etc, is not really mandatory.
Fixes: PYSIDE-1372
Change-Id: Iba2e3d560dd971e3ecd0146bd5e2ec47f09c16e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the quick hack replacing "type.__signature__" by
'eval("type.__signature__")', we now use a clean initialization
function `_init_pyside_extension` that is implanted into the
__builtins__ module.
This is the first of a series of improvements and simplifications
that will be applied slowly with low priority.
Task-number: PYSIDE-829
Task-number: PYSIDE-510
Change-Id: I9951239c73d02f47272f1a531fb4886c8181b9a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
In standard Python, there is (yet) no attribute "__signature__".
Nuitka, the compiler, knows that and raises an AttributeError without
even trying. The workaround was simple: Use "eval".
Change-Id: Ice9deccd7ba2fe4c376f0a151924a68f88ca020d
Fixes: PYSIDE-829
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signature module took the info from the PyCFunction flags
for a long time to check if something is a function, method or
staticmethod.
It turned out that there are functions with multiple signatures
where the method/staticmethod info varies in the signatures.
This invalidated the PyCFunction flag usage.
Instead, we now compute that info directly from abstractmetalang.cpp
which has access to the correct info.
Fixes: PYSIDE-1328
Change-Id: I6ba7237efcc486de014184b1787d05d87bee5a5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The constructor of QQmlComponent uses qml threads,
and their usage was producing a deadlock when using along
Python classes for a urlInterceptor, mainly related to the
'allow-thread' story that we need to take care of.
Since the QQmlComponent required threads, we enable
all the constructors to allow them to avoid a deadlock.
Fixes: PYSIDE-1349
Change-Id: I86cb97b011f483cc4142bed6fae1ea525fa0db47
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
| |
Fixes: PYSIDE-1355
Change-Id: I27a31bd2efd685f9cd3ac4dc780ab4fa7f7f5720
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
There are setup errors that fail to initialize the signature module
correctly. This is for instance possible if packaging puts the shiboken2
module somewhere into the path, but the binary cannot be reached,
because shiboken2 also exists as a dictionary.
Task-number: PYSIDE-1352
Change-Id: I679d6855c87093b946cfbaeb063c10d45b00c8ad
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
** fix: MSVC needs extra sign bit in basewrapper_p.h! Buglet? **
The new feature selection has some tiny overhead.
It is about two dict accesses plus a slot access for every
tp_(get|set)attro call.
The introduction of an explicit `__init_feature__` call allows to
optimize this overhead very nicely, because this init is done for
each __feature__ import:
First, we can remove that tiny overhead completely by not initializing
the feature_select module at all if no __feature__ import is used.
Second, we can optimize this access further by caching the current module
dict. If the dict is unchanged, then the last select_id can be used.
This reduces the overhead of frequent calls to a single slot access.
Third, we finally cache the select id in unused SbkObjectType bits.
That removes the last structure where repeated attribute lookup is used.
The overhead is therefore quite small when something is changed.
But typically these changes are infrequent. The majority of accesses
do change nothing, and this case is now quite much optimized.
Change-Id: I7d1a4611a1c19216fd9be8f04457bb18ebd52ab1
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Modernize, use override, nullptr
- Fix include conventions
- Remove *Private structs. They don't make sense in a static
plugin.
- Add some explanatory comments
- Add missing initializations of members
- Most importantly: add error handling to
PyCustomWidget::createWidget(), which so far would swallow all
errors encountered when executing the Widget's __init__ function.
Change-Id: I100a4239013f959c8fb0b0adc0d3a99f73bd4bff
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Following how qdoc does it, define Q_PROPERTY as a static assert
with the stringified macro content in a ','-operator and parse
it with clang.
Task-number: PYSIDE-1019
Change-Id: Idcf53f1cd1c1cb29f4320444f446e9abad33d251
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes an oversight of 157e03911ba0e2e8fd74899702588296693fd4ab, causing:
typesystem_core_common.xml:1792: signature 'number(ushort,int)' for function modification in 'QByteArray' not found.
typesystem_core_common.xml:1792: signature 'number(float,char,int)' for function modification in 'QByteArray' not found.
typesystem_core_common.xml:1792: signature 'number(short,int)' for function modification in 'QByteArray' not found.
Task-number: PYSIDE-904
Change-Id: I31b22d12235398400bc7e7a01dd9520a45538446
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Otherwise, overflow errors can occur.
Task-number: PYSIDE-904
Change-Id: I42486a27bcdb8e7562d411b4519d2e61f315be1d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Task-number: PYSIDE-904
Change-Id: I15ebd4057c52c78d584de7c34e74ebb858cb0011
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I55fe70da8adf6faba0f8099d4d127ae3963fa2c6
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Replacing the deprecated QRegExp version in Qt 6.
Merge identical code snippets.
Task-number: PYSIDE-904
Change-Id: Id6f5c39379c65cf71fb6352531173d0fd7f2ae5e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
This is the proper type and makes it clear that it it is not related
to Qt's hash type (uint in Qt 5, size_t in Qt 6).
Task-number: PYSIDE-904
Change-Id: I4ce0f5c845c06e5dcd0ad9744a16a995017987ef
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|\
| |
| |
| | |
Change-Id: I75984f35bcdeeeb3b6004a00670f1582ab522c1b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When terminating a thread using QThread::terminate() via
(pthread_cancel(), QThread::run() is aborted and the lock is released,
but ~GilState() is still executed for some reason.
Add a cancel handler to the thread which tells GilState to abandon
the lock.
Fixes: PYSIDE-1282
Change-Id: I70abd42b5a2afd49aaa8cc5e8be0a92ed63f49d3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I348bb01c52482059b6f6bfebcc1d15fb68b9b142
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| | |
Change-Id: I0ef48ed4300037edcd357e167b6738d04ef5aaa4
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Move QT_ANNOTATE_ACCESS_SPECIFIER before first Qt include.
Task-number: PYSIDE-904
Change-Id: I82b12a79174fad93e0c7ea260e5111b997c60995
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: If40b0ab35cd2ad2bd0d982881094ce3dbf46ccf3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since we deploy the pyside2-uic wrapper inside the
bin/ directory of virtual environments, that takes care
of using the 'uic' binary we ship with the wheels,
which is located in site-packages/PySide2/.
The current implementation of loadUiType, runs 'uic -g python'
but for people without a Qt installation, it has no effect
since 'uic' is neither in PATH, nor in the system.
Using 'pyside2-uic' instead will solve this issue.
Task-number: PYSIDE-1223
Change-Id: I2c801a16c9ff4faa5cf8711bd718a634f017e592
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This implementation allows module-level and scoped QEnums
which are Python enum types. Scoped types are registered in Qt's meta
object system.
Usage of QEnum/QFlag with decorator or function call:
from enum import Enum, Flag, auto
from PySide2.QtCore import QEnum, QFlag, QObject
class Compass(QObject):
@QEnum
class Orientation(Enum):
North, East, South, West = range(4)
class Color(Flag):
RED = auto()
BLUE = auto()
GREEN = auto()
WHITE = RED | BLUE | GREEN
QFlag(Color)
Fixes: PYSIDE-957
Change-Id: Ie15f45cbd932c816b50724a96eee0c14ae1fdee8
Task-number: PYSIDE-487
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add allow-thread for the newly added overloads in 5.15
Fixes: PYSIDE-1332
Change-Id: I1e463203ea9914ae71991262745d803fc9001b7d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I6cf604e1ae7234ce4f0d99169e9269a7dde07a4a
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In __init.py__, check for a zip archive and do not add DLL paths
relative to it. Amends d9cfec8e010b48036e5e879ccc99879538a4f7d2.
Change-Id: I18320bd6a8f784f20287c4a5ed65e9229989031c
Fixes: PYSIDE-1257
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was required by the change in QSocketNotifier in 5.15.
Additionally, an alias, DescriptorType, was required to make
the constructor to work.
Fixes: PYSIDE-1317
Change-Id: Ib75e6024e467eb72f374a1179cb7416b1ea8a853
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
It replaces the deprecated QRegExpValidator.
Change-Id: I18833a3f83bdaf2e72d05c529d846aa07582884c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removing the old inject-documentation approach
from the typesystem, since the function lives in the module
but does not belong to any class.
Also some changes to the text were done, since there was
a wrong statement regarding the PATH of uic.
Change-Id: I7c8bf088f58ff9b6731ba66283ee384f6526c64b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This exposes the C++ class QQuickStyle
Task-number: PYSIDE-487
Change-Id: I5776421070362d8b3bf9556eb28a410de3c90948
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I9c7163094bc934f481002adcea78ef4928ed26be
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This function will allow users to convert and load .ui files
at runtime.
A test case was added.
Change-Id: I64a220a07955e560f61f823d0ee2c3c9ff2209c1
Fixes: PYSIDE-1223
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Ensure it is 64bit for 64bit systems.
Change-Id: I0b4d54f2568bd70288e184a5a2d8f31532fed157
Fixes: PYSIDE-1303
Reviewed-by: Christian Tismer <tismer@stackless.com>
|