aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-08-313-9/+22
|\| | | | | | | Change-Id: Icf4b3535be52b64ef15eced7103bb1280e031e30
| * CSS: Make sidebar stick to the topTopi Reinio2020-08-261-1/+6
| | | | | | | | | | | | | | | | | | With 'position: sticky' we can make the sidebar stick to the top but never go out of bounds to overlap the content or the footer. Fixes: PYSIDE-1148 Change-Id: Id3875d44caf88e070a8abdf7b81ab8e53ad5e4d5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * 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>
| * support Python 3.9Christian Tismer2020-08-191-2/+10
| | | | | | | | | | | | | | | | | | | | | | This was merged with "WIP: Enable support for Python 3.9". There were minor problems, only. Thanks Cristian for adding cosmetic changes which should already have been applied in Python 3.8 or earlier. Change-Id: Id5e8696d9cfb7192243ad44c93e9f2cf347d6a7c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix build after removing refcounting from QMetaTypeInterfaceFriedemann Kleint2020-08-311-3/+0
| | | | | | | | | | | | | | | | After qtbase/37f2007d49cf24cc05b95d3ce70d3494050eb822, stream operators will be registered automatically. Change-Id: I46a161d6c664786849fa1d78cd8e6a095dd371f0 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | QtQml: Improve ListPropertyMaximilian Goldstein2020-08-263-5/+149
| | | | | | | | | | | | | | | | | | * 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>
* | QtQml: Move uncreatable type test into separate fileMaximilian Goldstein2020-08-264-36/+84
| | | | | | | | | | Change-Id: I01b052ffa85543d5779a87a331c78f77a6529e95 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>
* | Tests: Add registersingletontype.py to list of testsMaximilian Goldstein2020-08-191-0/+1
| | | | | | | | | | Change-Id: I8b3925ceab632b0d5e0e5511ab6a86df594f96b0 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>
* | Test/QtQml: Fix registertype.pyMaximilian Goldstein2020-08-191-1/+1
| | | | | | | | | | Change-Id: Ib82cac47882220c53f688e53c9cf6429b9fa138a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-08-195-9/+21
|\| | | | | | | Change-Id: I8f58e0ed19ad967366cf647eacd8b3d737d8b56a
| * Port some tests away from deprecated APIFriedemann Kleint2020-08-182-9/+13
| | | | | | | | | | | | | | | | | | | | | | Use QRandomGenerator instead of deprecated qsrand() and remove usage of deprecated QPolygonF constructor taking the size. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ic4b773772555716636f5dfec797052a945d431cd Reviewed-by: Christian Tismer <tismer@stackless.com>
| * 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>
* | Remove QtWidgets test bug_714.pyFriedemann Kleint2020-08-182-61/+0
| | | | | | | | | | | | | | | | | | | | | | | | The test was checking reference counts on the pixmaps returned by QPixmap *QLabel::pixmap() in 5.15, which was changed to return the QPixmap by value in Qt 6. The check does not make sense anymore and the equality check at the bottom would fail. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I6d29a0417d5fa574da5eb825f0944f6700ef810c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix QLineF-testFriedemann Kleint2020-08-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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-174-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-176-42/+129
|\| | | | | | | Change-Id: Icee2cd5a37181070d8ef50e7143868d4f126cea5
| * feature-select: delay the feature switchingChristian Tismer2020-08-141-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature switching was written rather naively and happened after almost every module change which can occour very often. This patch is much more careful with switching and uses an ignore code to prevent switching when PySide was not imported at all. A potential regression when a switch is set before some PySide module is being imported and PepType_SOTP is zero was also solved. Task-number: PYSIDE-1019 Change-Id: I24dec7b3e4d0b577f77262392ded0b8a2006b3cc Reviewed-by: Christian Tismer <tismer@stackless.com>
| * 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-315-22/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** 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>
| * feature-select: apply tiny comment improvements and optimize a bitChristian Tismer2020-07-241-16/+22
| | | | | | | | | | | | | | | | | | | | | | This change tries to make the selectable feature patch better understandable. If you know about anything that could help to clarify this better, please help improving this by adding what is missing. Change-Id: Iaf1664f8a703b2dc234df83814f6f4258fe14936 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-07-249-27/+453
|\| | | | | | | Change-Id: Ib38f2f4be9f214df79454ff972ccd20fbfc6d1cd
| * feature-select: allow snake_case instead of camelCase for methodsChristian Tismer2020-07-247-25/+450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the implementation of the first of a series of dynamically selectable features. The decision depends of the following setting at the beginning of a module after PySide2 import: from __feature__ import snake_case For more info, see the Jira issue, section The Principle Of Selectable Features In PySide The crucial problems that are now solved were: - it is not sufficient to patch a type dict, instead the whole `tp_mro` must be walked to rename everything. - tp_getattro must be changed for every existing type. This is done either in shiboken by a changed PyObject_GenericGetAttr or PyObject_SenericGetAttr, or in the generated tp_(get|set)attro functions. An example is included in sources/pyside2/doc/tutorial/expenses. Task-number: PYSIDE-1019 Change-Id: I5f103190be2c884b0b4ad806187f3fef8e6598c9 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Test signal_arguments.py: Use Qt Quick Controls 2Friedemann Kleint2020-07-232-2/+3
| | | | | | | | | | | | | | | | | | Qt Quick Controls 1 is deprecated and has been removed in Qt 6. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: If70fde907c3984b0593186a9b570a921f270d45c Reviewed-by: Christian Tismer <tismer@stackless.com>
* | doc: Add docs for qmlRegisterUncreatableTypeMaximilian Goldstein2020-07-241-0/+36
| | | | | | | | | | | | Change-Id: I8d46f4f6b82639b417a146a81f84888ce363d5d4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | doc: add qmlRegisterType and qmlRegisterSingletonTypeCristian Maureira-Fredes2020-07-243-30/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-248-15/+100
| | | | | | | | | | | | | | | | | | | | | | 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-236-0/+295
| | | | | | | | | | | | 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-236-142/+104
|\| | | | | | | Change-Id: I478e94aa42c9f79011edf97f19a7abebb7214421
| * doc: fix Property indentationCristian Maureira-Fredes2020-07-221-24/+24
| | | | | | | | | | | | Fixes: PYSIDE-1353 Change-Id: I65630921f02f2a47c8319349ce649e037a0748b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Brush up the code related to custom widgets in the QUiLoader moduleFriedemann Kleint2020-07-215-118/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 the QtUiTools testsFriedemann Kleint2020-07-212-11/+17
| | | | | | | | | | | | | | | | | | Import QAction from QtGui. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I5dadb2dd373ff54002563a63acd9e2c38a6c8b13 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>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-07-201-5/+1
|\| | | | | | | Change-Id: I5c6913b4eea9d6e11415011753e556eca18c5532
| * feature-select: fix crash in scriptable applicationChristian Tismer2020-07-161-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The feature selection framework had a very early static initialization from the early stages of the development. Normally, Python is initialized before PySide gets loaded. In case of scriptable application, this might not be so. Actually this static initialization was no longer necessary and was removed, as the bug was hopefully as well. Change-Id: I2c703c9cac14b6093d0c43c4bae94ff2b29c0640 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix build after qtbase/054b66a65748c9ebfafeca88bf31669a24994237Friedemann Kleint2020-07-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt6Core_DEFINITIONS contains nonsensical values after the change: ${Qt6Core_DEFINITIONS} = -DQT_CORE_LIB;-D$<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG> causing ninja: error: build.ninja:6014: bad $-escape (literal $ must be written as $$) Remove it from sources/pyside2/tests/pysidetest/CMakeLists.txt since it appears to work without. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I63e8e6d9215302b916f46808b80ac5ab749c0375 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Re-add QtUiToolsFriedemann Kleint2020-07-202-9/+14
| | | | | | | | | | | | | | | | | | Rewrite the CMakeLists to work with Qt 6. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I2966e4a68ce5703a1f8291ac38afb1aafc155ec7 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-208-32/+115
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-07-142-1/+211
|\| | | | | | | Change-Id: Ib984e8fab81ee0cef3c9ab61982ee1a990319d5a
| * Doc: add briefcase deployment docJimmy Girardet2020-07-132-1/+211
| | | | | | | | | | Change-Id: Id0d896330dabee3b5b01aea70f1f15a30797d466 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Fix missing QtCore missing path for the pyside moduleCristian Maureira-Fredes2020-07-141-1/+1
| | | | | | | | | | | | | | | | This enables building QtCore built on macOS Task-number: PYSIDE-1339 Change-Id: I67bd24ea8da1f490cc0c109ff36a01ae9c156822 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>