aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2
Commit message (Collapse)AuthorAgeFilesLines
* Rename PySide2 to PySide6Friedemann Kleint2020-11-02186-27674/+0
| | | | | | | | Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>
* replace **locals by f-strings where possibleChristian Tismer2020-11-023-23/+21
| | | | | | | | | This change affects mostly only my own sources which were prepared for the migration to Python 3.6 . Task-number: PYSIDE-904 Change-Id: I0c2cd59f6f625f51f876099c33005ac70ca39db9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Clean up PySide2/global.hFriedemann Kleint2020-11-021-11/+1
| | | | | | | | After 62c21af778b7bff6c86e7f89ef03a87efa6c51cb, the annotation defines for Qt are no longer required. Change-Id: Ib3746257992073850a324fb1de77a484aa36d6b6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Declare some missing functions in QListFriedemann Kleint2020-10-302-4/+13
| | | | | | | | | | | | | | | | QList<T> member functions taking a T parameter are no longer seen by the code parser since they take a parameter_type which is specialized to be T or const T & depending on T. Declare them instead. Similar, change QPolygon::operator<<(T) to add-function. This fixes several PySide tests that rely on those functions (qpolygon and others). Task-number: PYSIDE-904 Task-number: PYSIDE-1339 Change-Id: Ic1157f384f86b796cc5c7bc06a934a63649d74be Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-284-18/+18
| | | | | | | | 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>
* remove traces of Python2 from C codeChristian Tismer2020-10-271-34/+0
| | | | | | | | | | | | 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>
* Remove deprecated QVariant::TypeFriedemann Kleint2020-10-272-47/+0
| | | | | | | | | Usage of the enum causes deprecation warnings. In addition, it is not clear why the type was there given that QVariant is not exposed. Remove the converters. Change-Id: I5b1f12ee0f869a63e6b7d82afdcb58a5d7062ce6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide snippets: Fix deprecation warnings about constructing a QVariant from ↵Friedemann Kleint2020-10-271-34/+28
| | | | | | | | | a type id Rewrite the helper QVariant_resolveMetaType() to return a QMetaType. Change-Id: Ifa3994ea0c23149bd925e4a422f19e98e742d97f Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtQml: Implement QmlElementMaximilian Goldstein2020-10-224-0/+96
| | | | | | | | Equivalent to QML_ELEMENT in C++, this enables users to register classes for use in QML by using the QmlElement decorator. Change-Id: I697e486ef58b18cce4c310e4b556e28735a16d45 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-10-215-2/+7
|\ | | | | | | Change-Id: I8831b840fa7816b8919ecbaab17b41822a0a6012
| * Add some missing enumerations and classesFriedemann Kleint2020-10-215-1/+8
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: Ic5d15d67b821eff5cb59727ce2d749e6aa848441 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-10-204-0/+34
|\| | | | | | | Change-Id: Iaabea628351fac9da88b5779b537f62262ff82a7
| * Add some more classes from QtConcurrentFriedemann Kleint2020-10-164-0/+34
| | | | | | | | | | | | | | | | | | 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>
* | Fix QMutexLockerFriedemann Kleint2020-10-204-24/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/d4b206b246caf9b49110526585693ab629609d99 split QMutex and QRecursiveMutex which inherited from each other in Qt 5 into separate classes and changed QMutexLocker into a template. This could only be represented by separate types in Python. To work around this, reconstruct a QMutexLocker with the common API into an invisible namespace for generating the bindings. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I776250f91dfed9985f2a8a5705b26f782a20bbd9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Remove obsolete OpenGL function modificationsFriedemann Kleint2020-10-151-5/+0
| | | | | | | | | | | | | | | | | | | | They were removed by qtbase/bf5d52020b348d77a8968e39ca36dea7cbcef0e5. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Task-number: QTBUG-86475 Change-Id: I340bee1743d8817f6a476e0aac00f71c066c4c02 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-10-062-1/+5
|\| | | | | | | Change-Id: I7b4ff138799ee81940c36e68a105cb42bb38a3ff
| * Add Network as dependency for WebEngineCoreCristian Maureira-Fredes2020-10-042-1/+5
| | | | | | | | | | | | | | | | | | This enable to expose types like QNetworkCookie which is required for the setCookie, and deleteCookie methods. Fixes: PYSIDE-644 Change-Id: I28d0b81e59a6ca411f22e1f9afd7f4139927b1a2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Adapt to recent changes in qtbaseFriedemann Kleint2020-10-025-21/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove QProcess::pid(), adapt test (qtbase/0f8848b7e25e4d8fb9265ff6e0aa31946addd741) - Remove enum from QPrinter - Add enum GrabTransition to QPointingDevice - Remove deprecated functions from QByteArray, QXmlStreamAttributes - Adapt Qml tests - Remove fake property from QLayout Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I98cc90723cbeda15b23c5b22d026cb2ab9a358ff Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Add QStringView/QByteArrayViewFriedemann Kleint2020-09-302-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-291-2/+2
|\| | | | | | | Change-Id: Ie6da3938b82f5ebe96dd12bd65a3ccc4180d2fba
| * Signature: Revert SbkSpecial_Type_Ready to PyType_ReadyChristian Tismer2020-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-243-1/+16
|\| | | | | | | Change-Id: I7e4c7f9378706438715362b1e2da9a3cd2794562
| * Add user property QLayout::contentsMarginsFriedemann Kleint2020-09-231-1/+2
| | | | | | | | | | | | | | | | This becomes a real Q_PROPERTY only in Qt 6, so, add it here. Task-number: PYSIDE-1019 Change-Id: I98f8c674370c01605270d7c78bc199464e66642d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * Fix crash when reimplementing QLayout.takeAt()Friedemann Kleint2020-09-231-0/+1
| | | | | | | | | | | | | | | | Mark the ownership of the C++ wrapper result as C++. Fixes: PYSIDE-665 Change-Id: I2c5410bd2ebde03a246a3c1b047d99c0a0472e76 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * Add QColorConstants namespaceCristián Maureira-Fredes2020-09-222-0/+13
| | | | | | | | | | | | | | | | | | | | | | The colors inside the namespace are defined: constexpr Q_DECL_UNUSED QColor Black {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101}; Fixes: PYSIDE-1224 Change-Id: I84ba5fae74e336ab01b3bac467c8fc6e2b45d14b Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-222-0/+16
|\| | | | | | | Change-Id: Id0fc76666bbdb254a833eeb6909a0874b2611bf3
| * shiboken2: Allow specifying the sequence of overloadsFriedemann Kleint2020-09-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Q(Plain)TextEdit::createMimeDataFromSelection(): Fix a crash when creating ↵Friedemann Kleint2020-09-211-0/+12
| | | | | | | | | | | | | | | | | | | | QMimeData Mark the return value as owned by C++. Fixes: PYSIDE-1082 Change-Id: Id4be45cf90bbe480839cbe3d355831bf1ddb0c16 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-212-1/+5
|\| | | | | | | Change-Id: Ia31df23a16575f9ecefe13ec85fb70197d103278
| * shiboken2: Add attribute for generating "using namespace"Friedemann Kleint2020-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix crash when overriding QUiLoader::createWidget() in QUiLoaderFriedemann Kleint2020-09-171-0/+4
| | | | | | | | | | | | | | | | | | Mark the returned objects of the create functions in native (wrapper code) as owned by C++. Fixes: PYSIDE-1070 Change-Id: I8774f2f0c9adafc73e0d969384e4c0357b7c896d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Re-add Qt 3DFriedemann Kleint2020-09-184-126/+54
| | | | | | | | | | | | | | | | | | | | Adapt to renamed enumerations and changed classes at qt3d/d8c81e191c13cc44dc444f41b412cdeb82675122. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ied165d4b98148ad2a9d52b2056ef2f71093ac8ce Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Adapt to changes in qtbaseFriedemann Kleint2020-09-185-208/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Renamed QIconEngine::AvailableSizesArgument to ScaledPixmapArgument - Remove XML/SAX classes after qtbase/79e0374143ab385cb12a17443e91c8eb9d2f3a4b - Adapt quick type registering to changes in QMetaTypeInterface qtbase/92b37676328a960bc092b1f3834233c550376457 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Task-number: QTBUG-86480 Change-Id: Ibff2bddbf040bb25fb85ca3c0845608b2bca1e7e Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-173-13/+25
|\| | | | | | | Change-Id: I8aa48d07067c45c888c73af87314f6a88c2a6e14
| * Remove dependency of the QtQml module header on pysideqmlregistertype.hFriedemann Kleint2020-09-162-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix slots being invoked from the wrong threadFriedemann Kleint2020-09-161-0/+6
| | | | | | | | | | | | | | | | | | | | In case the signal connections are routed via some GlobalReceiverV2 instance, it needs to be moved to the receiver's thread. Fixes: PYSIDE-1354 Change-Id: I85926efeab157e47ec42a830fda024d299807786 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-161-2/+6
|\| | | | | | | Change-Id: I114a003e36bbe9eb7452f13c1515e3419648e228
| * AxContainer: Add missing enumerationsFriedemann Kleint2020-09-111-2/+6
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: Ida9e7d23bb06e5a9b76ef0b7d8e3618375c5d508 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Adapt to new changes in qtbaseFriedemann Kleint2020-09-144-30/+24
| | | | | | | | | | | | | | | | | | | | | | - Remove more math functions - Renamed enum in QLibraryInfo - Use float instead of qreal in QColor Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ic3120d1776f01943e38395a1a30d62bf6f5ccc36 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Add Active QtFriedemann Kleint2020-09-113-7/+8
| | | | | | | | | | | | | | Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ibb22408684b4d0ed944aef12f8265fc5b3463c32 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-104-3/+28
|\| | | | | | | Change-Id: I8a627fd459c3f9601d078a00d3d77c8b3fe04304
| * Add the QWidget *-based overloads of the QtWinExtras functionsCristian Maureira-Fredes2020-09-083-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | Add a pre-header defining QT_WIDGETS_LIB so that they become visible, similar to what is done for QtSql. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Fixes: PYSIDE-1374 Task-number: PYSIDE-487 Change-Id: I0fe1d8c6ca07a79ea9aa1acff00153239ca9a4cb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * QDomElement: remove unnecesary setAttribute overloadsCristian Maureira-Fredes2020-09-041-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | Removing all the different overloads that don't make much sense in Python land, leaving only one for integers (qlonglong), and one for floats (double), since in Python those are the general primitive types to handle, and having a proper transformation for uint, qulonglong, float, etc, is not really mandatory. Fixes: PYSIDE-1372 Change-Id: Iba2e3d560dd971e3ecd0146bd5e2ec47f09c16e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Clean up some warningsFriedemann Kleint2020-09-093-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove QByteArray::replace() - Remove QTextList::isEmpty() - Adapt signature of QWidget::enterEvent() - Adapt signature of QTextBoundaryFinder - Remove free math functions which were changed to templates in Qt 6. Todo what about the free funcs...qSin(), etc. they are now templates Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ic72b2853a000726aaa307bc3790a9b2824bf6b62 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-041-1/+2
|\| | | | | | | Change-Id: Ib1d2c1b76a043526e8f715e45296104cad085a4a
| * signature: Use a clean init function to initialize itChristian Tismer2020-09-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the quick hack replacing "type.__signature__" by 'eval("type.__signature__")', we now use a clean initialization function `_init_pyside_extension` that is implanted into the __builtins__ module. This is the first of a series of improvements and simplifications that will be applied slowly with low priority. Task-number: PYSIDE-829 Task-number: PYSIDE-510 Change-Id: I9951239c73d02f47272f1a531fb4886c8181b9a7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix QtSql to buildFriedemann Kleint2020-09-041-1/+1
| | | | | | | | | | | | | | | | | | Adapt version number in check. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I96d943fcc35017e5d62113e770f0c0af3722f64d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Add QKeyCombinationFriedemann Kleint2020-09-043-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | Rewrite __repr__ of QKeySequence to use QDebug since its operator[] now returns QKeyCombination. Added by qtbase/25351dcc549f1daddf5e2ae8a242191174342a3e. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ia779b25385fff2192ff127e3898a365ed5e44863 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Bump cmake version to 3.16Friedemann Kleint2020-09-044-21/+5
| | | | | | | | | | | | | | | | | | | | Streamline the features list handling in the module CMakeLists to use the list functionality introduced in cmake 3.3. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I184034cae408c815bd80a09016a21fde2969449e Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Remove QtScript, QtXmlPatternsFriedemann Kleint2020-09-048-409/+0
| | | | | | | | | | | | | | | | | | They are obsolete in Qt 6. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I70816b3c3270a1db65ad3b3871a09c62d31420e5 Reviewed-by: Christian Tismer <tismer@stackless.com>