aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
Commit message (Collapse)AuthorAgeFilesLines
* Signature Module: Remove special handling of QtMultimedia, amendedFriedemann Kleint2022-06-031-6/+0
| | | | | | | | | | Remove the code from generate_pyi.py as well, amending 4a3d5f9affd0ba8f6d37ad5c0cdf8d2aa52914a8. Change-Id: I718ff55b9cfbe027a133083f3cd6ddd3c85fb803 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit df12cf002002125b8c356155c3a151779d5a3388) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Limited_API: Fix PyIndex_Check once and for all: avoid warningChristian Tismer2022-06-031-2/+2
| | | | | | | | | | | | | The Windows compiler is quite overzealous and complains if headers have different ordering in the used version, although the content seems to be identical. Instead of doing a tedious search, we simply rename the function. Task-number: PYSIDE-1797 Change-Id: I88a8eca882357ac31b9eb932c89013c51c5c75e4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 563613fefd81090d1947f16259394a830681492d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add QAudioBuffer.data()/constData()Friedemann Kleint2022-06-013-14/+47
| | | | | | | | Fixes: PYSIDE-1947 Change-Id: I9e1799f245b8d75f61ad9551cb847994ea59bdb9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 41de0c478794a7cd67a9e118d6be600ecc15e5e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Refactor the snippets for QByteArray::__mgetitem__/__msetitem__()Friedemann Kleint2022-06-011-74/+77
| | | | | | | | | | Fix many return-after-else clang warnings Change-Id: I78afb7e29cb0e6adb1d023277548c93896ded520 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 65cab4213ff09244842b7b77ff29d52491864186) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix "Internal C++ object already deleted." when using ↵Friedemann Kleint2022-05-241-0/+6
| | | | | | | | | | | | | QWidget::nativeParentWidget() Prevent the return value heuristics from setting a parent relationship. Fixes: PYSIDE-1893 Change-Id: Id2f71251c2d0f55072675cb36e4ec5ed9511c92d Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit e5d50b1e9f057fd37c6adb2bd66dcc3d49f6e3a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PyEnum: Implement Switchable Qt Enums Using Python EnumsChristian Tismer2022-05-232-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mapping from Qt Enum to Python Enum was considered to be difficult. Actually, it is easier than thought. As a minimum invasive approach, this implementation changes very little in the first place. The generation process of enums stays almost unchanged, which simplifies handling of the generated code very much. At the end of each generated Enum, we call a special function that grabs the newly generated enum, reads all items and produces a Python class that replaces the enum in-place. We don't generate Python code, but the functional API to create the new enums. There are lots of more optimizations possible, but this concept solves the issue nice and quickly. A harder problem was the need to map all QFlag structures to enum.Flag structures from Python. This caused a sometimes hacky coding because both the old and the new version are supported. This will be totally cleaned up when we remove the old implementation. Task-number: PYSIDE-1735 Change-Id: I66991312f2d7b137f110a4db30702b8f3bf518dd Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 37b5b3e2db07d4256aa17376d231a76ea3c393cd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PyEnum: Prepare to support both implementationsChristian Tismer2022-05-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The enum implementation should be switchable between the old and the new version. This switching is possible only before PySide import. This patch prepares the switching capability for the signature module and installs fields that will affect the global header files. The new version can be selected by setting the environment variable PYSIDE63_OPTION_PYTHON_ENUM=1 or setting sys.pyside63_option_python_enum=1 [ChangeLog][PySide6] The signature module was prepared to support both C++ enums and Python enums. This can be selected at startup. Task-number: PYSIDE-1735 Change-Id: I14999e1049fbaaccd00f00d1b7b1257bc9287255 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 31deae2a0ea3725d038433f6be91119865a8f399) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* PyEnum: Prepare Enum tests for both old and new enumsChristian Tismer2022-05-239-28/+59
| | | | | | | | | | | | | | | | | | These tests are now completely identical to the old tests and have an adapted Python Enum version if suitable. Both versions can be selected once at runtime. Having both test versions available as a runtime option is a nice feature that really helps understanding the consequences of the PyEnum move. [ChangeLog][PySide6] The QEnum tests are enabled for both the old Qt Enums and the new Python Enums. Change-Id: I78a7473f4a86f8d2115acc56e4ed11cf135eb000 Task-number: PYSIDE-1735 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 4362ded78ae459265c1e6b7cf562d5cdad382003)
* Fix a crash in QTextBlock.layout()Friedemann Kleint2022-05-231-0/+5
| | | | | | | | | | Prevent the return value heuristics from setting a parent relationship. Fixes: PYSIDE-1939 Change-Id: I7b8b4080f4c0c288439140c44fb9c2b896af2907 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 0e62c4db50472f8b581022c86a6be651158d0cd0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QDBus: Use value types where possibleFriedemann Kleint2022-05-201-3/+3
| | | | | | | | | | | Amends 081bafdc94d2cc81fa88517598061237cea0329d. Task-number: PYSIDE-1570 Change-Id: I8f0da61fa09807b9be0033e1da0e88adf0580e5f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 6b27f49e58e4a8e24fee10b67fdb02a0fb28fba1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6: Skip Q_ENUM helper functions when PySide extensions are enabledFriedemann Kleint2022-05-181-2/+0
| | | | | | | | | | | | | | | | | | | The helper functions qt_getEnumMetaObject() and qt_getEnumName() defined by Q_ENUM had to be rejected in the typesystem files in each namespace. Pass the ApiExtractor flags to the meta builder to cleanly detect all Qt special functions and automatically reject them when PySide extensions are enabled. [ChangeLog][shiboken6] The Q_ENUM helper functions qt_getEnumMetaObject() and qt_getEnumName() are now automatically rejected when PySide extensions are enabled. Fixes: PYSIDE-1932 Change-Id: Iceb5f0c3175ecaef657ae71adf6a5b8bf48af740 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 14c6809ec52ea0583e310825c158fe0e0ab68883) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* webenginecore - QtWebEngineProfile setNotificationPresenterShyamnath Premnadh2022-05-182-0/+20
| | | | | | | | | | | | - added setNotificationPresenter(...) - added QtWebEngineWidgets Notifications example which uses setNotificationPresenter Task-number: PYSIDE-1912 Change-Id: Ib8fdf7879d6e54bcae47dcc89be6bd5a861a8846 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit cd394249fc77063a2bd6ba7a7633fdbc10621475) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* webenginecore: QWebEngineCookieStore setCookieFilterShyamnath Premnadh2022-05-176-1/+147
| | | | | | | | | | - added tests for the setCookieFilter(...) Task-number: PYSIDE-1912 Change-Id: I484725072195846e7777fc577d167ff9ed374d59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 96715550f3d980dc5554c67a3660e94b6a9a3e76) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* UiTools: Remove dependency on QtXmlFriedemann Kleint2022-05-111-1/+1
| | | | | | | | | | | The module only uses QXmlStreamReader/Writer. Amends 653f8c8272f3e29c784173ebd98175bc843ee3a4. Change-Id: Ib71c9a712dd7c3b78b7720728b07a6d7c13351a1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit cf62c8855c1cee7ff2a6989babe3e3e6e0dd9a8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: add qCDebug, qCInfo, qCWarning, qCCritical macrosShyamnath Premnadh2022-05-094-0/+142
| | | | | | | | | | | | | | - added tests for the macros Only 'void debug(const char *msg, ...) const' was considered among the overloads in QMessageLogger. For more info, see the comment section of the related issue PYSIDE-1899 Task-number: PYSIDE-1899 Change-Id: Ie9a28abde8556f84736de75cf4b914002094c768 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 936bdcf97f8ca657531496592dfce7d9144fa977) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Support Windows handle types HBITMAP, HICON, HRGNFriedemann Kleint2022-05-093-1/+98
| | | | | | | | | | | | | | | | This adds functions like QImage::toHBITMAP()/toHICON(), QRegion::toHRGN(). Treat them as plain PyLong types in order to be compatible with PyWin32. [ChangeLog][PySide6] Windows handle types HBITMAP, HICON and HRGN have been added. Fixes: PYSIDE-1859 Change-Id: I07a98ecdd3da52ff0b0b78db56388f579ede3e46 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 92d8353b2e046b226bbcb3da3c4bbc3a2e9cb6d8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Add QQmlContext::setContextProperties()Friedemann Kleint2022-05-093-2/+12
| | | | | | | | | Fixes: PYSIDE-1921 Change-Id: Id80f9c2f7533d7e2d58af0fb0f1d6d8eb586d31a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit dee66cc79cc7429857157302253cfb8d244ddc18) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken: Introduce a function to get the type name of a polymorphic classFriedemann Kleint2022-05-064-1/+130
| | | | | | | | | | | Helps for hierarchies that do not have virtual destructors where the default typeid(t).name() does not work (QStyleOption). Fixes: PYSIDE-1909 Change-Id: I9ce3769a8c3550d011023597eede0ae6f8c9ad68 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit de5f162a70dda9d74cfce2337a9f90ddcb4ca75f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Remove the C++ QML reference example overwiewsFriedemann Kleint2022-05-061-11/+0
| | | | | | | Change-Id: Ia6b76dfde9a3640c1d34fe84be17be92af9001e7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 3a0c456d4249eb8dda06b9a618f6d45c8422cf8a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Change type discovery for QStyleOption to use qstyleoption_cast<>Friedemann Kleint2022-05-041-22/+22
| | | | | | | | Task-number: PYSIDE-1909 Change-Id: I9e318a1fef71c80ba8df81fe8c98e535df26098e Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 1331f214773ebb14b7e28642d4a75381529e6ae5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: QLoggingCategoryShyamnath Premnadh2022-05-032-0/+3
| | | | | | | | | | | - added QLoggingCategory Task-number: PYSIDE-1899 Change-Id: Id4e2c270e921d83571dcf13b67df1535d7b37f6f Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit a5f1b490a235383181805f4cb92041cf2ed67d2e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* libpyside: Add a __repr__ for PySideSignalInstanceFriedemann Kleint2022-05-031-0/+9
| | | | | | | | | | PySideSignal already has a str operator, which takes precedence. Fixes: PYSIDE-1911 Change-Id: I98365e75068ce4db661b3293d1336b43a94807a0 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit bdfb36b880cecc40fa4b15ed963ee3e1c033d469) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Add overloads with more parameters to QDBusAbstractInterface::call()Friedemann Kleint2022-05-021-0/+8
| | | | | | | | | | Amends 081bafdc94d2cc81fa88517598061237cea0329d. Fixes: PYSIDE-1905 Change-Id: Idb84981ce88d861be0c6518575f88d0fdbf528ea Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit e4a8e8a1391bb6f0986c47e16dec793efa95782a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* __feature__: improve the feature module by a reset functionChristian Tismer2022-04-285-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __feature__ tests need a stronger way to reset the feature selection reliably. Some cross-talk was observed when running multiple tests together with PyTest. This effect was hidden because our unit-tests are isolated in individual processes by CTest. - Remove all special 0x80 cases of TearDown functions - introduce a new feature module function `reset` that completely uninitializes the features, including the `pyside_feature_dict`. - drop the artificial naming of `__feature__` in favor of `feature`. This is less confusing for people examining the implementation. [ChangeLog][PySide6] Feature switching was improved by avoiding cross-talk between multiple test runs. Task-number: PYSIDE-1019 Change-Id: I28550f293763ac58df72b8ce5c0a613c2067f6ba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 4e63ba07d8d9104330a995dc77ea2de9098bccde) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* libpyside: Add a debug operator for numpy arraysFriedemann Kleint2022-04-262-0/+107
| | | | | | | | Task-number: PYSIDE-1880 Change-Id: Ifa0f0cd2a170d75def73264d97c6a4d9cf9d34b3 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 8a4a6f3aec1b3f99ee902073fe8b0b3cecb91f3e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Allow for embedded 0 chars in 1 byte stringsFriedemann Kleint2022-04-262-1/+5
| | | | | | | | | | | | Pass the length to QString::fromLatin1(). Amends b90acad7ebd389b34465504d229552af6c8196e5. Fixes: PYSIDE-1895 Task-number: PYSIDE-1882 Change-Id: Ie829e479ad4e81f691cd3564ce1640175d1cdc32 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit f2b4abb43eec6427a42bd83ea2e54d7a40212260) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Migrate from QLatin1String to UTF-16 string literalsFriedemann Kleint2022-04-251-1/+1
| | | | | | | | | | | Use the QStringView overloads of the comparison functions in order to minimize merge conflicts after the deprecation of QLatin1String in 6.4. Task-number: QTBUG-98434 Change-Id: Ia0df398ab8f3e61a0b629971ccbec2273a78499b Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit da43cf70a9d125576f3795d7088e0100a4035ce5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Migrate from QLatin1Char to UTF-16 char literalsFriedemann Kleint2022-04-252-8/+8
| | | | | | | | | | Preparing for the deprecation of QLatin1Char in 6.4. Task-number: QTBUG-98434 Change-Id: I8bc92aa9f4e6dbfcb12d2025c5a1e760ab4f0d7f Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 42666b5bab09a80a65ae8f61961985f4923b7d65) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix include conventionsFriedemann Kleint2022-04-226-10/+15
| | | | | | | | | | Reorder includes such that local includes are first, followed by Qt and C/C++ system includes. Change-Id: Ib801d34de7242befce4be429bfb099ccabe1f987 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit c434b40777b82d1b556196cc898909f8d3912918) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Handle not finding a slot by nameFriedemann Kleint2022-04-221-1/+6
| | | | | | | Change-Id: Ie2c652223aaaa853c99d540acebb99f754f34d61 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 4b763b54737b0da8f10cfed245637310d4cd80c7) Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* qimage_test.py: Split out XPM test data to a separate fileFriedemann Kleint2022-04-202-234/+263
| | | | | | | | Task-number: PYSIDE-1859 Change-Id: Ie85edc9c8dc6814fa00c22b3a5b22a1f839dea97 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 1ed656567cad0733a82cad6d440771d65ea2b6fa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* setup: fix PySide6.__all__ after the wheel split, augmentedChristian Tismer2022-04-201-1/+2
| | | | | | | | | | | | | | | | | | | The original fix had a criterion to use the unchanged module list when a build is active. The determination if a build is in progress was too setup.py specific. Using a compiled-in variable solved in a general way. This patch can be removed completely when the wheel split method is getting aware of __all__ . Thanks to Antonio Rojas for the nice hint. Change-Id: Iaf4cb28056b7f80f2f0c9fb5604c3033bfc1aba5 Fixes: PYSIDE-1890 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 703d975f16aff95bc9014a2689a3ae824b5a552f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Expose Test::qWait()/qSleep()Friedemann Kleint2022-04-191-2/+0
| | | | | | | | | | | | Both functions were explicitly rejected by 8ea7551ac00a49d72ccf0d6a8fcf1e064d59e496, but that seems to be misguided. Fixes: PYSIDE-1883 Change-Id: Ic272258aa2663a3927b68ebcbb26de9914ca6395 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 5080b2d025326a168fae052a5400d1f5e96ed4f4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Drop the HTML in the copyright textVenugopal Shivashankar2022-04-121-1/+1
| | | | | | | Change-Id: Id0be106e50bb0f33ac38a07db71ee7cfc4946efe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit af4916a3b16dfe5f138904aeaec7294793938c0c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Optimize for SizeShyamnath Premnadh2022-04-114-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build: use the following flag with setup.py to turn off size optimization --no-size-optimization Added the following compiler optimization flags and their corresponding flags on other platforms GCC - -ffunction-sections -fdata-section which segretates data and function section and linker flag --gc-section which removes unused code. - -fno-exceptions to disable exception handling - -Os - Optimize for size. Basically same as -O2 but removes some flags that cause increase in size. (Ran a couple of example and did not see difference in execution time) MSVC - /Gy /Gw /OPT:REF - same as -ffunction-sections, -fdata-section, -Wl, --gc-section - /EHsc same as -fno-exceptions - /O1 instead of /Os because for MSVC /O1 gave the best results. Clang - Same as GCC except for using -Oz instead of -Os. Experiments: Built a wheel with QtCore and noticed a 300kb reduction in size on both Windows and Linux. Built a complete wheel(except QTest) and it gives me a 4 mb size reduction with unaffected performance. Task-number: PYSIDE-1860 Change-Id: Ia5dfa2c4bfde92994c939b5fac0d0831fa3a73ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit a88f7b21c61e4aa9efcfb81d7939e44b06df3a0d)
* doc: skip the documentation build by defaultCristián Maureira-Fredes2022-04-092-5/+12
| | | | | | | | | | | | | This reverse the current approach of building the documentation by default, and replace the skip-docs parameter by a build-docs one. A warning is printed when the --skip-docs is used, and another warning is displayed when using --doc-build-online without the --build-docs option. Change-Id: I2bf8302881b51e9831795a7e881b106022cdffa8 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Enable sphinx_copybutton extension for PySide tooVenugopal Shivashankar2022-04-081-3/+1
| | | | | | | | In addition, do not disable the copy_empty_lines config in the Shiboken project. Change-Id: I453c3df05d820052bc187d28a60d4e870b2c62f4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* doc: new theme to follow the new Qt Doc styleCristián Maureira-Fredes2022-04-0816-82/+119
| | | | | | | | | | | | | - Use 'furo' sphinx theme which offers a look-and-feel similar to the new Qt Documentation theme. - Change a few colors and styles to keep some details of the previous look-and-feel. - Add sphinx-copybutton extension to enable the copy-button feature against the snippet blocks. - Remove the 'pysidedocs' theme. Change-Id: I2be7186c5b043b4c75c65783abc2eab4056c493e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* doc: use sphinx panels for the offline docCristián Maureira-Fredes2022-04-081-104/+75
| | | | | | | | | Removing the special case where a HTML table was generated instead of the sphinx-panels. Change-Id: Ic2fe6276cf63ca559c14d9309c2e7cbd3515f2c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Add readBytes and writeBytes functions from QDataStreamShyamnath Premnadh2022-04-086-6/+123
| | | | | | | | | | | - along with the addition of these functions, a common.xml is created to stores all the common templates Task-number: PYSIDE-890 Pick-to: 6.2 Change-Id: I4fadfe77a38635f15a7aef04adeac949c2d61b5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QAction: Add setMenu() and menu()Cristián Maureira-Fredes2022-04-083-3/+24
| | | | | | | | | | | | | | | | | | | | After the changes in Qt6 related to moving QAction completely to QtGui, the 'on-demand' functions associated to QMenu were not properly exposed. This patch manually adds setMenu()/menu() using QObject's. A simple test case was added. [ChangeLog] QAction.setMenu() and QAction.menu() were implemented. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Pick-to: 6.2 Fixes: PYSIDE-1627 Change-Id: Ib8102a9cf513ee2e13ff71751b1167ca0146af31 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add a test for QSharedPointerFriedemann Kleint2022-04-076-0/+172
| | | | | | | Pick-to: 6.2 Task-number: PYSIDE-454 Change-Id: I2cb352390a9c6fcc32f8ef871a6de3023ab03237 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Fix build after deprecation of QVERIFY_EXCEPTION_THROWNFriedemann Kleint2022-04-071-0/+1
| | | | | | | | | | qtbase/ed343669f7c219b89449762cce086cb036a9a8f2 deprecated QVERIFY_EXCEPTION_THROWN and its helper useVerifyThrowsException(). Remove the function. Change-Id: Ic6484e1b984df8f3317225fb1f9dad0fa91609ad Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Clean up the config to find doc toolsVenugopal Shivashankar2022-04-051-53/+5
| | | | | | | | | | | Maintain the doctools config in a single place, and include it wherever necessary. Done-with: Alexandru Croitor <alexandru.croitor@qt.io> Pick-to: 6.2 Change-Id: Ib22e8676aa39bbddb616c7018b01b046bb33ae82 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* doc: Add cross compilation guideCristián Maureira-Fredes2022-04-021-0/+252
| | | | | | | | | | | | This guide is based on the commit message from the change that introduced the option to use setup.py to cross compile Shiboken (module) and PySide, plus additional information to configure all the requirements to start the process. Fixes: PYSIDE-1810 Task-number: PYSIDE-802 Change-Id: I03e1b803a809010bc3acd350b518b3c46741619e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* doc: change http by httpsCristián Maureira-Fredes2022-04-0161-62/+62
| | | | | | Pick-to: 6.2 Change-Id: Id796694e947643152dc0d57dd760efb89ddd8f16 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add QPyQmlParserStatusFriedemann Kleint2022-04-019-7/+215
| | | | | | | | | [ChangeLog][PySide6] class QPyQmlParserStatus for handling QML parser status changes has been added. Fixes: PYSIDE-1876 Change-Id: Ic1066924ec85dc8633f959342921c1d03da1aee4 Reviewed-by: Christian Tismer <tismer@stackless.com>
* setup: fix PySide6.__all__ after the wheel splitChristian Tismer2022-04-011-0/+29
| | | | | | | | | | | | | | The __all__ variable can no longer reliably be generated during compile time. - look into the FS to get a list of available modules - apply the existing __all__ order for convenience - make sure to call this function outside of a build, only. Change-Id: Ibaf300447e86127e39a98a9150b7e8b4d8ced27d Pick-to: 6.2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Fix QMetaProperty::Write(..)Shyamnath Premnadh2022-03-313-1/+18
| | | | | | | | | | | | | | | Change 108d82d2ca5323652a50706b37f829b9f0457367 introduced a regression that when enum is passed to a QVariant and that QVariant is processed from C++, it does not work as expected. This patch handles the case of enum, separately for the function under consideration. Pick-to: 6.2 Task-number: PYSIDE-1870 Change-Id: I5d002cb36f23d8763de737578af7b52d8259a306 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix endless recursion querying __doc__ of a propertyFriedemann Kleint2022-03-281-1/+1
| | | | | | | | | | Add a check for None Pick-to: 6.2 5.15 Fixes: PYSIDE-1874 Change-Id: I0127ba77ef2017dae232f2a1db1410d9cfe62405 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>