| 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>
|
| |
|
|
|
| |
Change-Id: I39210642a96e98328d193f4e81ecad82b496d6c9
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 second part of cleaning up the C code
from references to Python 2.
Task-number: PYSIDE-904
Change-Id: I3006412c2a5bb65402101b0aac5a5f2fc79ce2f8
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: I0e84b56ce354f3c88cb05a5818e80a28210d888b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After implementing property objects for PySide, the static
properties (properties for static functions) were quite missing,
for instance from QtCore.QCoreApplication and
QtWidgets.QApplication .
This implementation uses the normal Python properties and derives
a PySide.ClassProperty class which works almost the same on classes.
The static methods had to be mutated to class methods explicitly.
That would be automated by PyType_Ready, but here we are doing this
after class initialization.
Task-number: PYSIDE-1019
Change-Id: Iabe00be18e25881cc7a97507b6fdae3e2d57ff7a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Make it possible to disable the generation of a C++ wrapper
in case that poses some problem.
Task-number: PYSIDE-1202
Change-Id: Id0d557e4d4a57cf537be8fb398161aea3a16e174
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
| |
It does not make sense to move it around in each major version.
Task-number: PYSIDE-904
Change-Id: If83b1dcaf04ed5a76f35073aa63c7ef6b456936a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to AbstractMetaType, AbstractMetaArgument was previously
kept as a raw pointer. The data were copied numerous times by
AbstractMetaArgument::copy() when adding the inherited functions to a
AbstractMetaClass.
Similar to what was done for AbstractMetaType in
6cad0686101b252cfdbd1a6768a2b02c39aa1d8a, change the type to be based
on QSharedData[Pointer]. It can then be passed around and treated like
a C++ value type, with Qt sharing the data when possible behind the
scenes.
* Remove inheritance from AbstractMetaVariable by moving
the fields over.
* Remove the unused field m_originalName.
Change-Id: Ic9e476ca71e163de131fbecc267d0a4e336cb0b9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
| |
It is required for further refactorings.
Change-Id: Ied5c73494546f3345cc76d2c9f1a808b7c5ee1e0
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
| |
Bail out on invalid types whose type entry is 0.
Change-Id: I088c6f2d3374603266c3804279152e468a754312
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
Return a struct instead of a plain list from
Graph::topologicalSort() which contains the offending indexes and
output the elements in case of failure.
Task-number: PYSIDE-1202
Change-Id: Ib7f70c78be0e84272f31d802677c7fc333aa32f4
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Typedefs of template parameters like
template <class T> class QList
{
using reference = T&;
are reported as "type-parameter-0-0" by clang. Resolve that to the
proper name of the template parameter in the clang builder. Also,
these typeinfo results must not be cached since the same CXType is
used for parameters of unrelated templates. Rename the
createTypeInfoHelper() function to createTypeInfoUncached() for
clarity and introduce a cacheable parameter.
Change-Id: I2b21a4dfdd8d86cf36497832837c21f37cb86518
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, shiboken2 kept AbstractMetaType by a raw pointer. The data
were copied numerous times by AbstractMetaType::copy() when adding the
inherited functions to a AbstractMetaClass or specializing templates,
sometimes with a bool flag indicating ownership.
To get rid of the copies and ownership issues, change the type
to be based on QSharedData[Pointer]. It can then be passed
around and treated like a C++ value type, with Qt sharing the
data when possible behind the scenes.
- Extract AbstractMetaType to a separate header/source
- Remove unused AbstractMetaType::setInstantiationInCpp()
- Remove unused member m_package
- Rewrite the comparison of AbstractMetaType which
becomes relevant for checking/detaching to do a complete
comparison. It was previously unused, intended for
a different implementation of view types with special cases.
- Rework debug formatting
- Invalid meta types are indicated by the "Invalid" usage pattern
instead of null pointers
Change-Id: Ic4b1feecafb4f0355f39e178c2703b104e45cf6c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\
| |
| |
| | |
Change-Id: I68ec1e4b80fcc8c395eacb7d5046fdd8e00535e0
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Updated test to accept base types derived using std::shared_ptr;
* Generate new coode to be able to convert smart pointers into shared
pointers of base class.
Functions that accepts SharedPointer<A> as argument should be able to
accept SharedPointer<B> if B is derived from A.
Task-number: PYSIDE-1397
Change-Id: I7e5235980daaf4651dad3ab1c880373f1c64e134
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I8831b840fa7816b8919ecbaab17b41822a0a6012
|
| | |
| |
| |
| |
| |
| |
| | |
Register the correct name for smart pointers.
Change-Id: If12701901319b0578602ff5b5ab8eecad820d969
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| | |
Add the missing call to decideUsagePattern().
Change-Id: Ibfe07afa3f830cefc953b8702aeca57e2b615f36
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* add new way of building rst-only documentation
* Updating recommended libclang for 5.15
* recommending python 3.5+
* link commercial license
* Show videos as grid
* changing title of a tutorial to be more specific
* add missing step to build only shiboken
* add venv as an option before virtualenv
* add problem on windows and python 3.8.0
* add section to create a virtual environment
* only show titles of tutorials to avoid having a long page
Change-Id: Iebb99d2cd776c3d5b72dc44153f325f74a1626cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure that we have copy constructor for SharedPtr with derived
types.
This will be necessary for test SharedPtr implicit conversions.
Task-number: PYSIDE-1397
Change-Id: Ic970c84bef025403a0fbef79dce97433254d2f56
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: Iaabea628351fac9da88b5779b537f62262ff82a7
|
| | |
| |
| |
| |
| |
| |
| | |
Use constFirst/Last() instead of first()/last().
Change-Id: I3e7c72e3ab72b86565eea087b470f2a51b2999f8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The test uses "ushort" as a type name, which is apparently
pulled from some header with increased language level.
Use a real custom name to circumvent this.
Change-Id: I6f3ba16d8f25f5b12edcfd53b1397de9f7c1d583
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not consider RValue-references as invalid types;
this causes an assert crash by 556c13f39244b4eb75638cd8f4434167eadf0c98.
They are filtered out later.
Change-Id: I6c477bb8319aa99ad73ff9a002ec11992a9ac538
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce new values for the pattern enum representing
template parameters, which were previously invalid and add
a missing call to decideUsagePattern().
Change-Id: I7edeb80a67ab1edfe895e96311d54c9128fad5a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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>
|
| |\|
| |
| |
| | |
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>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Split the code adding the specialized template functions from
AbstractMetaBuilderPrivate::inheritTemplate() into a separate function.
The part setting up the base classes can then be called at an
earlier stage so that it is known when traversing the functions.
Task-number: PYSIDE-1202
Change-Id: I958d357b78572c9b5130dbe1bf517d2af82a6f1a
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Mimicks some template which might be used trying to enforce
correctness of units by type checking.
Task-number: PYSIDE-725
Change-Id: Ia7008d7db5638920eee3d0ef36cc32a63796b98e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I46f5d2dc758d0e1f23377c91ba7496793461771e
|
| | |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-1202
Change-Id: I7039b113ffd43289f96f890ca55cb5b9b4607c92
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- AbstractMetaType: Pass TypeEntry to constructor
- AbstractMetaType: Return instantiations() by const ref
- AbstractMetaClass: Make baseTemplateInstantiations a member instead of
a global hash.
Simplify the code accordingly.
Task-number: PYSIDE-1202
Change-Id: I1a18aa4ff97481af8cb13e8732fe3952c48edb29
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, nullptr for an AbstractMetaType meant "void", particularly
for function return types. The problem with this is that it
causes unexpected crashes when dealing with template types
like QFuture<void> due to one of the instantiations of the
AbstractMetaType being nullptr. Use an AbstractMetaType based
on the existing "void" type entry for this.
Task-number: PYSIDE-1202
Change-Id: Ib06035cc7903480fd509f7e927d9114c55d51b62
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't output the generateCode field in hex after
4761ea81d1789d153ae986be6f749853f5a68332.
Output typedef entries of type database.
Task-number: PYSIDE-725
Task-number: PYSIDE-1202
Change-Id: Ib194eceedf2764a9c23353f4a833cb1e57a6e359
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I7f16e4f178bff9c37af3b7a9d536c5d6f42c66fb
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Static properties are not easy to support.
They need an extra property subtype and support in the meta-class.
A problem is that the implementation needs to go deeply into the
innards of things and need to use `_PyType_Lookup`.
That is hard to circumvent when the limited API is used.
Therefore, the current implementation will be it for 5.15 .
At most we might add a few missing properties through XML.
Task-number: PYSIDE-1019
Change-Id: I56a9eabe5f774c1ff04c149227e06318c8bf4f29
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I30aaad19852c50b1222222ba66171f9c98ecb7c8
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Skip base classes whose generation was disabled by reject or
generate='no'. This can happen for typedef entries.
Task-number: PYSIDE-1202
Change-Id: Ie6fac2408a6aa7b3303b4f06e744a2d2405e2a30
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
TypeEntry::CodeGeneration::GenerateCpp was unused. Consequently,
the GenerateAll mask is not needed, either.
Replace GenerateCpp and GenerateTargetLang by a generic GenerateCode
value.
Introduce a new GenerationDisabled value to be able to distinguish
a generate='no' XML attribute from a plain rejection.
Fix many invalid usages of bool generateCode() testing against
the flag value.
Use the enum instead of uint for the code generation field.
Task-number: PYSIDE-1202
Change-Id: I0aec5bd1ebfb9a50b80d5a187372c4271490e1b3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For wrapper types, generate the class-related extra includes into
the wrapper header since they might be required for it (for
example, instantiation type of a typedef typesystem entry).
Task-number: PYSIDE-1202
Change-Id: I9f57bdfe54d6273e4a1ffa9570e3352959dea480
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extra includes might be required for the template instantiation type.
Add the includes and modifications obtained from parsing the
sub-elements to the target entry in endElement().
Complements bfd1de3495b18c0ecc251260442a9a46009861e.
Task-number: PYSIDE-725
Task-number: PYSIDE-1202
Change-Id: I71e399879feb641238d4d6035faa3f4c34932a87
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| | |
Change-Id: Ife42d7a3f855816c66dcbd4b8062b72f947510e7
Fixes: PYSIDE-1398
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When checking a debug build, refcounting problems showed up.
The reason was that somewhere the static strings were
treated with normal refcounting. This is easily possible if
some string is used in the interpreter: The string becomes
interned, maybe before it is used by us, and will be
deallocated without our knowledge.
We are turning the list of referenced strings into a set.
Also, the strings are made immortal by adding one extra count.
This way, our set does not need to cope with deletions and
will work either way.
The final cleanup removes that, anyway.
Change-Id: I192ea47f739cc785ea3e354cfb82c5fa5a6eac78
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When checking a debug build, refcounting problems showed up.
It is unclear where references are lost, at the moment at the
strings "__div__" and "__idiv__".
It is possible that these strings were already in a destruction
list of another module. When turning the list into a set, the
problem vanishes, because we no longer know how much references
to expect. Because they are not negative, this seems to be ok.
Change-Id: I0bc59b83f43becf5ee5f5f19213fc46513041909
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| |
| |
| |
| |
| |
| | |
Remove the version-dependent #ifdef.
Change-Id: I15907500ab95d9e48d90a57893197c9b4f18a037
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I89aa3d4c4a3fa274e2c5ccd8b5facb9531137e80
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Replace the macro generated into the code by the one
introduced by 430d02db24b95a56ae0acc6a9df6a0effe49da0d.
Change-Id: I8e713ff25c180a22569a3ba589d04dca43fdc804
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Factor out method to write the operator functions and call it for the
module wrapper, too.
Fixes: PYSIDE-1326
Change-Id: I5b6faf19d253d5828474dec36b454aa20753123c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|