| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Find the AbstractMetaEnum belonging to the type entry and perform some
checks. Generally do not use int for public enums. Warn when a
protected scoped enum is encountered as this cannot be converted.
Task-number: PYSIDE-817
Change-Id: I02b566093b331ea2ea627bf72964aad0a1a51c83
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
sources/shiboken2/tests/libsample/objecttype.cpp:283:17: warning: unused variable 'fake_child' [-Wunused-variable]
sources/shiboken2/ApiExtractor/doxygenparser.cpp:71:15: warning: unused variable 'numPrefixes' [-Wunused-variable]
Change-Id: I409f22e1450e9ae0f3f5924cb6dd47991d12a2ad
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QAbstractRayCaster is the first class in Qt to use type aliases:
using Hits = QVector<QRayCasterHit>;
Treat them as typedefs if a canonical type can be obtained for
them. This requires adding some simplification of the canonical types
obtained for standard containers.
Task-number: PYSIDE-751
Change-Id: I521a8b02d3c8cb89e4f72a817fbacc5955041570
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Task-number: PYSIDE-752
Change-Id: I88d8bf7598b9dc74adec9a4aaee8bd90db8ae6e9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First encountered in:
QtScxmlEvent::setEventType(const EventType &);
The metatype was wrongly detected as NativePointerPattern
in AbstractMetaType::determineUsagePattern().
Introduce a helper for detecting plain const-ref and use
that consistently.
Change-Id: I6b105bc99ae63e4737c5d628e79f23b7acbcca3d
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Wrap value in int(), which is required for enum classes.
Add a compile test to libsample.
Task-number: PYSIDE-487
Change-Id: I78f07ae66da64caad1f75722308256e40e91eded
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\
| |
| |
| | |
Change-Id: If56adeea2f888d8bc34e202b697f735508896c84
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The macOS 10.8, PySide2 branch 5.6 integrations were misteriously
failing with crashes on exit in the objecttype_test.py test, with a
stack trace similar to:
0x00007fff8899e90a _sigtramp + 26
0x0000000100784710 0x0 + 4302849808 (note the 0x0 address)
0x0000000100055408 dict_traverse + 168
0x0000000100107f77 collect + 407
0x00000001001089f4 PyGC_Collect + 52
0x00000001000ef503 Py_Finalize + 259
0x00000001000eefca handle_system_exit + 250
0x00000001000ef235 PyErr_PrintEx + 469
0x00000001000efebb PyRun_SimpleFileExFlags + 299
0x00000001001071dd Py_Main + 3101
Reproducing it on a CI VM was very difficult, requring dubious
manipulation of PATH, PYTHONPATH and LD_LIBRARY_PATH environment
variables. In the end the issue was diagnosed to be heap corruption,
and thus the difficulty in reproducing it.
The testParentFromCpp test in objecttype_test.py calls
the destroyCppParent method to delete its parent. Because
the deletion of the parent invokes the destructor ~ObjectType(), that
in turn deletes the child. This lead to head corruption, because
the child "o" by destroying its parent, destroys itself, and once
the "delete m_parent" is done, the next "m_parent = 0" would write
to invalid (freed) memory.
In a release build of the Python interpreter, this ends up in
accessing the freed memory in the GC collection phase (but under a
debugger this crashed in several other random places).
The fix is to delete the "m_parent = 0;" statement, so that nothing
is written to freed memory.
Change-Id: I2d7a41b99a3255ebb300e6157b3dd0d78eb27a54
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the exclusion. Required for
Qt3dExtras::QAbstractCameraController::moveCamera() in 5.10.
Task-number: PYSIDE-487
Change-Id: I67ae24d4cda2d90ac30c97f77457c2eaf65099ab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Replace virtual by override where appropriate to make the code
clearer.
Change-Id: I143daf29f1c162b2de959411a5f4acdc43a2b253
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Check the attributes and add test.
Change-Id: I6c3d76ed32b5d20b6940849dd4895f98abd62fca
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I79637555fbfbd596dee4313baf80149d03bb5206
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
shiboken used to generate richcompare methods for namespaces when
it contained free comparison operators for classes in that namespace,
resulting in compile errors. For example:
namespace Qt3DRender {
bool operator!=(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
...
Add a check preventing that.
Task-number: PYSIDE-487
Change-Id: If2fa1de1bfb0fdc11c9415421dab0c7e13abc500
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I72583df407fc5b3caa8bf35fd997889a4ac86512
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change introduces a new type into the shiboken2 module which is
imported by calling "import PySide2.support.VoidPtr".
The type takes care of conversions from / to void* values in function
signatures.
Creating an instance can be done by passing either a shiboken wrapped
object, or an integer representing an address, or a python object that
implements the buffer interface.
For example, this is useful for passing numpy arrays to C OpenGL
functions that take void* parameters. First you convert the array into
a bytestring (using numpy.array.tobytes(), then you instantiate a
VoidPtr from that bytestring, and finally you pass it along to a GL
function.
One corner case that is currently not supported is void** parameters.
Change-Id: I01e291d6856cb6bd8b5175adc3ead6b728036535
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Add simple array converters giving access to NumPy arrays.
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: I2446b0f1ef98eaf12df95e4bd0e03d73e0cd7126
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a SbkArrayConverter struct which provides a list of
check functions that return a converter function
for an array of matching size.
Add simple array converters for arrays of C++ primitive types.
Instances of the ArrayHandle<>, Array2Handle<> templates will be
generated which may point to internal data or allocated arrays.
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: I157606891fad345ccd7af6d4a9d4dcb0c634b2f4
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.
|