aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix some doc warnings in the debugging tutorialFriedemann Kleint2022-01-062-4/+4
| | | | | | | | | | | | | | | | | | | Fix: - sources/pyside6/doc/tutorials/debugging/qtcreator/qtcreator.rst:2: WARNING: Title underline too short. - sources/pyside6/doc/tutorials/debugging/qtcreator/qtcreator.rst:21: WARNING: Inline interpreted text or phrase reference start-string without end-string. Change the syntax highlighting to javascript, since json does not like the embedded comments of the MS-extended jsonc, fixing: sources/pyside6/doc/tutorials/debugging/vscode/vscode.rst:21: WARNING: Could not lex literal_block as "json". Highlighting skipped. sources/pyside6/doc/tutorials/debugging/vscode/vscode.rst:47: WARNING: Could not lex literal_block as "json". Highlighting skipped. Amends d727a69e2f58be167845b8179edf1735df6ccf1e. Task-number: PYSIDE-841 Change-Id: I171c57e4a7f787559022fbbb14a7eb7bb9f1a91c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 4a8b8e3dc45f1067a7f75e5f7ce95d8e639d530a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* build_scripts: Ensure cmake process terminatesFriedemann Kleint2022-01-051-6/+5
| | | | | | | | | | | | Use a context manager to fix warning: c:\Python310\lib\subprocess.py:1067: ResourceWarning: subprocess 7844 is still running _warn("subprocess %s is still running" % self.pid, ResourceWarning: Enable tracemalloc to get the object allocation traceback Change-Id: I6e3ebf584974f8a2d3776847b13fe092d3d4be4a Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 5925ccb54b818e9dfc0766480683d232f95e6965) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* build_scripts: Avoid a racing condition in installChristian Tismer2022-01-051-0/+5
| | | | | | | | | | | | | | | | | | | On macOS and a custom Python built, the "install" option crashes with an import error. This is a timing problem, because an import is triggered when it is already being processed. The problem is hidden by the use of virtualenv. [ChangeLog][PySide6] The move from distutils to setuptools caused a racing condition with certain Python builds. Change-Id: I4dcda2b083234e88c272a1794388f6d0e7b8f0e5 Fixes: PYSIDE-1760 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 981ffb345928cf740a5b751aaef43a266d077d13) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* __feature__: Fix a bug in true_propertyChristian Tismer2022-01-031-2/+2
| | | | | | | | | | | This was a wrong condition that checked for the true_property flag, but not the actual existence. Change-Id: I9fa4c7a9c907f23fd15405fe5d747060dddfc6d0 Fixes: PYSIDE-1757 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 159adca779f67afcbe669d298572fb0ea57a4236) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* AudioSource Example + Binding for QAudioFormat.normalizedSampleValue(data: ↵Shyamnath Premnadh2021-12-285-0/+264
| | | | | | | | | | | | | | | | | | | | | bytes) In order to make the AudioSource example available in Python, the following functions were properly exposed to Python. - normalizedSampleSource(const void* data) const in QAudioFormat Previously, Shiboken took care of exposing these functions on its own. The fix here is to use PyBuffer as the counterpart for const char* in the Python side. The patch also consists of the working AudioSource example. Currently only the Push Mode works. Inorder to make the pull mode work, the function writeData(const char* data, qint64 len) should be properly exposed from C++ to Python through typestem, without code duplication. Task-number: PYSIDE-841 Task-number: PYSIDE-1743 Change-Id: I1cd2c28136836c9bdf1021693f74e59eb98f390b Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 0c62b3c2fc974d0c652d905a1268f3d0f74a330e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix Tetrix example errorDaniel J Brown2021-12-241-2/+2
| | | | | | | | | | | | | | | Previously, the Tetrix example used the old camelCase style method names. The `.setShape()` method in the code was not changed to reflect the swap to snake_case which caused errors. `.setShape()` has now been swapped for `.set_shape()` Fixes: PYSIDE-1732 Change-Id: I9876ceb53043cbce2e452326fe8fdb4f47e87e79 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 68fc31e0304c3cdf33aef5ad3e13786362496c59) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add borderlayout exampleJaime Resano2021-12-244-0/+298
| | | | | | | | | | Border layout example ported from C++ to Python Task-number: PYSIDE-841 Change-Id: I66df4041183ae1eced6fe75d52c21ce381c3d3eb Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 14a03a7a55307b41d8664f05216ca9ea1f3c9be7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add Debugging TutorialShyamnath Premnadh2021-12-2312-0/+309
| | | | | | | | | | | | | Add tutorial to debug C++ counterpart of PySide application. This commit provides general instructions to setup everything for debugging and debugging using either QtCreator/VSCode. Task-number: PYSIDE-841 Change-Id: I6a95ab64507a304fc19a2cdcdf6d29b6c96cca03 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit d727a69e2f58be167845b8179edf1735df6ccf1e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* signal: Fix a segfault when signal is applied to non-QObjectChristian Tismer2021-12-231-29/+28
| | | | | | | | | | | | | | | | | | When a signal is created on a normal Python type, this should be recognized on initialization and rejected. Instead, this creates a segfault. To simplify matters, cosmetic changes to pysidesignal.cpp from other check-ins are included as well. [ChangeLog][PySide6] A crash when inserting a signal into a non-QObject was fixed. Task-number: PYSIDE-229 Task-number: PYSIDE-1675 Change-Id: I7fe1d5482ddfbf09ec1e4708c47693f2ce47c744 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 17ff0bc4c5fed1ecd2191be90b5e5f2161160879)
* Add mimetypesexampleShyamnath Premnadh2021-12-216-0/+446
| | | | | | | | | | - port of corelib/mimetypes/mimetypebrowser example from Qt6 Task-number: PYSIDE-841 Change-Id: Ib2f1637935662f969b264315bbf8ba036bb9420b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 73bf0e9732cf4945bdd7158d04d29779da55a29b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Speed up test qqmlnetwork_test.pyFriedemann Kleint2021-12-171-2/+5
| | | | | | | | | | | Instead of relying on TimedQApplication to tear down the test, wait until the network request is started and start a timer to close the window. Change-Id: Ib68f97d8fb57503b7e1a228fbd54755e986a8605 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 945f962bd34e2c02d7c31f68428627c5fee6a1e9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: build multiple inheritance pass-through for SignalsChristian Tismer2021-12-165-14/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | Signals always had support for calling a method that is sitting at the same place as a signal with the same name. This is done by letting the signal act as a proxy for the hidden method. Lately, the equality check of signal instances was corrected (PYSIDE-1431) which had the side effect that now some method lookups failed in multiple inheritance. This patch extends the search for homonymous methods to look not only in the signal attribute, but extends the lookup along the whole tp_mro. The related tests were slightly re-arranged to keep them together. [ChangeLog][PySide6] Signal instances allow pass-through of methods with the same name, explicitly and with multiple inheritance. Change-Id: I92828855ada7aa8d98517918008b93fc79629d8e Fixes: PYSIDE-1730 Task-number: PYSIDE-1431 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 85799120d09e251a761699ff71547b7dc80a741b) Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Build system: Remove regeneration of the example resourcesFriedemann Kleint2021-12-153-31/+1
| | | | | | | | | | | | | | With the growing nummber of examples, this started to slow down the build process and produced warnings about the linguist example. It has been replaced by the tools/regenerate_example_resources.py script. Change-Id: Ia00ad35d8b3c0ecea62a497e1665b5b7ceb25e7b 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 fa7695ec63dd61a03fb491f80c3cf5dcb9f0dd76) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Fix QQmlApplicationEngine.load(str) to not construct a QUrlFriedemann Kleint2021-12-154-2/+116
| | | | | | | | | | | | | | | Specify the overload number so that string is checked first. Add a test since QQmlApplicationEngine is not yet tested. Amends 2cc81fd5e63bf931d8c9d1c8c2c66ac9e16ef087. Fixes: PYSIDE-1736 Task-number: PYSIDE-1499 Change-Id: I1736928f1acf17fda5671bd11d16c5017141f1ff Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 3efe0b3e66450aa98fd8600bc0ac356bcbe5ad54) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Regenerate the example resource filesFriedemann Kleint2021-12-1517-3553/+3553
| | | | | | | Change-Id: I6e92728d6208aad0c0d8871ef362da30a61e358e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit eff6361beec0f3251134a77350d24cf8ee25a2d7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Skip functions using RValue referencesFriedemann Kleint2021-12-131-1/+8
| | | | | | | Change-Id: I7a4990e8d389d493ddd6155d12a1c2cc36b0e450 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit b2008ac1e4441d92788ee986baa2a1df62be85e7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix documentation generationFriedemann Kleint2021-12-104-57/+154
| | | | | | | | | | | | | | | | | | | | | | | | | The fuzzy checking introduced by 87efa57c6ddc1a8364b2ea4d9f909372d0af5cfc actually produced ambiguous matches like QStandardItemModel::insertRow(QStandardItem *), QStandardItemModel::insertRow(constd QList<QStandardItem *> &). Change this to be a 3 step process: First, try an exact type match. If that fails and there are arguments using const ref qualifications, try a fuzzy match. Check whether this produces a single match. Finally, try matching by argument count. As a drive-by, format qualifiers of template parameters like QList<QStandardItem *> correctly. Change the messages to report "Fallback used" instead of "Cannot find" if a fallback is found to make it easier to spot failures. Amends 87efa57c6ddc1a8364b2ea4d9f909372d0af5cfc. Change-Id: I5b133274ae0f056e6901b0a66d385a270cabb9c9 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 133b91abb330f8e496f3a82920e000ab079f358e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update example documentation of samplebinding / scriptableapplicationFriedemann Kleint2021-12-104-21/+43
| | | | | | | | | Update versions and build information. Change-Id: I82eb4b36e2357145f89bb640f2674deda6fe2253 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 15a5cea299c01669095aba071afca0521107b487) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Fix warnings about not finding functions in WebXMLFriedemann Kleint2021-12-101-11/+37
| | | | | | | | | | | | | | | | | | | | | When searching functions by name and parameter types in the WebXML pages, 4000 warnings like Cannot find documentation for function QWhatsThis::showText(QPoint,QString,QWidget*) in ...whatsthis.webxml using query: /WebXML/document/class[@name="QWhatsThis"]/function[@name="showText" and @const="false" and count(parameter)=3]/parameter[1][@type="const QPoint &"]/../parameter[2][@type="const QString &"]/../parameter[3][@type="QWidget *"]/../description Falling back to "void showText(const QPoint &pos, const QString &text, QWidget *w)" obtained by matching the argument count only. appear. This is caused by libxslt apparently being unable to match entities like &amp; in XQuery expressions, so, this fails for const-ref parameters like "const QString &". To fix this, use "contains()" instead in the query. Change-Id: I5fe9edb3d2eab911b69a69e4a68cf9fd3f27677b Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 87efa57c6ddc1a8364b2ea4d9f909372d0af5cfc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Signature: fix the __doc__ attribute of classes, amendedChristian Tismer2021-12-102-14/+16
| | | | | | | | | | | This additional change reverts the generation of AttributeError and produces None, instead. Change-Id: I9c9472cdd796b6686d5e7fb46a986ac4366098f2 Fixes: PYSIDE-1727 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 713fed0392f0524ca2eb2779b42c906601c76900) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows: Fix the build against complete LLVM packagesFriedemann Kleint2021-12-093-5/+15
| | | | | | | | | | | When compiling a dummy project for determining config values, CMake is fooled to use clang++ as a compiler if it finds it. Force it to use MSVC as is done for the build. Change-Id: Ic1031a9aa078c0d05adf6495b4db665a0813e3f9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit bda973a2b0a288d0bc7390244ce6b563fe8dbe34) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Build system: Improve PYTHON_EXTENSION_SUFFIX detectionFriedemann Kleint2021-12-091-6/+6
| | | | | | | | | | Python 3.8.5 on Windows has an incomplete 'EXT_SUFFIX' config variable. Print an error in this case. Change-Id: I8f40a11c64cad2bc62e1c9bc279b549d536c9c90 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 0e49ec6fb9065ff6b788308e708c087836f9e6e2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Update information on building on WindowsFriedemann Kleint2021-12-091-2/+7
| | | | | | | | | Point to the Qt downloads for libclang. Change-Id: Ic15141e13364abef8cdd06f8ad2eabd07f0b6ac6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 52b4b638451077432852194541d0ff55d6d69d1e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Fix a bug in Slot.__call__Christian Tismer2021-12-091-5/+6
| | | | | | | | | | | | | While trying to improve MyPy compatibility, a test of Slot()() revealed a missing argument check. The function was also modernized a bit. Task-number: PYSIDE-1675 Change-Id: I0d06931a1dd92b9e55b5bd6e50569c77f6223a4e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit bd1ad4d23d18132446a936841dc82e444e8e240d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* setup.py: CMake: Remove host python dependency for version parsingAlexandru Croitor2021-12-0911-66/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling, the python interpreter found by CMake is the device one (or at least it's supposed to be), which means we can't use it to execute python scripts on the host machine to extract shiboken and pyside version information. Instead of keeping the version numbers in python files, place them into new .cmake.conf files that CMake can include in CMake projects directly. This aligns with storing version information like Qt6 does. setup.py and coin_build_instructions need version info as well, so they will now parse the set() assignments in pyside6/.cmake.conf. Ideally we would have called cmake with a minimal project that outputs those values, but we don't have access to the CMake executable path within coin_build_instructions.py, so we rely on parsing instead. Qt Conan integration does the same, so we should be good, the .cmake.conf file format is unlikely to change and cause breakages. We also modify shiboken_version.py and pyside_version.py to use the new variables when calling configure_file(), because we still ship those files in the wheels. Amends b57c557c8cd1012851f8a245075591dc33be425b Change-Id: Icc830069cd459c214ec253840ba6754ece50854e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 9eb3e39486e95bce008fee9ae48df230273fa433) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Reland: Move all build dirs into a common 'build' subdirectoryAlexandru Croitor2021-12-092-27/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building the project using setup.py, it would pollute the source directory with a lot of virtual environment build directories. Move all of those into a common 'build' subdirectory. This eases cleanup of all build directories because they can all be removed with a single rm command. It also places all the various stages of build -> install -> package folders into a common subdirectory so it's easier to find and navigate between them. If no virtualenv is detected, change the venv prefix from the previous value of 'pyside' to 'qfp' and include the build classifiers. If a virtualenv is detected, we consider it is distinct enough and don't include the build classifiers, apart from a few chars to denote a debug python, debug Qt or limited api build. Example of the new build directory structure when a virtualenv is detected build/{venv_name}/build/shiboken6 build/{venv_name}/build/pyside6 build/{venv_name}/install/bin/shiboken6 build/{venv_name}/package Example of the new build directory structure when a virtualenv is NOT detected build/qfp-py3.9-qt6.2.0-64bit-release/build/shiboken6 build/qfp-py3.9-qt6.2.0-64bit-release/build/pyside6 build/qfp-py3.9-qt6.2.0-64bit-release/install/bin/shiboken6 build/qfp-py3.9-qt6.2.0-64bit-release/package Move the code that always removed the ./build directory on each setup.py invocation into prepare_packages() instead. This way it only removes the files from the 'package' subfolder which is the common packaging location between all the sub-projects. This removal is needed to ensure shiboken files don't end up packaged in the PySide6 wheel. This relands commit 234349d124ccfa399921e2b9fc09addcff0b0a94 This reverts commit 0c6eb7cd232fff9d81a8d5bc9a7fd71d9b8c67f5 [ChangeLog][setup.py] Build directories are now created inside the root ./build directory, rather than directly under the root of the project. Change-Id: I6d511ae77cb66c2c5a872d6b85ff33e1831b803e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 0a40ebb1defe14bb3d7a308657777a11058cf182) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* setup.py: Make each setuptools command compute the same build dir infoAlexandru Croitor2021-12-092-158/+249
| | | | | | | | | | | | | | | | | | | | ... as well as install dir, setuptools package dir and other common build path information we compute. This paves the way to reland 234349d124ccfa399921e2b9fc09addcff0b0a94 which was reverted in 0c6eb7cd232fff9d81a8d5bc9a7fd71d9b8c67f5 To do that, move the various build info computation into a separate mixin class that computes and assigns the values in PysideBuild.finalize_options() rather than run(). This ensures that PysideInstall and PysideBuildWheel inherit the same build dir / install dirs by querying the info from the build command. Change-Id: I802f122ddf3eb1e9daff25fac4d697f2ceae8e0c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 0fbb4fe5424ece448ebf4fcafb4e3c41d545c8f9) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Turn snippets_translate / example_gallery into normal CMake targetsFriedemann Kleint2021-12-092-19/+19
| | | | | | | | Change-Id: Ib318e8f90dda38566da11877ab52f32eba4762f6 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 2c2d5c4566cfbf09d21a61d1495e9eefac3146a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document the scriptableapplication, samplebinding examplesFriedemann Kleint2021-12-084-166/+233
| | | | | | | | | | | Add a dummy .pyproject file into the doc directory for the example gallery script to collect it. Convert the .md files to .rst files for the documentation. Change-Id: I87ea5b980d3d2177a7851f71462ca0b0bd0eba7e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit f029a27152cf7c7a741ce03a6f91be71729093ca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Generate the examples directly into the build directoryFriedemann Kleint2021-12-082-1/+6
| | | | | | | Change-Id: If395979b5a1efa869b3c1c7cb12b53bd1e8f1f7c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit f3972822d254ad20b8e9582f89fe8e30ce931f5c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Loosen snippet patternFriedemann Kleint2021-12-082-1/+54
| | | | | | | | | | Some examples(queuedcustomtype, codeeditor) use '//![snippet]'. Change-Id: If13fd12f8eff8a41a3b8e4f74a7bf3a03c8b39b3 Task-number: PYSIDE-1721 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 298b607b38cf44f346d5fb98e6bb36c184e2b5fb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* example_gallery: Handle dummy projects in the doc directoryFriedemann Kleint2021-12-081-19/+21
| | | | | | | | | | | | | | Make it possible to have a dummy pyproject file with entries pointing to the parent directory in the doc directory as not to clash with a CMakeLists.txt in the examples directory. Separate the code paths for the pyproject_file and the actual examples directory for this purpose. Change-Id: I0a1e583bff8cbb8243ba7526b8b2908f6a3e6e9c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 8cbfe9aa6f46483968b8273aa45deaad12bffbfd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix build when Vulkan is not installedFriedemann Kleint2021-12-081-2/+15
| | | | | | | | | | | | | | | The Qt headers define some dummy types for Vulkan types that take effect when Vulkan is not installed. This causes QQuickRenderTarget::fromVulkanImage() and some other functions to be declared with no linkage, causing a link error in PySide. Reject the function (which happens in the normal case since VKImage is not known to shiboken). Suppress the warnings in the normal case. Fixes: PYSIDE-1726 Change-Id: I915b477280bac5200c8206a7f9044b78c80e2936 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit e48f1f4ef9001d147aec682e5a04b169e46d0e4d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* mypy-support: Improve the handling of `Signal`Christian Tismer2021-12-081-0/+2
| | | | | | | | | | | | | | | | | | | | After more correct `Slot` handling, `Signal` now gets a __get__ method that always was there, but did not show up in .pyi files. By this `__get__` function and its return-type `SignalInstance`, the correct connection to `emit`, `connect` and `disconnect` is automatically there. [ChangeLog][PySide6] The MyPy display of `Signal` was corrected so that the relationship of `Signal` and `SignalInstance` is reflected. Task-number: PYSIDE-1675 Change-Id: I58e66008418147f37e0b96067d62677b6b0b902c Fixes: PYSIDE-1318 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit f57efb8c0ff616e345807b2671705363dd0d6b39) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* example_gallery: Support more lexersFriedemann Kleint2021-12-071-2/+8
| | | | | | | Change-Id: I5ed9a304d061b234fb081ca552d6b732fd370e8e Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit a071da0e4140ac343b149e18a546046a958576d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Re-add the documentation copy stepFriedemann Kleint2021-12-071-0/+8
| | | | | | | | | | | | | It is still required to copy the examples, tutorials and extra documentation. Make it dependendant on extras as examples might be generated directly in a later change. This partially reverts 30e4777956513daeba0f55cef50de4881d0bb2f1. Task-number: PYSIDE-1721 Change-Id: I81e3935fc8001a7a767a017081f4b1120bd3f8c5 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 139f27ac595aedec002624febb2a4b858965b59b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Signature: fix the __doc__ attribute of classesChristian Tismer2021-12-073-5/+13
| | | | | | | | | | | | | | | | | | | | The signature module had been changed to no longer default the __doc__ attribute of classes to the __init__ signature. This has the side effect of crashing "help(QtCore)". Fixed by correct defaults in C++ (AttributeError) and by setting a "None" default in the Python handler. The make_helptest function defaults again correctly to the signature: >>> errorhandler.make_helptext(QtWidgets.QApplication) 'QApplication(self) -> None\nQApplication(self, arg__1: Sequence[str]) -> None' Change-Id: I140f2b940f98eb126541b18b0feb312c7c4e9728 Fixes: PYSIDE-1727 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 8901719fd74ce8d8909608365e68f7354adaa254) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Remove the snippets copy stepFriedemann Kleint2021-12-072-21/+8
| | | | | | | | | | | This is no longer necessary since the snippets have been removed from the repository. Generate them directly into the build directory. Task-number: PYSIDE-1721 Change-Id: I0a4d9bc3c466b689fa28a982f608104cc5936570 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 30e4777956513daeba0f55cef50de4881d0bb2f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Prospective fix for stabilizing test QtCore_bug_686Friedemann Kleint2021-12-071-8/+8
| | | | | | | | | | | Move the modification of the variable into the locked scope. Try to avoid busy wait by using QThread.msleep(). Change-Id: I86be86b7e3257cdb734e82d274f98f1f55b6163d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit e3ff4b4e004e35c7be4fa6b4d3a4704bf98806a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Fix snippets resolutionFriedemann Kleint2021-12-075-67/+51
| | | | | | | | | | | | | | | | | | Change snippets_translate to replicate the complete Qt tree including module name under the codesnippet directory. Resolving the snippet is then a matter of replacing the Qt source path by the PySide 6 snippet path in the fallback paths contained in WebXML and checking for the converted .py files. This basically reduces the snippet warnings to 0. Task-number: PYSIDE-1721 Change-Id: I344004ddd1580f96ebf0c132923388ad08852374 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit cd0341574551c52c7ff8ff747caa3d895e3efb48) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Prospective fix for stabilizing qthread_signal_test.pyFriedemann Kleint2021-12-071-20/+15
| | | | | | | | | | | | | | Instead of using a flags handshake and busy loops, let the thread run its own event loop and terminate it by signals. Start the signal emission sequence by a timer to ensure the app is running. As a drive-by, modernize the code. Change-Id: I880674c7dc46a8259e878014fb14a90d01133804 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit fe1b1026d02722a4b7b4b0e0e2811f2a799c38c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Documentation: Enable URLs in inheritance diagramFriedemann Kleint2021-12-072-4/+28
| | | | | | | | | | | | | | Switch graphviz generation to use SVG and add some functions to derive URLs from the attributes. This currently works only within one module; links to classes from other modules lack the required refuri node attribute. Task-number: PYSIDE-1725 Change-Id: If93e78a6ba60168992b1acc0b926b5cfb57eeb7d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit f76cf34a5777dbc08d4c171c1e7afd9180d2e7c7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* shiboken6/Documentation: Refactor snippets resolutionFriedemann Kleint2021-12-072-45/+107
| | | | | | | | | | | | | | | A lot of warnings about falling back to the original Qt snippets were produced. However, they are only relevant for C++ headers and sources which we want to convert to Python. Anything else (.qml, .qdoc, etc) should use the fallback code. Rearrange to determine the snippet type and try the fallback first. Task-number: PYSIDE-1721 Change-Id: Ia9dd38c9c4a2f4c4b4a38a0c27ebacc9fc8c66e1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 1a28645c389f61be75dfd8dfffa689847028326e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* PySide6: Prospective fix for stabilizing test qthread_prod_cons_test.pyFriedemann Kleint2021-12-071-9/+3
| | | | | | | | | | Terminate the test only by the consumer. Verify the wait() statements. Change-Id: I811dd48c6522319efc7351bad683c6d3a6e25def Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 5068d5f7962f36c89739866f0974463dbb87b0e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Drop Qt Location from the doc and CMake configVenugopal Shivashankar2021-12-062-4/+0
| | | | | | | | | The Qt Location is not part of Qt 6.x anyways. Change-Id: I859c782ca795e90fac937544343fa2d07f7dead4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 5f482e5a330da37f3cb8d4327f6fbaf05a3478e6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Speed up paint_event_test.py, qpen_test.py and virtual_pure_override_testFriedemann Kleint2021-12-063-34/+11
| | | | | | | | | | Start a timer to close the window as soon as paintEvent() is called instead of waiting. Change-Id: Id7a0e1123e148bdc8ba142ccbe0ff9d7a02c77dd 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 67bd3066173678e0ec596387872d3e9457efa107)
* Doc build: Fix formatting of include pathsTopi Reinio2021-12-061-3/+3
| | | | | | | | | | | | * Add missing separator after the base include path * Remove space between -I and the path. This significantly reduces documentation warnings as reported by QDoc. Change-Id: Ic3b3ab0232026c1329cfdb7252fabec927109537 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit b33c45a83a6e35d3bc9ce4901ee9aa9565d69505) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tests: Use QGuiApplication where applicableFriedemann Kleint2021-12-0623-47/+47
| | | | | | | | Change-Id: I9401fa0721ea6e3df413c5a9fccb5e802d57295d 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 a37b5e7fb9aa017524627c9dc287b62f28136aa7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: replace api module table with panelsCristián Maureira-Fredes2021-12-063-114/+338
| | | | | | | | | | | This fix the warnings introduced by a previous change. Change-Id: Ie25db8f8e466103487cda9ca4032bd75fab69e7b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit c61a2358170b633ce590103108719ac3f6f153a2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* inheritance_diagram.py: Complete migration to f-stringsFriedemann Kleint2021-12-031-12/+11
| | | | | | | | | | Amends d9f344fcef6bec04a787f9ea9f4ea94f15eaa26c. Task-number: PYSIDE-1725 Change-Id: If4758a422d211a90ebf0a300502a730b61030ef7 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 79ec52558acc48b0c368738bf1fcc5195921cafb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>