aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
Commit message (Collapse)AuthorAgeFilesLines
...
* doc: Update references to Qt6Cristian Maureira-Fredes2020-12-0913-143/+102
| | | | | | | | | | | * Updating versions, * Removing references to 5.x * Remove unavailable modules for Qt 6.0.0 * Comment unusable tutorials from the documentation Change-Id: I924953f97406ab8c5c04005a2d42dfbc03fdf7fa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix Qt include dirs in case of frameworkSimo Fält2020-12-091-5/+2
| | | | | Change-Id: I6937f40ebf85e1d2d1be53e63b0eebbaa7cbf0fa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* fix both qflags_test and the qflags cppgenerator codeChristian Tismer2020-12-031-5/+7
| | | | | | | | | | | | | | | | | | There was a years-old qflags test failing on Python 3. It was blacklisted with the comment "# Nested exception in Python 3" This was nonsense: The test was wrong also for Python 2. It just happened to work, because Python 2 had some weird errors leaking. The real bug was in missing error handling in cppgenerator.cpp . See the main description in the issue. Change-Id: Ia0f9466640e0eb33f1b8b26178d33f2be0bcb32f Task-number: PYSIDE-1442 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* test: fix QtQml::signal_argumentsCristian Maureira-Fredes2020-12-021-1/+1
| | | | | Change-Id: Ie554c42597343d10cf199739d6821b6cb40894bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* PySide6: Fix ownership issue in QLayout::replaceWidget()Friedemann Kleint2020-12-021-0/+4
| | | | | | | | | Use the standard ownership code for QLayout for the new widget. Fixes: PYSIDE-1432 Pick-to: 5.15 Change-Id: I441e1e72e18cdd3b9b942f6810fd399f266de748 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Remove namespace QtQmlFriedemann Kleint2020-11-273-5/+1
| | | | | | | | It was removed in qtdeclarative/5a59cbfee71907c47587a1e3d340d31abfdc01ba. Change-Id: I94c49dced3decb9089c1f8745468d080e0d0311d Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Fix test javascript_exceptions.pyFriedemann Kleint2020-11-271-1/+1
| | | | | | | It was using the old Qt Quick Controls 1. Change-Id: Ia1d6a884267fdcd8e3808b08bf1efa12eb62b4dd Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6/QtQml: Fix compilation with new QMetaTypeInterfaceFriedemann Kleint2020-11-271-3/+9
| | | | | | | | | After qtbase/b4c17476129e07dd3bf52c6aac8a51cf30c2dd3a, a function returning the QMetaObject * is required. Task-number: QTBUG-88468 Change-Id: I2d957ff97a2bfa04578873ce098b1e623edf759a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* property: fix an eight year olde bug that showed after the overhaulChristian Tismer2020-11-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | The modernisation of pysideproperty.cpp creates an error when using @Property(str, constant=True) This could also be provoked before the improved version of Property by def getVal(self): return self.val variable = Property(str, getVal, constant=True, fset=None) because the None/NULL - handling was incomplete. Change-Id: Ib39dd3bdb62ba928164faa465ee3dd743262e245 Fixes: PYSIDE-1426 Pick-to: 5.15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pysideproperty.cpp: Fix compilation with MSVC2019/C++ 17 modeFriedemann Kleint2020-11-261-7/+6
| | | | | | | | | It does not accept a ternary operator with QByteArray/const char * arguments. Pick-to: 5.15 Change-Id: I02bcb740100c4568ecb262fa6ecf3d466e02c875 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix sphinx warning in QtCore.Property.rstFriedemann Kleint2020-11-261-0/+1
| | | | | | | | | Fix doc/rst/PySide6/QtCore/Property.rst:3: WARNING: Explicit markup ends without a blank line; unexpected unindent. Pick-to: 5.15 Change-Id: I20311655899df17313aa657c0b93c9d488f3b5c8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Replace QVector by QListFriedemann Kleint2020-11-253-15/+14
| | | | | | | | | | | | | | | | Change AbstractMetaClass::templateArguments() to return TypeEntries (const TypeEntry *) instead non-const. Remove redundant typedef OverloadData::MetaFunctionList. Use existing typedefs in some places. Add new typedefs for MetaObjectBuilder::EnumValues and AbstractMetaFunctionCList. Change-Id: Ia241b5fbe54d60ea57175fb1f6c844604e066a3d Reviewed-by: Christian Tismer <tismer@stackless.com>
* errorhandler.py: use AttributeError instead of TypeErrorChristian Tismer2020-11-251-1/+1
| | | | | | | | | | | | | | There is a small improvement needed in errorhandler.py: It was not consequent to use TypeError for missing attributes in one case, and to use AttributeError on the constructors. The error message may be different, but it always should be AttributeError. Task-number: PYSIDE-1305 Task-number: PYSIDE-1019 Change-Id: I1c278c5256000f0f0fe66ca9da36c2d078002b25 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* cppgenerator: rework keyword handling regarding unknown keywordsChristian Tismer2020-11-233-27/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | PySide has a distinction between functions with simple arguments and functions with keyword arguments for optional keywords. When a function has keywords specified in one or more signature branch, it gets the METH_KEYWORDS flag. In this case, it is checked that no argument is given positional and per keyword at the same time. Completely forgotten was to check which keywords are allowed in that branch, if at all. The problem was much complicated because constructors can contain extra signals and properties. At the same time, all further error messages are generated with Python. This adds necessary flexibility when features are active. All PyBuildValue objects were refcount leaking. That has been replaced by static createStaticString expressions. The `argNames` structure is no longer needed by the improved algorithm. Change-Id: Ic297912c47231720f61c7d4b79b46a1e376a9941 Fixes: PYSIDE-1305 Task-number: PYSIDE-1019 Pick-to: 5.15 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken6: Fix some warning messagesFriedemann Kleint2020-11-181-1/+1
| | | | | | | | | Use standard messages where applicable. Move some messages over to messages.cpp and add a location. Remove some messages that cannot be triggered any more. Change-Id: I7fc821e4360b06af7ef6e5db7e30de0f1e8ed5ca Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Refactor GlobalReceiverV2MapFriedemann Kleint2020-11-173-43/+57
| | | | | | | | | | | | | | | | Use a QHash of object/method PyObject instead of a QByteArray representing the sum of hash values of both as a string. The problem with using hash functions here is that 2 keys might be identical due to the hashing. Rename the hash() methods to key(). Task-number: PYSIDE-1422 Change-Id: Ie1344d8bd85a073ef5f6e2cb461bd2f514265a9f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Small nullptr-cleanupFriedemann Kleint2020-11-174-8/+10
| | | | | Change-Id: I9688480a24bafa7808796a6161cf3474f2ca44f8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* globalreceiverv2: Avoid hash call on instances which might be unhashableChristian Tismer2020-11-171-7/+8
| | | | | | | Change-Id: I423763b363cff61beb5da45374f120e5f2e63ffa Fixes: PYSIDE-1422 Pick-to: 5.15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Add QMetaTypeFriedemann Kleint2020-11-164-10/+41
| | | | | | | | | | This is required for QSqlField among other things. Re-add the conversions that previously existed for the now deprecated QVariant::Type for QMetaType. Change-Id: If47168f0f45ecfbfe483a8eaa9c6e037477f5ce6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix warnings about unused functions and variablesFriedemann Kleint2020-11-123-22/+0
| | | | | Change-Id: I7949defbd3f55b0ca231a21b0f9b8747024f8097 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix QtUiLoaderFriedemann Kleint2020-11-123-1/+12
| | | | | | | | Fix compilation of the snippet (QStringView comparison) Add includes of the dependent classes. Change-Id: I048522e2a7b84e87bb8e54ac0c993d6c99fbe66c Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Fix QtHelpFriedemann Kleint2020-11-122-0/+6
| | | | | | | Include QVersionNumber, which is only forward-declared. Change-Id: I87b9a8a3fa8c216b7666b44423ecafd08b4a568f Reviewed-by: Christian Tismer <tismer@stackless.com>
* QtHelp: Clean CMakeList.txtFriedemann Kleint2020-11-121-18/+7
| | | | | Change-Id: I6be0bafb77c9c2c49601fb091bc97db8a367cbfc Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Fix QML list registration code to compileFriedemann Kleint2020-11-121-6/+6
| | | | | | | The list interface was ported to qsizetype. Change-Id: I1d69e64e73021028db1db8f1cce75e6a757e608b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* pyside6: Fix Limited API violation in QtQmlChristian Tismer2020-11-121-1/+1
| | | | | | | | | This patch replaces an unsupported function. No idea if there are more problems, since I have to create a new macOS build of the dev branch, first. Change-Id: I3ce59d5585410109a776cef19879ae835f6cce5d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* __feature__: provide useful error message when feature is activeChristian Tismer2020-11-115-5/+153
| | | | | | | | | | | | | | | | Features seem to work quite good so far, but they clearly need much more testing. One of the problems is that error messages are produced, but the function name is not found and we get an ugly default error message. This is an efficient implementation that does all name mangling in the C code. A helper dict avoids linear search for properties. Task-number: PYSIDE-1019 Change-Id: Ic87c4a6e7dc2b2a251e809d6df0eb7fb9ca8021c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* pyside6: make sure that class properties trigger feature switchingChristian Tismer2020-11-111-0/+1
| | | | | | | | There was a call to the switching function missing in the metatype. Task-number: PYSIDE-1019 Change-Id: Ia556e3c562006a267b6a0a16b68cd366981f5d2d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* python3: remove all obsolete "from __future__" import statementsChristian Tismer2020-11-0927-52/+1
| | | | | | | | | | | Note that not all future statements can be removed: PEP 563 for instance deals with from __future__ import annotations Task-number: PYSIDE-904 Change-Id: Ia387ec87f3c68ca64d13e8e80191eda900f58638 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Further adaptations to Qt 6Friedemann Kleint2020-11-053-24/+9
| | | | | | | | | | | - Remove QPrinter::getPageMargins() - Fix qcollator test, adapting to qtbase/3a1bc4bad5757d72e5af8b4abe236e3cfac9621d. - Add new QShortcut constructor, adapting to qtbase/b26fa9722f9e8c81406259f6db8044e8bbc2d50b Change-Id: I92b2b54fbe5a93ac40a8ad69589f9317df03b4ad Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix QAxBase::dynamicCall(const char *, QVariantList)Friedemann Kleint2020-11-031-1/+7
| | | | | | | | | | | | | | | | When invoking QAxBase::dynamicCall(const char *, QVariantList), the overload taking single QVariants QAxBase::dynamicCall(const char *, QVariant1, QVariant2,...) was chosen by the overload decisor since QVariantList can be converted to QVariant. Specify the order manually. Remove the internal protected function. Pick-to: 5.15 Fixes: PYSIDE-1410 Change-Id: I1bcffd34486d5ceebdeea3af47f42398896e9575 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Rename PySide2 to PySide6Friedemann Kleint2020-11-021604-0/+292941
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>