aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2
Commit message (Collapse)AuthorAgeFilesLines
...
* | Further cleanups of Python2 in C++ codeFriedemann Kleint2020-09-033-22/+2
| | | | | | | | | | | | | | Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I8b192651abe1344c1240b9867c82e558d952769f Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Rename QFileDevice::MemoryMapFlagsFriedemann Kleint2020-09-031-2/+2
| | | | | | | | | | | | | | | | | | Adapt to qtbase/f03b2f7711e3a0e90fb21672273959a2a9ed1c38 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I71ecde7cd8b6ead7d235dfe7b82be7a5a623c1b4 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Remove Python2 from C++ codeFriedemann Kleint2020-09-034-95/+17
| | | | | | | | | | | | | | Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I7e4ffaeabb2ac8a5ffe165d43b3475a7e5d57447 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-031-1/+2
|\| | | | | | | Change-Id: I747d25be8a1d6d45f14c8ae1d04c252e1f3a6b59
| * signature: Avoid non-existent attributes in compiled code (Nuitka)Christian Tismer2020-08-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | In standard Python, there is (yet) no attribute "__signature__". Nuitka, the compiler, knows that and raises an AttributeError without even trying. The workaround was simple: Use "eval". Change-Id: Ice9deccd7ba2fe4c376f0a151924a68f88ca020d Fixes: PYSIDE-829 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix some warnings in QtNetworkFriedemann Kleint2020-09-021-5/+3
| | | | | | | | | | | | | | | | | | | | - Use QIODeviceBase::OpenModeFlag - Remove obsolete signatures Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I2b8f744a2d2cecb176dc70b184d46c9a6a7055a4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Remove QPagedPaintDevice::MarginsFriedemann Kleint2020-09-012-2/+0
| | | | | | | | | | | | | | | | | | The class was removed in Qt 6. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I6d16827418b85e036a86f901ca78c8b3f06e6431 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Adapt to recent Qt 6 changesFriedemann Kleint2020-09-017-237/+21
| | | | | | | | | | | | | | | | | | | | - Removal of the statemachine framework from QtCore - Addition of QAbstractFileIconProvider - Adapt some signatures - QMetaType deprecations Change-Id: Ia51354542ad1d2f0bb5530e45ebef0d6ccdb633d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-08-311-6/+6
|\| | | | | | | Change-Id: Icf4b3535be52b64ef15eced7103bb1280e031e30
| * signature: pass `self` directly from parserChristian Tismer2020-08-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature module took the info from the PyCFunction flags for a long time to check if something is a function, method or staticmethod. It turned out that there are functions with multiple signatures where the method/staticmethod info varies in the signatures. This invalidated the PyCFunction flag usage. Instead, we now compute that info directly from abstractmetalang.cpp which has access to the correct info. Fixes: PYSIDE-1328 Change-Id: I6ba7237efcc486de014184b1787d05d87bee5a5e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | QtQml: Improve ListPropertyMaximilian Goldstein2020-08-261-5/+67
| | | | | | | | | | | | | | | | | | * Support new methods * Do more type checking * Avoids segfaults when calling unimplemented methods Change-Id: Id0cfbc2f9a79c0f916db0bb9e950d707dc5da478 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Remove QStringRefFriedemann Kleint2020-08-202-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port the remaining XML parser code in shiboken to QStringView. Remove the QStringRef type. The QStringView-related refactoring of QXmlStreamAttributes somehow exposed the value() methods of its base class (QList), which cause compilation errors. Remove them. Task-number: QTBUG-84319 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: If01516f962eddcc0591ccaff322843f2fc040549 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | QtQml: Fix ListProperty being read-onlyMaximilian Goldstein2020-08-191-0/+3
| | | | | | | | | | | | | | | | This is due to QQmlListProperty<QObject> never getting registered as a metatype. Change-Id: I992fbd01514130973390bcfdf4dfcd0c7b07b59b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-08-193-0/+8
|\| | | | | | | Change-Id: I8f58e0ed19ad967366cf647eacd8b3d737d8b56a
| * QQmlComponent: allow thread in constructorsCristian Maureira-Fredes2020-08-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The constructor of QQmlComponent uses qml threads, and their usage was producing a deadlock when using along Python classes for a urlInterceptor, mainly related to the 'allow-thread' story that we need to take care of. Since the QQmlComponent required threads, we enable all the constructors to allow them to avoid a deadlock. Fixes: PYSIDE-1349 Change-Id: I86cb97b011f483cc4142bed6fae1ea525fa0db47 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * Add Qt3DExtras.QNormalDiffuseMapAlphaMaterialCristian Maureira-Fredes2020-08-172-0/+2
| | | | | | | | | | | | | | Fixes: PYSIDE-1355 Change-Id: I27a31bd2efd685f9cd3ac4dc780ab4fa7f7f5720 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix QLineF-testFriedemann Kleint2020-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fix signature of QLineF::intersects(). Amends 3e252bba6ea6b96acb412d08131953e74d2b84ee. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ia299e608941d2a243e24bed780d50e5edb655d0f Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix build of qtbase modulesFriedemann Kleint2020-08-173-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Adapt to qtbase/2f9a294252ae44defd4d8ae1b3c09d8e36ee0612: - Removal of deprecated QSettings API - Changed signature of QLineF - Change of QVariant constructors - Introduction of new QIODeviceBase class Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I834f535af3c977164def12fc86dfd87282c240aa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-08-173-1/+23
|\| | | | | | | Change-Id: Icee2cd5a37181070d8ef50e7143868d4f126cea5
| * shiboken: warn if the signature module fails to initializeChristian Tismer2020-08-071-1/+15
| | | | | | | | | | | | | | | | | | | | | | There are setup errors that fail to initialize the signature module correctly. This is for instance possible if packaging puts the shiboken2 module somewhere into the path, but the binary cannot be reached, because shiboken2 also exists as a dictionary. Task-number: PYSIDE-1352 Change-Id: I679d6855c87093b946cfbaeb063c10d45b00c8ad Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * feature-select: optimize feature access to the feasible maximumChristian Tismer2020-07-312-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** fix: MSVC needs extra sign bit in basewrapper_p.h! Buglet? ** The new feature selection has some tiny overhead. It is about two dict accesses plus a slot access for every tp_(get|set)attro call. The introduction of an explicit `__init_feature__` call allows to optimize this overhead very nicely, because this init is done for each __feature__ import: First, we can remove that tiny overhead completely by not initializing the feature_select module at all if no __feature__ import is used. Second, we can optimize this access further by caching the current module dict. If the dict is unchanged, then the last select_id can be used. This reduces the overhead of frequent calls to a single slot access. Third, we finally cache the select id in unused SbkObjectType bits. That removes the last structure where repeated attribute lookup is used. The overhead is therefore quite small when something is changed. But typically these changes are infrequent. The majority of accesses do change nothing, and this case is now quite much optimized. Change-Id: I7d1a4611a1c19216fd9be8f04457bb18ebd52ab1 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | doc: add qmlRegisterType and qmlRegisterSingletonTypeCristian Maureira-Fredes2020-07-241-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | when the inject-documentation tag is used inside a namespace or module instead of class, it does not properly work. With this workaround, the data will be rendered on the online/offline documentation. Task-number: PYSIDE-691 Change-Id: I832f43cb1ffba9294a2e282ba002ce4aff07e253 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | PySide2: Add qmlRegisterUncreatableType()Friedemann Kleint2020-07-245-7/+20
| | | | | | | | | | | | | | | | | | | | | | Extend the Quick register helper function by the bool creatable and string noCreationReason parameters, extract a QML helper taking the same parameters and add the overload. Task-number: PYSIDE-574 Change-Id: I955dbd158c7b22d2637bbac464937f9fda6d7901 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix comparison of classes inheriting QListFriedemann Kleint2020-07-232-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually add the comparison operators, which are inherited from QList and not detected by the parser due to: friend QTypeTraits::compare_eq_result<U> operator==(const QList &l, const QList &r) After Change c58c3e5a99a4dee992fd4c7898185181ecc84ae7, the default code will be generated for them. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Icc3d4e759e296303988cd00323876ab5225d8c27 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Implement qmlRegisterSingletonTypeMaximilian Goldstein2020-07-234-0/+173
| | | | | | | | | | | | Task-number: PYSIDE-574 Change-Id: I8828e22da42a5a47b207bb2e02d2f4fe67746a0b Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-07-231-15/+17
|\| | | | | | | Change-Id: I478e94aa42c9f79011edf97f19a7abebb7214421
| * Brush up the code related to custom widgets in the QUiLoader moduleFriedemann Kleint2020-07-211-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Modernize, use override, nullptr - Fix include conventions - Remove *Private structs. They don't make sense in a static plugin. - Add some explanatory comments - Add missing initializations of members - Most importantly: add error handling to PyCustomWidget::createWidget(), which so far would swallow all errors encountered when executing the Widget's __init__ function. Change-Id: I100a4239013f959c8fb0b0adc0d3a99f73bd4bff Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix some QPixmap-related issuesFriedemann Kleint2020-07-212-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | - static QPixmap *find(QString); has been removed; add a function similar to the overload taking a QPixmapCache::Key. - QPixmap *QLabel::pixmap() has been changed to return QPixmap by value which should no longer require modification. Remove the overloads taking the helper enumeration. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I17a229fef2bc0604c9c7272942a4947e34803957 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | QtGui: Simplify Q*Event member exclusionFriedemann Kleint2020-07-201-66/+1
| | | | | | | | | | | | | | | | | | | | After qtbase/ea2ae140e99bbd21515a99c5480e53129ef843c3, it can be done with a simple pattern. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I9a98e1c513845248204cc0caf70fd6fc53660637 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | QByteArray: Remove signatures of some functions taking const char*Friedemann Kleint2020-07-201-6/+0
| | | | | | | | | | | | | | | | | | | | Adapt to qtbase/631127126cc14e7c01cc611532b3256b58785670. Task-number: QTBUG-84321 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Id4fa80f77b20b795b5aeae624db5c33110233ca3 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Re-add QtSvgFriedemann Kleint2020-07-204-21/+102
| | | | | | | | | | | | | | | | | | | | | | QtSvg was split into QtSvg and QtSvgWidgets in Qt 6. Adapt the PySide2 modules accordingly. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Task-number: QTBUG-41884 Change-Id: I4ff005dfc6e71ac8eb3e3d45b22a7e507eb88f6d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | QtGui: Update field names of QEvent-derived and related classesFriedemann Kleint2020-07-161-35/+25
| | | | | | | | | | | | | | | | | | | | | | Some of QEvent-derived and related classes' protected fields cause issues with the protected hack. They need to be excluded. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I8a5f38df2463b0c53ded815d6e92f35c5859281f Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix build of PySideQTouchEventSequenceFriedemann Kleint2020-07-152-69/+57
| | | | | | | | | | | | | | | | | | | | Adapt to qtbase/4e400369c08db251cd489fec1229398c224d02b4. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Task-number: QTBUG-72173 Change-Id: If0d4247da7039c0edb80c4b93ad10ecef683f2e0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Introduce unlimited QML typesMaximilian Goldstein2020-07-152-115/+24
| | | | | | | | | | | | | | | | | | Requires qt/qtdeclarative/+/302855 to work. Fixes: PYSIDE-811 Change-Id: Ifdc8e5397ffb7837a8762b23d5996133dce8a4ec Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix OpenGLFunctions for Qt 6Friedemann Kleint2020-07-143-48/+50
| | | | | | | | | | | | | | Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I5b8e95b232812fa90ec5974b2b578eb581c06ace Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Add QtOpenGLWidgetsFriedemann Kleint2020-07-142-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget has been moved from QtWidgets into a separate library. Fix the examples and remove obsolete examples using deceased QGLWidget. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ib291d49c22ee6a32d7c03b6ff4980e87c8a09ecb Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Re-add QtOpenGLFriedemann Kleint2020-07-142-680/+155
| | | | | | | | | | | | | | | | | | Open GL functionality has been moved from QtGui to QtOpenGL in Qt 6. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Iecfc70d24bd694b09622554cc6b6762795243d5c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Adapt to refactored pointer event hierarchyFriedemann Kleint2020-07-132-6/+7
| | | | | | | | | | | | | | Add/remove classes for qtbase/4e400369c08db251cd489fec1229398c224d02b4. Change-Id: I9494c7b191e5745ec8e31ada041ccadf87d3edf9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-07-131-0/+7
|\| | | | | | | Change-Id: I509b55363c29639cd29bfbc012c4bda3a4d008e5
| * shiboken2: Re-add support for parsing Q_PROPERTYFriedemann Kleint2020-07-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | Following how qdoc does it, define Q_PROPERTY as a static assert with the stringified macro content in a ','-operator and parse it with clang. Task-number: PYSIDE-1019 Change-Id: Idcf53f1cd1c1cb29f4320444f446e9abad33d251 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix QML registration in devMaximilian Goldstein2020-07-101-40/+37
| | | | | | | | | | | | | | Change-Id: Ifc0e6495b02577c7c8028ac3011cd4585de6df87 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix further testsFriedemann Kleint2020-07-072-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove bug_632.py which was testing removed function QLineEdit::getTextMargins() - Enable the qshortcut test - Remove check for QWidget::getContentsMargins() from returnquadruplesofnumbers_test.py - Adapt error message in qdomdocument_test.py - QByteArray: exclude overloads of number functions added by qtbase/66d6943478c3ae76f996c2cd2fdf04fee4fcb767. As a drive by, remove operator[](uint). Change-Id: I8f40dad1c1a446865e9de34a5df293cce09a1510 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-07-071-3/+0
|\| | | | | | | Change-Id: I299a65f15fb6b7eb900256590bbe76ad0568f546
| * QByteArray::number(): Remove non-existent exclusions of number()Friedemann Kleint2020-07-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | Fixes an oversight of 157e03911ba0e2e8fd74899702588296693fd4ab, causing: typesystem_core_common.xml:1792: signature 'number(ushort,int)' for function modification in 'QByteArray' not found. typesystem_core_common.xml:1792: signature 'number(float,char,int)' for function modification in 'QByteArray' not found. typesystem_core_common.xml:1792: signature 'number(short,int)' for function modification in 'QByteArray' not found. Task-number: PYSIDE-904 Change-Id: I31b22d12235398400bc7e7a01dd9520a45538446 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix QQmlIncubationController::incubateWhile()Friedemann Kleint2020-07-063-23/+26
| | | | | | | | | | | | | | | | | | The bool * has been changed into a std::atomic<bool>. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ie64668e145e9233760610985dcb86cea68dfb1f3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Remove QtWebKitCristián Maureira-Fredes2020-07-065-361/+0
| | | | | | | | | | | | | | | | Since it was deprecated in 5.5, it's time to remove it from the repository. Change-Id: I0835f04d6c34079dfc289be8027985a1dc3674bc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-07-031-1/+8
|\| | | | | | | Change-Id: I08bddaf2aa407e7499ce05832c9455ca09c1757a
| * QByteArray::number(): suppress small integer types as is for setNum()Friedemann Kleint2020-07-031-1/+7
| | | | | | | | | | | | | | | | Otherwise, overflow errors can occur. Task-number: PYSIDE-904 Change-Id: I42486a27bcdb8e7562d411b4519d2e61f315be1d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Initial port of Core,Gui,Widgets,Network,Qml,Quick to Qt 6Friedemann Kleint2020-07-0319-719/+188
|/ | | | | | | | | | | | | | | | | | | | | | | | | Test failures: shiboken2:testmodifyfunction pyside2:QtCore::qbytearray_test pyside2:QtGui::bug_PYSIDE-41 pyside2:QtGui::deepcopy_test pyside2:QtGui::qfontmetrics_test pyside2:QtGui::qpixmapcache_test pyside2:QtWidgets::api2_test (QTBUG-85417) pyside2:QtWidgets::bug_632 pyside2:QtWidgets::bug_714 pyside2:QtWidgets::bug_785 pyside2:QtWidgets::qshortcut_test pyside2:QtQml::bug_825 pyside2:QtQml::bug_1029 pyside2:QtQml::registertype pyside2:QtQml::qqmlincubator_incubateWhile pyside2:QtQml::signal_arguments Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ia43d7ed037dfdd07def0edd76bada2243e73d335 Reviewed-by: Christian Tismer <tismer@stackless.com>
* CMake: Use the portable Qt feature propertiesFriedemann Kleint2020-06-303-4/+5
| | | | | | Task-number: PYSIDE-904 Change-Id: I15ebd4057c52c78d584de7c34e74ebb858cb0011 Reviewed-by: Christian Tismer <tismer@stackless.com>