| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\|
| |
| |
| | |
Change-Id: I7b4ff138799ee81940c36e68a105cb42bb38a3ff
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is one of the lesser known things that any project generating
bindings for Qt-based code needs to include pyside2_global.h in
order for signals, slots and properties to be recognized, since
the annotation macro definitions are in this file.
Move the definitions over to shiboken2 to remove the need to
include it.
[ChangeLog][shiboken2] Projects generating bindings for Qt-based
code no longer need to include pyside2_global.h.
Change-Id: I531bb7444561ccfc352f3be09ecdf854f9f7dd3d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For the 3 libraries that need to export symbols,
(libshiboken, libpyside, pysidetest), fix up the
export/import macros to follow the Qt convention:
- Define generic export/import macros LIBSHIBOKEN_EX/IMPORT equivalent
to Q_DECL_EX/IMPORT. Remove definitions for the ancient g++ 4.X.
- Reuse those in libpyside, pysidetest as PYSIDE_EX/IMPORT and
PYSIDETEST_EX/IMPORT.
- While building, define some BUILD_ macro indicating export.
- Define the _API macros depending on the BUILD_ macro to be export or
import, respectively as is done in Qt. Remove the ugly hack in
pysidetest that tried to re-use the PYSIDE_API macro.
- Brush up the headers a bit.
Change-Id: I635891b7eec5a52a1dcf45022f7bfb6a9cfee83f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: Idaf124ad5e1d6a41d52918cecba47499be5e7324
|
| |
| |
| |
| |
| |
| |
| |
| | |
Remove space and use reinterpret_cast.
Task-number: PYSIDE-1326
Change-Id: I1adfc545c97278eb7da01aec550cb6e2e15945ba
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
namespaces
Add them in ShibokenGenerator::getFunctionGroupsImpl() with some
helpers.
Fixes: PYSIDE-1075
Change-Id: Ie627c6e12f82e40cdb4f306ddac6b682e77124c5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
functions
Mainly add those in ShibokenGenerator::getGlobalFunctionGroups() with
some adaptions.
Task-number: PYSIDE-1075
Change-Id: I6dabac72c204904e76162542b5aa3ea1ac3b56ec
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To avoid having to add a
ShibokenGenerator::lookForFunctionsInClassesNotToBeGenerated()
to fix the function issue,
replace ShibokenGenerator::lookForEnumsInClassesNotToBeGenerated()
by several helper functions:
- Add a list of top level invisible namespace to the generators
- Add functions to retrieve enumerations of nested invisible namespaces
to AbstractMetaClass with recursion helpers.
Task-number: PYSIDE-1075
Change-Id: I421113770e622611caeb221498b872d0a6ba1aeb
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Generate the sbk-index values for enums in
writeTypeIndexValueLines(AbstractMetaClass *) for invisible
namespaces as well instead of adding them to the global
enum list. Remove checks for private/protected on global enums
as they originate from namespaces.
This removes one usage of
ShibokenGenerator::lookForFunctionsInClassesNotToBeGenerated()
which will be removed in a consecutive change.
Task-number: PYSIDE-1075
Change-Id: I9ee7aba20802e9794f371006f9fdbd7ab8d67cab
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since the process to get the documentation built
is to build the whole project, that is too time consuming.
Additionally, using qdoc on the Qt API takes a lot of time.
This patch introduces the setup.py option called 'build_rst_docs'
which skip the general build, and only generates HTML documentation
based on all the .rst files we have for shiboken and pyside.
To use it:
python setup.py build_rst_docs
The build will throw warnings related missing directories, and files,
which are generated on the 'qdoc' process, but since they are skipped
they are not present.
Some missing references warnings are skipped due to also come from
the qdoc-based step.
Task-number: PYSIDE-1106
Fixes: PYSIDE-1390
Change-Id: I4118fd3b64e217717df6cae093138f6951d37094
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
protected hack
Add a missing check for final class.
Amends 170756fa1e5de0ce7ba33521f1eb168d70ad276d.
Fixes: PYSIDE-1388
Change-Id: I6b7cd5c9a769838287ac7165bdc2d5ad63b289a1
Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the tests for PYSIDE-1074 from samplenamespace.h to
removednamespaces.h. The latter has also a test case for an
invisible namespace under a visible namespace besides the
invisible top level namespace test.
Task-number: PYSIDE-1074
Task-number: PYSIDE-1075
Change-Id: I5d1c6428f6ceadf929063c2c69723a7871173f4e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add functions that indent/outdent for usage in a stream statement.
Streamline the code accordingly, removing unneeded braces
in one case.
Change-Id: Iac4a16919eebdb667bbc302b0f937cc03a01c724
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This allows for removing a few temporary variables and/or qAsConst().
Task-number: PYSIDE-1075
Change-Id: Ib48070950ac682ec66e19af3dc8c0be5bfdffcee
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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: Ie6da3938b82f5ebe96dd12bd65a3ccc4180d2fba
|
| |
| |
| |
| |
| | |
Change-Id: I07a87ad49546534f3492b534b2a2dd4945304de7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change the formatting for better readability and use
the "visible" attribute instead of the deprecated "generate".
Task-number: PYSIDE-1075
Change-Id: Ibbb33d2482c1d682f74d2edce2dd7d3bb1a50821
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
lists by const ref
This allows for removing a few temporary variables and/or qAsConst().
Task-number: PYSIDE-1075
Change-Id: I0fe3544f0ce4d3a8d56de9c93e300972e0844177
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Add an XML attribute specifying whether code is to
be generated to the XML properties.
- Split the generator functions for field setters and getters
apart so that they can be used for generating property
setters and getters.
- Generate code for all properties from XML when the PySide
extension is not used, otherwise only for those with
the attribute set.
Task-number: PYSIDE-1019
Change-Id: Iab2ba38b90038edc667a233c23c7113fdc6fb438
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The signature module has grown groups of rather unrelated
topics. In order to reduce the complexity, we break up
the source into a number of files.
Reason for this change was building support for selectable
features, which should not get lost in all the unrelated
helper functions.
Task-number: PYSIDE-510
Task-number: PYSIDE-1019
Change-Id: I8e22a91db1882f8c5428b8def13bf9f1cea431fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Properly indent and join the else if statement.
Task-number: PYSIDE-1019
Change-Id: I8d5dc6c84e19b97b55f1ba29094da1e31dc7ca1c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the getter/setter functions and related code.
Apparently this was some early, unfinished attempt
at properties.
Task-number: PYSIDE-1019
Change-Id: Iff196da7b7bfb7b30b724405405decf36201b259
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: I7e4c7f9378706438715362b1e2da9a3cd2794562
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a list of TypeSystemProperty to ComplexTypeEntry, parse it from
XML and add those properties in
AbstractMetaBuilderPrivate::parseQ_Properties().
Task-number: PYSIDE-1019
Change-Id: Idf6ecde7c9de6bf1e56be423921672152e97de70
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce line breaks. As a drive by, remove unneeded
self-assignment.
Task-number: PYSIDE-1388
Change-Id: Ia9c7cd66814621f02625e3140724483d6b71f1c7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
And we change the function style to no longer use the Python
formatting like
typespec
funcname(args)
but
typespec funcname(args)
Change-Id: I3dc28f7af5a54eade6711e7d5465a972ff9796f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Store AbstractMetaType instead of TypeEntry in
QPropertySpec for more complete type information and
better parsing.
Introduce a struct TypeSystemProperty to the
typesystem which can be later populated from a newly
introduced typesystem XML element. Rewrite the parser
to first populate a TypeSystemProperty and convert it
to QPropertySpec with type lookup in a second step.
Change the parser algorithm to first look for any of
the READ/WRITE tokens and split the tokens leading up
to them into type name and property name in order to
parse complex types like
Q_PROPERTY(QList<QSpriteSheetItem *> sprites READ sprites..
correctly.
Task-number: PYSIDE-1019
Change-Id: I942bc659cc236d31041cdc22e26a82d270599033
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Move the class and the parser function into its own source file.
Task-number: PYSIDE-1019
Change-Id: If403f799f6b8da769fd8b47dd958a7430d061ad8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: Id0fc76666bbdb254a833eeb6909a0874b2611bf3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The type converters for class-type member fields need to be initialized
before the respective classes; thus a dependency needs to be added
Generator::classesTopologicalSorted().
Factor out common code and loop over the member fields,
adding the dependencies to the graph.
Task-number: PYSIDE-1224
Change-Id: Iec306aa7559453d41f7f62fefd5825db66aa4815
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
They were ignored in the code parser. Take them into
account and add a test.
Task-number: PYSIDE-1224
Change-Id: I3baca95556129d695db294fdcc1ad92fc831672d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the paragraphs explaining Python / C++ wrapper classes
to a separate new page and make it visible in the TOC.
Add references from where the 'class' attribute is used.
Task-number: PYSIDE-841
Change-Id: If55533e4e3c9acddc08f311802747ccdedfcbf02
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-1212
Task-number: PYSIDE-1367
Change-Id: I3b1bbab3e14888d9520868d1f20860f30cbef0a9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: Ia31df23a16575f9ecefe13ec85fb70197d103278
|
| |
| |
| |
| |
| |
| |
| |
| | |
The underlying issue has been fixed.
Task-number: QTBUG-69389
Change-Id: I67416a9db7488db5f851ecb2f07884fbb410e4f0
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>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a separate header with the type names and use that.
Add the missing long long on this occasion.
Task-number: PYSIDE-1372
Change-Id: Id3c35c6b2c4e7eebfe1d25b555ab62468cb89f1d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|