| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: I73873b8e98edfc8b9544b646fb7d11c6cfe551cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When parsing the typesystem XML file, decrement variable containing
the depth of dropped entries in Handler::endElement().
Otherwise, when dropping a type like
<object-type name="QDtls" since="5.12">
<enum-type name="HandshakeState"/>
</object-type>
all subsequent entries would be droppped.
Change-Id: I640a916e8c8dbddcaeaebc3859300cc2a0eb1b0c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Change-Id: I13226628db54479cc01aab215bb52063684f23c9
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
| |
Change-Id: Idcd2d5fcd2d6f5ab6e15b529e1f73c73a5ff29a9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Using the size() method for that purpose can be expensive for standard
containers.
Task-number: PYSIDE-727
Change-Id: I0da34e271503384a741d856fff5e84fee67bc97f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signature module is an extension that generates full
introspection as a PySide feature. It is documented
in detail to make it usable and extensible for other developers.
Special care was taken about the interaction with the rest of
the project, related code that is based upon this module, and
the interaction with the COIN module.
Task-number: PYSIDE-510
Change-Id: I7b3052da71a6fe3bd6d9cb8cc47443cdf976d3b0
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the signature module has been around for quite a while,
there is no longer a reason to leave it optional.
At the same time, we set the minimum Python 3 version to 3.5 .
Some comments are reworked as well, but nothing real changed.
Task-number: PYSIDE-510
Change-Id: I9e960f390d507d24bb45f7028838755fe23e751d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Python Limited API brings certain restrictions to PySide.
This document contains an overview and all relevant changes.
Furthermore, there are appendices which show how the
type transformation of the extended types was done
and how it was verified..
Task-number: PYSIDE-768
Change-Id: Ifd6fd3740c23deaed65cce1ba12f17e5f093f18f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When types have attributes starting with two underscores but
ending with at most one, Python uses name mangling to create
a unique private variable.
PySide needs to obey this rule in the tp_getattro methods.
We implemented it as an optimized _Pep_PrivateMangle function that
solves the problem internally without exposing the _Py_Mangle
function.
Remark: I think the exclusion of the _Py_Mangle function is another
oversight in the Limited API.
Task-number: PYSIDE-772
Change-Id: I0bfc2418dae439e963a16e37443f2099c6980696
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Some formatting was not ok, some ordering of methods
was not perfect, some code vanished, bufferprocs had a bad
filename, and descrobject.h did not need a patch, anymore
since things were solved in signature.cpp .
Task-number: PYSIDE-560
Change-Id: Ibd1bedf0763ebb3fbbfd33a8e7cff4b5af6fab5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Request deterministic ordering of QHash.
Task-number: PYSIDE-757
Change-Id: Ifec8f9d39cb183cffeb58440156204f2ccb56a2c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While trying to document the Limited API Project,
it suddenly struck me:
We can make the patch much much simpler and implement it
without the necessity to have an extra PepType!
Now I am happy to continue the documentation, because
it is now no more improvable.
This version will last as long as the layout of
PyTypeObject does not change substantially. When that
happens, then we need to rewrite stuff with the according
PyType_GetSlot() access functions.
These access functions will until then be complete enough
so that we can live without the tricks like inventing a reduced
PyTypeObject as was done in the current implementation.
Task-number: PYSIDE-560
Change-Id: I49849cc377baa6794a5b53292691e21d6e2853ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
The option is a workaround for an old LLVM bug and is no longer needed.
Worse, it causes parse errors in code that declares throw().
Task-number: PYSIDE-62
Change-Id: Ib72b14cc704c04ae3b4197fd2af718276e3fe788
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-727
Change-Id: Ia79f34ed466eb7652946e49db6ef6db8dd9fa03d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
The flags structure should give correct full names.
See the doc in the issue tracker.
Task-number: PYSIDE-747
Change-Id: I6b5c602566d3e4b8a2a93e2522e92da956578b18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When Python 3.7 appeared, the structure of pystate.h was changed,
substantially. Unfortunately this structure contains the trashcan
code, which is only available as a macro and not part of the limited API.
This code is normally not used by application programs.
It prevents crashes when chains of millions of objects are deallocated.
I disabled this for now when the limited API is active.
As soon as somebody complains about crashes, I will try to implement
it again in a safe way, but I am not sure if it is worth it in the first place.
Task-number: PYSIDE-737
Change-Id: Id0daf391448ddcb9df3d299f859ef024714fa736
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
| |
Extend the check introduced by 4725008aeea407ae55cfd66de802dd9e06412efc
to CentOS.
Task-number: PYSIDE-733
Change-Id: Iaaf2b8af0fa03684d4a3cbd5c5e70e141d125139
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Certain Python files were no longer used when moved to Python 3.7.0 .
To finish that, these files are now also removed from the source.
As a consequence, qt-attribution files needed to be changed.
I took the chance to also update the license files to the new version.
Change-Id: If058d1013f1d8cb937ee0305a5eb21ae2ebdd4e0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the homebrew version of Python 3.7 appeared so unforeseen
early, I felt inclined to fix these glitches, immediately:
In Python 3.7, the typing module was more changed than expected.
Since we don't support versions below 3.5, it was easy to fix by
avoiding to copy typing.py for version 3.x, altogether. It stays there
for Python 2.7 .
Furthermore, the Python issue 33738 will later be solved than the
code expected, so I fixed that one for all by a macro definition.
Task-number: PYSIDE-741
Change-Id: Ia56ccd1ef20cb9536b1d39f190e011e5dccf1f22
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A brew build environment sets up a clang shim (fake clang ruby script
that sets up additional compiler flags), which passes all
brew formula dependency include paths as system include paths
(via -isystem). This also includes the Qt dependency.
Because our clang parser currently ignores system headers
(see Builder::visitLocation in clangbuilder.cpp) and
because Qt include statements inside header files would resolve
to the system header location, this would result in no Qt classes
being recognized by the API extractor, and thus fail the build.
Fix this by checking for an environment variable that brew sets
inside its build environment, to filter out the unnecessary
-isystem flags.
This way the Qt include path would be passed as a non-system include
path from CMake, and thus correctly complete the build.
Task-number: PYSIDE-731
Change-Id: I9b543eddc85270f1e8a90d9f30194b2a862e80d7
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alberto Sottile <alby128@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Check the cursor availability to detect deleted functions. This fixes
the build of the Qt 5.12 API, which for the first time has a
Q_DISABLE(QCBorStreamReader) in a public section, causing a copy
constructor to be reported.
Task-number: PYSIDE-487
Change-Id: I31ba0103cf612a4238c0e282ffcfeeab29df97d1
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the enumeration to the scope stack only if it actually has values.
This occurs for the first time in Qt 5.12, which introduces a forward
declaration of enum class QCborSimpleType at
src/corelib/kernel/qmetatype.h:65.
Task-number: PYSIDE-487
Change-Id: I5798eb8e47bcd4d21dc554dc5cdd257c7163ca90
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Py_TPFLAGS_DEFAULT in Python 3 has the
Py_TPFLAGS_HAVE_VERSION_TAG flag, which causes
the type attribute cache in _PyType_Lookup. According to
the Shiboken implementation for Python 2, this is not we expected.
So remove the Py_TPFLAGS_HAVE_VERSION_TAG flag from
Py_TPFLAGS_DEFAULT in Python 3.
Task-number: PYSIDE-60
Change-Id: Id731a59b65640eb5adea56fe06e0deb58ac4a168
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the fix for PYSIDE-441,
another issue appeared related to QVariants and PySequences
PYSIDE-641, which was related due to the nature of this
python data type.
The problem had the same root cause,
using PySequences assuming they are always finite,
but not including the case of a class implementing
the __getitem__ method without a length.
The fix for PYSIDE-441 did not include the option
of having incomplete PySequences, so this change
add an extra condition to transfer the ownership
of a incomplete PySequence element.
Task-number: PYSIDE-671
Change-Id: I72ed1f5ea51c0c5b5a40ec51ab850732eea3c3b9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
This improves the readability.
Task-number: PYSIDE-672
Change-Id: I936ef46fb30af6163b8337adbf9cf585e68f3424
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pre-dating the Clang-parser, there is code that tries
to fix template parameter in template class declarations, for
example copy constructors like:
"QList(const QList &)" -> "QList(const QList<T> &)"
The code no longer triggers since Clang always provides
the parameters, so, remove it.
Task-number: PYSIDE-672
Change-Id: I15949d71fa4391e7088fe0e29a1821487ced2105
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I88c4148000acba2ba1e2013fe587e7f5fbe6c2ca
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C++ language level was previously hard-coded in the default options.
This is potentially problematic for projects using shiboken and also
fell apart with Qt 5.12, where the experimental level "c++1z" used for
MSVC2017/Clang 4 no longer works due to not being able to handle
enumerator value deprecation attributes.
Introduce an enumeration to represent the level and add functions
to convert back to and forth to the respective Clang option.
Add an option to shiboken.
Add a function returning a default value for the emulated compiler,
returning C++ 14 or C++1Z for the CMSVC2017/Clang 4 case.
Task-number: PYSIDE-724
Change-Id: Ie7e19bf7f099a34e6cdaad4b462157a9a3ee8797
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PySide has successfully been tested with the Python 3.7 branch.
There will be no change in the areas that are important for us.
It is then safe to bump the supported version and the limited API version
checks to fully include Python 3.7.
The macro errors in the limited API was fixed by a pull request, but it
was too late to get it into 3.7rc1.
The error workaround was therefore extracted into pep384_issue33738.cpp
and will be deactivated later.
Change-Id: Iec3f277b02cac03a5cf44cbcf955ddc690c112e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
| |
Prepend virtual methods when creating function groups
so that overriding method the most-derived class is seen first.
Task-number: PYSIDE-570
Change-Id: I791e3da09783c4c31ac293060aed8bb2bc8472d5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Replace the search executed at build time by CMake by
a run time search in shiboken since the location at build time
typically won't match any more for the deployment case.
Task-number: PYSIDE-693
Change-Id: Ib15fbba5d8c3fecf30aaae7195b88a648a7ed0fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Refactor class HeaderPath to contain an enumeration for the type
instead of the boolean framework flag and add handling.
Task-number: PYSIDE-693
Change-Id: I60a62b831ddd5ce7519a066135854ff723db2fc6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
| |
Add some handling in case an argument type cannot be parsed.
Change-Id: Ib901d023ed60f74fe82a06d8c08fd704f1350a7a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
The signature is passed through TypeDatabase::normalizedSignature()
which calls QMetaObject::normalizedSignature().
Keep the original signature and output it in the error message.
Change-Id: Ibd1ddd0dee17d828710caf4bf6d674c35776b4c2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Replace .cpp by .py and try to find the snippet. Fall back to .cpp.
Task-number: PYSIDE-363
Change-Id: I82b23df9894e626c97b44dc5a841f5fa70ae1d57
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we transform QVariant arguments to internal
types, starting from the Python ones, to others
related to shiboken.
After checking if the current object is a PyDict
we proceed to check if it's a PySequence.
PySequence is the complementary 'sequence-like' type of PyDict,
and allows finite and infinite sequences,
like lists or generators.
The problem is that when one implements a class
which includes the __getitem__ method, Python already
thinks that it correspond to a PySequence, then
we try to get the elements to transform into
a QList<QVariant> but it fails at the first attempt.
The solution was to not assume that all PySequences
have finite length (or a length), and also to have
a fallback case similarly to the PyDict treatment,
wrapping the PyObject as a QVariant.
Task-number: PYSIDE-641
Change-Id: I3b755f47ed076147024de38e5e0a86932d981f88
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
This is to start generating snapshot wheels again, so that they would
not override the v5.11.0 release wheels.
Change-Id: I1b4c5211471ec760cad14d56aa3ee2102fea5322
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
|
|
|
|
|
|
|
|
|
| |
And in shiboken_version.py.
Change-Id: I52132c555ee9a911c2232f5eeabfa0d7960990bc
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ie3eefe170294a8eafc91b434650dc483aadf02c0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| | |
Change-Id: I2de0fe8456fca242c56ea28520126f9ebbf540d8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The functions which were named Pep384XXX were renamed
in order to get "PepType" as a function-like macro that suggests
the similarity between "PyTypeObject" and "PepTypeObject".
But the renaming of the module initialization function was not
intended.
Change-Id: I555633ccbd8e1354c27f2c1957c81905be54d86b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
By lots of editing, somehow an expression in voidptr.cpp
became incomplete.
We should improve the current test to be certain that the
VoidPtr is working.
This problem can be avoided by not doing many type
casts at once.
Doing the same in two steps is much safer because a forgotten
call would give a compile time error.
Task-number: PYSIDE-560
Change-Id: Ibb24a27f439cbda490723131f34f93978725420f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace struct TypeParser::Info by TypeInfo and remove
TypeParser::Info. Move method
TypeParser::Info::instantiationName() to TypeInfo
for this purpose.
Change TypeParser::parse() to return TypeInfo.
Task-number: QTBUG-672
Change-Id: I123d5bf378ad146867b571e47e31ae08a92b2504
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The qualified name was obtained by splitting by "::", which would
result in
"std::list<std::string>" -> ("std", "list<std", string>").
Fix by splitting up to first '<' or '(' only.
Task-number: PYSIDE-672
Change-Id: I9d790535e877da251a5b6c352dc550e4077877bd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The available constructors for QByteArray are now:
bytes, bytearray, and QByteArray, unicode is not
accepted anymore.
Also the concatenation is now possible between QByteArrays.
Even though is not possible to initialize a QByteArray
with an unicode, we include the possibility to compare it with
one (Compatibility with PyQt).
The __repr__ and __str__ are now properly working.
There seemed to be a confusion regarding data types between
Shiboken, Python2 and Python3 related to bytes,
so now the structure is based on the flag SBK_BYTES_NAME,
which is define as "bytes" for Python3 and "str" for Python2.
Many tests were modified to properly handle string,
using the `py3kcompat` module.
Task-number: PYSIDE-232
Change-Id: I8b671f367c60a0870c72dcbe5662106b3225037d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If `unicode` is used in Python 2,
shiboken cannot properly translate it to `const char *`.
sbkstring did not supported a proper conversion of unicode
types in Python2, and this change includes it.
Task-number: PYSIDE-100
Change-Id: I3a70d935ad61b0e567e620c62754800370270a6b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I31a0ff26bc02e6cc2ec2a816c16d170fc334f800
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It was weird seeing "-DFORCE_LIMITED_API=yes" being passed from
setup.py to CMake when "--limited-api" is not included on the
command line, and then seeing "-DFORCE_LIMITED_API=yes" with Python 2
builds. It gives the impression that maybe it could work with
Python 2.
Instead, don't pass "FORCE_LIMITED_API=yes" from setup.py by default
(but still pass it if it's present on the command line), and instead
default to "yes" within the CMake project themselves.
In the end nothing changes, limited API builds will still be default,
but at least it's not as confusing to see the
"-DFORCE_LIMITED_API=yes" lines for Python 2 builds in the CI log.
Change-Id: I08c863394dd148d88bec324a6cab35459d75303a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This includes .abi3.so on Linux and macOS, and .pyd
on Windows. Otherwise if you build with Python 3.6, and
try to install the package on Python 3.5, none of the
modules would be found on import.
Change-Id: I56639da6319cfa06e23ae793d66099813074adf4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the condensed checkin of 18 commits which created
the implementation of PEP 384.
Task-number: PYSIDE-560
Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|