| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Task-number: PYSIDE-834
Change-Id: I2530b44f704ef96b784a77512f71777d9fd492bb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a GUI class happens to be detected unreferenced when garbage
collecting in a non-GUI thread and is subsequently deleted, crashes
can occur for QWidgets and similar classes.
The hitherto unimplemented delete-in-main-thread" attribute should be
used.
Add the missing implementation. Add the field to shiboken's type entry
and SbkObjectTypePrivate class and pass it via newly introduced flags
to introduceWrapperType().
Defer the deletion when invoked from the background thread and store
the list of destructors in a list in binding manager run by
Py_AddPendingCall().
Task-number: PYSIDE-743
Task-number: PYSIDE-810
Change-Id: Id4668a6a1e32392be9dcf1229e1e10c492b2a5f5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add XML elements specifying an exception handling mode to type system,
complex type entries (classes) and function modifications.
From the mode and the exception specification as detected
by Clang, deduce whether to generate try/catch code.
Task-number: PYSIDE-62
Change-Id: Ib76adc21cefd81bf9f82f819a3c151056c33a3b7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Amends 2bfd1de3495b18c0ecc251260442a9a46009861e
Task-number: PYSIDE-725
Change-Id: I4adb9022feee954ca65dc60f07bf71bd9b92dc11
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When trying to specify the base class
template<int R, int C> QGenericMatrix of the QMatrixRxN classes,
clashes of the SBK..IDX enumeration values occurred since
the integers were not part of the type name.
Fix that by dynamically adding dummy entries of
EnumValueTypeEntry for the integer values encountered on the fly.
Task-number: PYSIDE-725
Change-Id: Ie6b4489b5293e04b7c2c76861341c99b136cd558
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an enum has a null value, store that on the EnumTypeEntry for
use in Generator::minimalConstructor() as a default value.
Fully qualify scoped enum value type entries for this purpose.
The value can then be used for default values instead of an ugly
static_cast<EnumType>(0).
Task-number: PYSIDE-62
Change-Id: I42cb2ca63fb1da6c795df630ab30bded66aac901
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The intention is be able to specify
typedef std::optional<int> OptionalInt
in the typesystem file and generate code for it (without having
a typedef in C++).
Task-number: PYSIDE-725
Change-Id: I5847a3c3f68556ac1d0ea3635f65a29caa6cb208
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
This is a prerequisite for adding a typedef entry.
Add copy constructors and clone() methods.
Task-number: PYSIDE-725
Change-Id: I7cee679432be70e2349071f1dd62335fda564fe3
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change defines to variables where possible (not used in string literal
concatenations).
Remove constants only used in one file from the header.
Change regular expressions to raw string literals for clarity.
Replace static instance of the CONVERTTOCPP regular expressions
by an accessor of ShibokenGenerator.
Change PATH_SPLITTER in main.cpp define to a QChar constant.
Change-Id: If6766e0467ca2c635788240414c984d60feef875
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Remove member variables and enumeration values.
Task-number: PYSIDE-743
Change-Id: Id7bff33b180e99e19d02bd895e45e4f0749dc042
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, calls to BEGIN_ALLOW_THREADS/END_ALLOW_THREADS were always
generated since the value of XML attribute was not used.
Fix it to actually use the value. Since having it default to "no"
caused a number of deadlocks (related to thread functions or functions
calling a virtual function (potentially reimplemented in Python),
introduce "auto" as default value. "auto" turns off
BEGIN_ALLOW_THREADS/END_ALLOW_THREADS for simple getter functions.
Task-number: PYSIDE-743
Change-Id: I4833afef14f2552c75b3424417c2702ce25cb379
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
| |
Change-Id: Ied74ec8ca7e3b3c439204c5010b0b727be3b13b2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split up the 1400 lines Handler::startElement() function into smaller
helper functions.
Previously, the function populated a hash with the default values of all
attributes. The values were then set by fetchAttributes() from the XML
attributes and applied later on. In this setup, it is not possible to add
deprecation warnings since it not possible to tell which attributes were
actually present in the file.
Change this to operate on the QXmlStreamAttributes list from which the
consumed options are removed. Add a warning about unused attributes.
It is now possible to add deprecation warnings and the default values are
now more obvious.
Task-number: PYSIDE-743
Change-Id: I1ee04e9490b3664bba4c976fe654183819610b58
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the static QHashes in Handler::startElement() and other places
which required converting and lower-casing the QStringRef's returned
by the QXmlStreamReader by lookup functions that take a QStringView,
which can be constructed from QString or QStringRef.
Task-number: PYSIDE-743
Change-Id: I10234f2ddfff13ee7e0ee67f9aee118a088e5ab8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Task-number: PYSIDE-743
Change-Id: Ie4794c6387ef5ffaf8a5813b744fa725427b5f09
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They were previously stored in a global hash, apparently due to BC
issues. Replace the global set/getTypeIndex/Revision functions by member
functions of TypeEntry in typedatabase.cpp.
As a drive-by change, simplify the code assigning the SBK numbers
to use a flat list of entries ordered by revision and name instead
of a grouped hash (bearing in mind that revision is rarely used)
and might be removed one day).
Also replace the use of std::unique() by the !contains()/append() pattern
since std::unique() assumes an ordered list which is likely not the case.
Task-number: PYSIDE-725
Task-number: PYSIDE-743
Change-Id: I9356acf1f5795446c08f266c1323f1db65cd490c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
TypeEntry::customConversion and ComplexTypeEntry::defaultConstructor where
previously stored in global-static hashes, apparently due to BC issues.
This can now be fixed.
Task-number: PYSIDE-725
Task-number: PYSIDE-743
Change-Id: If4f28246a5b83e3772021a518058a9d152bb3e3f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Normally, only the root typesystem element has a package specification;
there is no need to have virtual functions for it.
Task-number: PYSIDE-725
Task-number: PYSIDE-743
Change-Id: I3b86c8418cf16ce372c1953279a115e2eff0e984
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Task-number: PYSIDE-725
Task-number: PYSIDE-743
Change-Id: I61fcd8af7329c14ef064795c13787005b4375548
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removing the word 'project' from all the headers,
and changing the PySide reference from the examples
to Qt for Python:
The following line was used inside the source/ and
build_scripts/ directory:
for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done
and the following line was used inside the examples/ directory:
for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done
Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
When referring to the project one should use "Qt for Python"
and for the module "PySide2"
Change-Id: I36497df245c9f6dd60d6e160e2fc805e48cefcae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Clang function clang_EnumDecl_isScoped() tells whether an enum is a class,
so, there is no need to specify that in the typesystem.
Use that information to pass it up to the metalang classes and revert the
parts of 44cb6c51e6c3b43376f284941454dc8c13b81c3f that added it to the
type system.
Task-number: PYSIDE-487
Change-Id: Ie10885f74168821d0307e91b6f1f7f3f30dd074b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Change TypeSystemEntry::m_version from double to
QVersionNumber.
- Determine version at the beginning of the start element
processing of the parser and use that.
- Remove AddedFunction::m_version which is not needed.
- Remove unused parameter double vr from
AbstractMetaBuilderPrivate::translateType().
Change-Id: I2941667ba565f8c11aa0c14446ec7d6934da99dc
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce enumeration for the type to EnumTypeEntry which can be specified
by the boolean "class" attribute. For the enum classes, the value names
need to be qualified by the enum name to match the C++ API.
For the C++ generator, add an overload to
Shiboken::createScopedEnumItem() that takes a PyTypeObject and add the enum
items to the enum so that the name is in the enum scope.
Change-Id: Ia0e469d13b08c196b9ddd965b9cf3cc62a38630b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Remove class struct EnumValueRedirection and add explanatory
comment to EnumValueTypeEntry.
Change-Id: Ic4665436f301943805c7985188bc41c4ad3e8336
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
- Use member initialization where possible
- Make constructors explicit
- Remove unused version attributes, unused comparison operators of
FunctionModification and unused struct ExpensePolicy
- Rearrange members to minimize Clang warnings about padding
Change-Id: I1423f120b2117237c2674cdbb6d06923c842999f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Use member initialization where possible. Move constructors/destructors
of classes in hierarchies out of line (fixing Clang warnings about
classes having no virtual out of line methods). Add override and
move virtual functions out of line.
Remove unused method ComplexTypeEntry *ComplexTypeEntry::copy().
Change-Id: Ie4a6c30cb0c99be35697f29ebe407b327079222a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
It should make it easier to specify the <array> modifications
for GL functions.
Task-number: PYSIDE-516
Change-Id: Ieb2e540f61785d13ee46a196a18d03b311d308e1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The modification can be used to indicate that for example
int* is meant to be used as int[].
This is reflected in the NativePointerAsArrayPattern
usage pattern of AbstractMetaType.
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: Icaeb3cce4be9ce06caa2cab628d4e8fc1b684819
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
in preparation for a subtree merge.
this should not be necessary to do in a separate commit, but git is a
tad stupid about following history correctly without it.
|