| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Adapt CMake files, build scripts, tests and examples.
Task-number: PYSIDE-904
Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It will be assumed that Python is always Python 3.
All checks for Python 2 are removed.
This is the first part of cleaning up the Python code.
We will then also clean the C code.
Task-number: PYSIDE-904
Change-Id: I06050a8c1a18a19583f551b61775833a91673f4e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|\
| |
| |
| | |
Change-Id: Iaabea628351fac9da88b5779b537f62262ff82a7
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: I27beffe4a6e2fc2f818960c3b9f5ffbfaac4a670
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adding a specialization of template type ValueWithUnit from libsample
to libother would fail since the SBK index array of libsample would
be used with the index from libother for it.
Build up the inheritance for typesystem typedefs early on and add
a lookup which matches the template specializations found during
traversing functions to the type def and the class that is
generated for it so that it can be used.
As a side effect, special case entries for template
specializations can be deleted from the signature mappings since
they change to the class name and thus are normal types.
Task-number: PYSIDE-1202
Change-Id: I5cc9650f70e9dc975171c80919685ebf5e752749
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I30aaad19852c50b1222222ba66171f9c98ecb7c8
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ife42d7a3f855816c66dcbd4b8062b72f947510e7
Fixes: PYSIDE-1398
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
View types as function parameters cannot be converted in the standard
way shiboken does it:
QStringView cppArg0;
pythonToCpp(pyArg, &cppArg0);
since they reference some other data.
Introduce a new "viewOn" member to type system entry for them. It
causes the function arguments to be replaced by their viewed-on types
(stringview->string) via metatype.
Add a test in libsample and a test for QUuid::fromString(QStringView).
Test returning QStringView via QRegularExpressionMatch::capturedView().
Task-number: QTBUG-84319
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Task-number: PYSIDE-487
Change-Id: Iddb4ea268a54928d290e29012e2738772fae83f0
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I13721e13d2fab13945385fe529afe4ab431e0532
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After implementing selectable features, support from the signature
module was quite much missing. It was not clear for some time what
to do the best.
It turned out to have the smallest impact and runtime penalty
to use the Python parser output dictionaries and create copies
with snake case naming. That has almost no overhead.
Also, it was necessary to augment the internal map_dict with
snake_case versions. It may be possible to simplify that map_dict
further in another check-in.
Remaining is the problem of static properties. This will be tried
using the PySide Property objects which can be improved.
Change-Id: Ied83ccb197a3c15932c4202b5f1ade772416e17b
Task-number: PYSIDE-1019
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Id0fc76666bbdb254a833eeb6909a0874b2611bf3
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-1212
Task-number: PYSIDE-1367
Change-Id: I3b1bbab3e14888d9520868d1f20860f30cbef0a9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: I4cf3e74cd53b06884f7fdfc7d0f023c9bbb62cce
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I8aa48d07067c45c888c73af87314f6a88c2a6e14
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Drop the module of the instantiations.
- Add a dummy mapping entry, declaring it to be a 1-tuple.
Task-number: PYSIDE-1212
Task-number: PYSIDE-1367
Change-Id: Iddb1feaafbe416ae57d761a33276cb4a1d88e9e3
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This feature is now almost fully implemented.
TODO: Static properties like `QtWidgets.QApplication.platformName` are
skipped for now. They need support by the meta class.
Maybe this is a reason to use QtCore.Property instead of vanilla
Python property and improve it.
With the new infrastructure, we can also consider to add properties
which have no equivalent in the Qt implementation. A prominent
example is "central_widget".
Change-Id: Ia0e32e41de8ab72e3bba74878e61bcbac6da50ea
Task-number: PYSIDE-1019
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Change-Id: I6da99684efb6b3be7f3e347f71862ebfd502ecd9
Fixes: PYSIDE-1383
Reviewed-by: Kyle Altendorf <sda@fstab.net>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I114a003e36bbe9eb7452f13c1515e3419648e228
|
| |
| |
| |
| |
| | |
Change-Id: Id7e1a4f9f938f9b86e1e905936b78c1531f5a566
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove some remains of Python2 and Qt 5 and some
unused options.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Ic9c7d4048b6be0cdeb0f5cc9b23d13b1702f1bdc
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: Ib1d2c1b76a043526e8f715e45296104cad085a4a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
By the slow feature patch, a line got moved into a scope where it
is possible that the `__name__` attribute does not exist.
We supply a default value which solved the problem.
The problem with this bug was how to reproduce the bug.
The doc generator has probably never been run on macOS because
without the trick
cp -r doc/CMakeFiles/qdoc.dir doc/CMakeFiles/qdoc/
the script does not work.
Change-Id: Ic1a65cfaaba5a5c1b0a8e9f390d70e70dfe38ebd
Fixes: PYSIDE-1368
Task-number: PYSIDE-1019
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I747d25be8a1d6d45f14c8ae1d04c252e1f3a6b59
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Removal of the statemachine framework from QtCore
- Addition of QAbstractFileIconProvider
- Adapt some signatures
- QMetaType deprecations
Change-Id: Ia51354542ad1d2f0bb5530e45ebef0d6ccdb633d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Icf4b3535be52b64ef15eced7103bb1280e031e30
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: Icee2cd5a37181070d8ef50e7143868d4f126cea5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Feature switching was written rather naively and happened after
almost every module change which can occour very often.
This patch is much more careful with switching and uses an ignore
code to prevent switching when PySide was not imported at all.
A potential regression when a switch is set before some PySide
module is being imported and PepType_SOTP is zero was also solved.
Task-number: PYSIDE-1019
Change-Id: I24dec7b3e4d0b577f77262392ded0b8a2006b3cc
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
** 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>
|
|\|
| |
| |
| | |
Change-Id: Ib38f2f4be9f214df79454ff972ccd20fbfc6d1cd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the implementation of the first of a series of dynamically
selectable features.
The decision depends of the following setting at the beginning of
a module after PySide2 import:
from __feature__ import snake_case
For more info, see the Jira issue, section
The Principle Of Selectable Features In PySide
The crucial problems that are now solved were:
- it is not sufficient to patch a type dict, instead the whole
`tp_mro` must be walked to rename everything.
- tp_getattro must be changed for every existing type. This
is done either in shiboken by a changed PyObject_GenericGetAttr
or PyObject_SenericGetAttr, or in the generated tp_(get|set)attro
functions.
An example is included in sources/pyside2/doc/tutorial/expenses.
Task-number: PYSIDE-1019
Change-Id: I5f103190be2c884b0b4ad806187f3fef8e6598c9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I509b55363c29639cd29bfbc012c4bda3a4d008e5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the framework for selectable features.
There are no real features implemented.
Planned is a maximum of 8 features.
They are all implemented as a dummy for now.
The decision depends of the following setting at the beginning of
a module after PySide2 import:
from __feature__ import <feature name>
For more info, see the Jira issue, section
The Principle Of Selectable Features In PySide
Task-number: PYSIDE-1019
Change-Id: If355e9294b5c16090b39d30422a90ea9c8523390
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ib928ee6b9aab4f1aa4e6007736a0e1f8b4692d76
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I299a65f15fb6b7eb900256590bbe76ad0568f546
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add mappings for QDeadlineTimer, SocketDescriptor::DescriptorType
and QNetworkRequest.TransferTimeoutConstant, fixing:
UNRECOGNIZED: 'DescriptorType(-1)'
UNRECOGNIZED: 'QDeadlineTimer(QDeadlineTimer.Forever)'
UNRECOGNIZED: 'QNetworkRequest.DefaultTransferTimeoutConstant'
UNRECOGNIZED: 'DefaultTransferTimeoutConstant'
Change-Id: I633153a2cb0b272d76804ea6c10c2526e7ab9514
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|/
|
|
|
|
|
|
|
| |
The bool * has been changed into a std::atomic<bool>.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Ie64668e145e9233760610985dcb86cea68dfb1f3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Triggers in Qt 6 for:
QByteArray toHex(char separator = '\0') const;
Change-Id: I2f9d7e39cb085d1e602a70449c3ca24b7480bad8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pickling for types exists in most cases.
Pickling of Qt Enum objects works fine.
Pickling of Qt Enum types is supported, but does not work
because the builtin type pickling intercepts and then fails..
This problem is now solved because PySide supports
now __qualname__.
So pickling of nested types works now without any extra
code in Python 3. Python 2 is not supported since it would
require too strange patches to Python itself.
Fixes: PYSIDE-15
Task-number: PYSIDE-1286
Change-Id: I346bde07a63afcf2555a3324fcca04efe25e704a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyType_FromSpec breaks the name "A.B.C.D" in module "A.B.C"
and name = qualname = "D".
We fix that for PySide:
module = "A.B"
qualname = "C.D"
name = "D"
and for other prefixes like Shiboken:
module = "A"
qualname = "B.C.D"
name = "D"
This had quite some impact on the signature modules.
Change-Id: Ie94971ba737107b15adbfc2517e1ed32b65fda39
Fixes: PYSIDE-1286
Task-number: PYSIDE-15
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
In line 128 of errorhandler.py, the sys module is used to check for
Python 3. However, sys was never imported.
Change-Id: I01b2ae41fe611de7e378b27bb3d73589dc4e4887
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit d6f37d6c2f5cc9be57569fd5b20d82660644c1b7)
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To remove the groundwork from the next checkin, the step
of replacing PyType_FromSpec with SbkType_FromSpec
is extracted.
This change introduces a packageLevel number that is generated
as a name prefix in the class creation but does not use it, yet.
Change-Id: Ic9061231708b546dbd3620d148bca24c27df60a5
Task-number: PYSIDE-1286
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
| |
Fixes: PYSIDE-1272
Change-Id: If7060574851c10994b06875d3a6ce16500e75199
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a problem with the typing module for Python2
that showed the wrong name.
The generated signature files are further simplified.
They no longer contain fancy definitions like "Char", which
made little sense and was replaced by "int", which our
competitor does as well.
The mypy compatibility should be considered mostly complete.
Update.. QChar was not changed to "int" but "str" because we
got clashes. Therefore, recreation of the registry was necessary.
Hard to solve stay the definitions
"Virtual, Missing, Invalid, Default, Instance".
They are very rarely used for special cases. Mypy cannot
see these definitions since the module path does not exist
in the file system.
I tried hard to fix this by building a mypy plugin, but I seem to
be forced to generate real files in a temp dir. This was too much
effort. A plugin may make sense in the future when we need to
improve the type support.
Change-Id: Id80c2da1a4a379a80ec5f3019a916a9c00cc87ff
Task-number: PYSIDE-1100
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Regular expressions which can evaluate to an empty string
result in a warning in Python 3.6 if you try to re.split() on
that pattern.
The generated pattern for the signature parser was enhanced
to avoid the unintended empty pattern.
This change was not very large, actually only a single bit
(but the right one). :-)
>>> bin(ord("*"))
'0b101010'
>>> bin(ord("+"))
'0b101011'
Change-Id: I15ba6ef6f108c51afba59b4004261bede26c4a74
Fixes: PYSIDE-1247
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the QTEST_ENVIRONMENT variable was no longer set,
a number of crucial checks were not performed.
One side effect are the two new keys which were missing in the registry.
Additionally, the registry is missing very many entries on macOS, and I
have no idea what the reason is. This could be an effect of the
macOS 10.15.1 version or of my maybe outdated Qt 5.14.0 version.
The registry files from 2019-10-31 have all entries. If I build
that version from 2019-10-31 and test it, I get the same missing keys.
Therefore, I doubt my results quite a bit!
To verify this, we simply check this change in, together with
https://codereview.qt-project.org/c/pyside/pyside-setup/+/284809
If that works, then I have a serious bug somewhere, but we know then
that the harm of that CI bug was a minimum. Fingers crossed!!
Change-Id: I25555d60d6911fca6de67110c35dff8d23c2fd8a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 5.13 we did not check the registry.
By change https://codereview.qt-project.org/c/pyside/pyside-setup/+/278244
more functions are generated, which are not yet in 5.14 .
By repeating the removal of that patch, together with the recreation
of the registry files, we add by hand what the merge could not
do automatically.
This took quite a while to understand :-)
"SharedPtr" and maybe other classes may create an infinite recursion
via some "._gorg" property from the typing module for Python 2.7 .
We simply skip that effect.
Change-Id: I85568b08bb6ac87b5dbf6a2823e4a71f69f8b4ad
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|