aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/doc
Commit message (Collapse)AuthorAgeFilesLines
* doc: update versions and comandsCristian Maureira-Fredes2020-10-211-3/+14
| | | | | | | | | | | | | | | | | * add new way of building rst-only documentation * Updating recommended libclang for 5.15 * recommending python 3.5+ * link commercial license * Show videos as grid * changing title of a tutorial to be more specific * add missing step to build only shiboken * add venv as an option before virtualenv * add problem on windows and python 3.8.0 * add section to create a virtual environment * only show titles of tutorials to avoid having a long page Change-Id: Iebb99d2cd776c3d5b72dc44153f325f74a1626cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add command to build rst documentation onlyCristian Maureira-Fredes2020-09-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Since the process to get the documentation built is to build the whole project, that is too time consuming. Additionally, using qdoc on the Qt API takes a lot of time. This patch introduces the setup.py option called 'build_rst_docs' which skip the general build, and only generates HTML documentation based on all the .rst files we have for shiboken and pyside. To use it: python setup.py build_rst_docs The build will throw warnings related missing directories, and files, which are generated on the 'qdoc' process, but since they are skipped they are not present. Some missing references warnings are skipped due to also come from the qdoc-based step. Task-number: PYSIDE-1106 Fixes: PYSIDE-1390 Change-Id: I4118fd3b64e217717df6cae093138f6951d37094 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* doc: fix more sphinx warningsCristian Maureira-Fredes2020-09-293-4/+4
| | | | | Change-Id: I07a87ad49546534f3492b534b2a2dd4945304de7 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken2: Generate properties as fieldsFriedemann Kleint2020-09-281-8/+51
| | | | | | | | | | | | | | | | - Add an XML attribute specifying whether code is to be generated to the XML properties. - Split the generator functions for field setters and getters apart so that they can be used for generating property setters and getters. - Generate code for all properties from XML when the PySide extension is not used, otherwise only for those with the attribute set. Task-number: PYSIDE-1019 Change-Id: Iab2ba38b90038edc667a233c23c7113fdc6fb438 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Add a way of specifying properties in typesystem XMLFriedemann Kleint2020-09-231-0/+32
| | | | | | | | | | Add a list of TypeSystemProperty to ComplexTypeEntry, parse it from XML and add those properties in AbstractMetaBuilderPrivate::parseQ_Properties(). Task-number: PYSIDE-1019 Change-Id: Idf6ecde7c9de6bf1e56be423921672152e97de70 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2/Documentation: Clarify targets of modificationsFriedemann Kleint2020-09-216-25/+62
| | | | | | | | | | | | Move the paragraphs explaining Python / C++ wrapper classes to a separate new page and make it visible in the TOC. Add references from where the 'class' attribute is used. Task-number: PYSIDE-841 Change-Id: If55533e4e3c9acddc08f311802747ccdedfcbf02 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Allow specifying the sequence of overloadsFriedemann Kleint2020-09-211-0/+42
| | | | | | | | | | | Add an attribute to specify a number by which the functions will be sorted. This deactivates the default sorting which tries to avoid implicit conversions. Fixes: PYSIDE-1366 Change-Id: I9a891e21f86152b2fdfda9a48d685f19aa936508 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken2: Add attribute for generating "using namespace"Friedemann Kleint2020-09-181-0/+8
| | | | | | | | | | | | Make it possible to turn off the generation of using namespace. This is required in Qt 6 to avoid a clash between Qt3DCore::QBuffer and QBuffer used in __repr__. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Iaaf3e67f0ffaae86e2de82b9a1b8fe7d00c74e6b Reviewed-by: Christian Tismer <tismer@stackless.com>
* Remove dependency of the QtQml module header on pysideqmlregistertype.hFriedemann Kleint2020-09-161-0/+5
| | | | | | | | | | | | | Make it possible to inject code into module headers by specifying "declaration" on type system code snippets. Use that to insert the struct definition into pyside2_qtqml_python.h and remove the include. Add the required includes via code injection into the wrapper and extra includes for the types. Fixes: PYSIDE-1381 Change-Id: I8dfda4c33d66f56e8fb516e1b174cc43664ca318 Reviewed-by: Christian Tismer <tismer@stackless.com>
* 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>
* shiboken2: Accept unqualified names for drop-type-entriesFriedemann Kleint2020-06-301-1/+3
| | | | | | | | | The option expected fully qualified type names (PySide2.QtNetwork.QSslKey), but the PySide2 CMakeLists only create unqualified names (QSslKey). Match this, too. Change-Id: I6c86a4ef9bb1a6bdb6a0672454ac2f2806477408 Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken2: Clean up code injection attributesFriedemann Kleint2020-06-191-65/+68
| | | | | | | | | | Remove the unused enumeration values. Change the class of the "declaration" position from "native" to "shell" since that is where it is used and mention it in the documentation. Task-number: PYSIDE-1282 Change-Id: I547b4bab055df27ce8b0b7b41b9d382dc8f175d1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Clean the build/install output a bitCristián Maureira-Fredes2020-06-081-2/+4
| | | | | | | | | | | | * Adding STATUS or WARNING to a couple of message() calls. * Replacing some print() by log.info() * Changing some '*' by '-' * Align configuration outputs to check paths easily * Adding big message to check when shiboken2/pyside2 is being built. * Including the cmake_minimum_required() function instead of an 'if'. Change-Id: Idb6c5797286d400192d083403063e2ae582e3fe6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Enable doc builds using the offline templateVenugopal Shivashankar2020-06-0413-3/+2058
| | | | | | | | | | A new command-line option, --doc-build-online, enables to choose online builds, otherwise offline docs are built by default. Change-Id: I34ef8a22ef3bd321bd972c4f2873e4321c9c336a Fixes: PYSIDE-1292 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Allow for multiple header files on command lineFriedemann Kleint2020-06-031-1/+1
| | | | | | | | | | | | | | | | | | Change ApiExtractor and MetaBuilder to use QFileInfoList. Refactor the options handling to work on a struct separating options from positional arguments to make handling multiple file names easier. Refactor and streamline the options parsing code a bit, avoid duplicated parsing of project files. Print the usage when positional arguments are missing. [ChangeLog][shiboken] shiboken now accepts multiple headers on the command line. Change-Id: I221ab5a71232af1323408f77295137dc92e3d582 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-04-171-2/+2
|\ | | | | | | Change-Id: I67ca2ec01e220ef32c61aba17a0be4e46f50cb5f
| * doc: fix error in shiboken getting startedCristian Maureira-Fredes2020-04-121-2/+2
| | | | | | | | | | | | Fixes: PYSIDE-1266 Change-Id: Ia0aafb1f0e91b5baf070c018d4583e64f2c92f8c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | shiboken: Allow for parsing headers under system include pathsFriedemann Kleint2020-04-161-2/+4
| | | | | | | | | | | | | | | | | | Extend the <system-include> element for a trailing slash to indicate an absolute path against which a file is matched. Change-Id: I9557e26b941a7d5d5cab575cd978c158c6859b97 Fixes: PYSIDE-1267 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-04-071-5/+0
|\| | | | | | | Change-Id: Id9d77dcbb396227a670e4455031ce074488c9e17
| * Revert "shiboken: Add XML attribute to turn off method caching"Friedemann Kleint2020-04-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fcbbab0a6b5949b5c3726214ed87898b5fbcebcc. This is no longer required after a fix generating the property code into the setattro methods of QObject-derived classes. Task-number: PYSIDE-803 Task-number: PYSIDE-1255 Change-Id: I9e989c0592eaaf25aa55a1db49537daa4bdb2a57 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-03-131-0/+1
|\| | | | | | | Change-Id: Ia1c7d31c9f5d1fd8dbc33a0357c419301fd67b6a
| * Change the default of allow-thread to falseCristián Maureira-Fredes2020-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This process introduced many unnecessary calls to the Py_BEGIN/END_ALLOW_THREAD macro to PySide, which had a negative impact on the overall behavior when studying the responsiveness of UIs with threads. Some tests were adapted to include the new allow-thread behavior. [ChangeLog][shiboken] The default of the "allow-thread" attribute has been changed to false as it was observed to cause performance issues when using threads. Task-number: PYSIDE-803 Change-Id: I2cd67c86340f7bf7a2c5694869d17fe2027a0abb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-03-041-0/+5
|\| | | | | | | Change-Id: I7a94c67fdb9225edf4d605e67839a1f6f7375c2a
| * shiboken: Add XML attribute to turn off method cachingFriedemann Kleint2020-03-031-0/+5
| | | | | | | | | | | | Task-number: PYSIDE-803 Change-Id: I0ba80cea5804e1b83cc55ee32163ca9d021ccd26 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-02-2717-304/+361
|\| | | | | | | Change-Id: I64cb93d53a2811ba695820501287902995140f9a
| * Re-structure shiboken documentationCristián Maureira-Fredes2020-02-2617-304/+361
| | | | | | | | | | | | Task-number: PYSIDE-1112 Change-Id: Ice3e8efb7b75bd14ee73c20310f722c4e0b07b3b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | shiboken: Remove InterfaceTypeEntryFriedemann Kleint2020-02-061-24/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InterfaceTypeEntry is a relic from Java, which does not have multiple inheritance. Remove it and handle it as object-type. Just removing the code breaks tests though, since AbstractMetaClass only has one pointer to its base class. The other base classes are added to the interface list. FAIL! shiboken2:testmultipleinheritance Newly detected Real test failure! FAIL! shiboken2:sample::ownership_invalidate_after_use Newly detected Real test failure! FAIL! shiboken2:sample::visibilitychange Newly detected Real test failure! [ChangeLog][shiboken] interface-type has been deprecated. object-type should be used instead. Change-Id: I19e876d82b26c2ef7865e3fafc74503c6cbd5a8b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | shiboken: Make it possible to specify smartpointer instantiationsFriedemann Kleint2020-02-051-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add an attribute "instantiations" to the smart-pointer-type element, which allows to specify a comma-separated list of instantiation types for which wrappers should be generated in the module. This avoids clashes of indexes. Task-number: PYSIDE-1024 Change-Id: Iac4b93b91ca4982064beef4c5abafc547052e7f1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2020-02-044-40/+41
|\| | | | | | | Change-Id: I6e0693b8d7d1f7b506a759f15758bc4481a3baa0
| * docs: Improve Shiboken docsKavindra Palaraja2020-01-272-37/+34
| | | | | | | | | | Change-Id: Ibcefb190f5ea50b7c8575cd03b9e0f69b3a170b6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * docs: Fix pre overlap and improve readingCristián Maureira-Fredes2020-01-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Removed the color and the padding on the 'pre' elements of the docs. Additionally increased the line-height globally to 1.4 to make the reading easy. Fixes: PYSIDE-1201 Change-Id: I292d4e6da616ecb84a923444b99ad28a28d6cc5d Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * shiboken: Introduce "until" version attribute as opposite of "since"Friedemann Kleint2020-01-241-1/+6
| | | | | | | | | | | | | | | | | | | | Prototypically use it for QMessageLogContext, allowing to elegantly build for Qt from version 5.12..now using a single type system file. Fixes: PYSIDE-1191 Change-Id: Iaa7bdc10c7129d84c54e85a09a1c802a409708f9 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Friedemann Kleint2019-12-051-2/+59
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Friedemann Kleint2019-12-051-2/+59
| |\| | | | | | | | | | Change-Id: I779defc33a4bab15cfde1e276d6d78c476a47e0f
| | * New documentation structureCristián Maureira-Fredes2019-12-031-2/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - New structure for the landing page, - Some rst were renamed to the new structure, - New sections "Videos", "Examples" and "Getting Started" were created, - Information from the wiki was used to create the Getting Started sections, - FAQ section was removed, - Removing pyhtml2devhelp.py since it is unused, - The new CSS modifications were copied over the Shiboken2 directory. Task-number: PYSIDE-1067 Change-Id: I1ba53cd0030d6d02449fecdfea70efb49421ad3b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com>
* | | shiboken: Add a way of specifying system includes to be parsedFriedemann Kleint2019-12-051-0/+15
|/ / | | | | | | | | | | Task-number: PYSIDE-454 Change-Id: I9302cf74544315875a65bc09b75741c7fe6399e8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* / shiboken: Fix classes in hidden namespacesFriedemann Kleint2019-12-031-2/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an existing functionality to hide namespaces when specifying generate="no" on namespace-type which did not work for classes. In addition, it was implemented using the generation attributes of TypeEntry. This is problematic since dependent typesystems are loaded with generate="no", which actually means that no code should be generated for them. To fix this, introduce a new "visible" attribute for namespaces which also accommodates for hiding C++ 11 inline namespaces. Some projects uses the namespaces as packagename while creating python bindings, and to avoid duplicate names they ignore the original c++ namespace. For example a class like that: namespace Qt3D { class Vector; } The namespace "Qt3D" will be used as package name so the namespace "Qt3D" should be ignored during the generation, otherwise the 'Vector' type will be represented by 'Qt3D.Qt3D.Vector' and that is not what we want. Initial-patch-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com> Fixes: PYSIDE-1074 Change-Id: I3fd391ac3d839d3f8f510c6a4d4000f7d92eacff Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Doc: Improve the documentation styleTopi Reinio2019-09-021-20/+76
| | | | | | | | | | | | | | | | | | | - Restyle the admonition (warning/note/seealso) paragraphs, use the same font for all link types, and separate entries with ', '. - Drop the rounded corners on multiple section titles. - Use a monospace font for enumeration tables (value column). - Restyle the <blockquote> element that is used for overload/parameter docs to separate them from the documentation 'body'. - Replace list-style-type:'' with list-style:none as the former does not work on all browsers. Change-Id: I0c37bd05448d7ce38a47af7449ca0bc9efff68b4 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Update docs styleCristián Maureira-Fredes2019-08-201-12/+79
| | | | | | | | | | | | | | Some upgrades to improve the readability: * Reduce margins, * Remove round-corners from boxes, * Remove parameters and return type boxes and use bold instead, * Always show the Table of Contents. Task-number: PYSIDE-1067 Change-Id: Ibaa484172103eff17426ae03ee6f95c78fe51143 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-08-141-0/+2
|\ | | | | | | Change-Id: Ibe27e8ef7edc487640bc9cf1fe113d2d27e1e291
| * shiboken: Allow for "auto" as target of type for CONVERTTOCPP in injected codeFriedemann Kleint2019-07-291-0/+2
| | | | | | | | | | | | Task-number: PYSIDE-1037 Change-Id: Idfc70fe571e4058d0c82db1bd0afea54436fe27c Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Alex Blasche2019-07-181-0/+23
|\| | | | | | | Change-Id: Ic2c43ef80769e3063dac771518c803861510f72e
| * shiboken: Improve handling of pointer types for CONVERTTOCPP in injected codeFriedemann Kleint2019-07-131-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Code snippets like: QByteArray *cppSelf = %CONVERTTOCPP[QByteArray *](obj); cause an assert in shiboken since the '*' is captured into the target of the assignment and is not considered part of the type. Make the error message a bit clearer and add documentation. Fixes: PYSIDE-1037 Change-Id: Ie8da2f57ba91325ea677e1a00852e91726c0e09b Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-06-191-0/+7
|\| | | | | | | Change-Id: I42955abfeb1fe8b7c6443a9b334154984286b9cc
| * shiboken: Enable specifying names for a parameters of added functionsFriedemann Kleint2019-06-051-0/+7
| | | | | | | | | | | | | | | | | | | | Introduce a way to specify a name for a parameter using '@' delimiters. Fixes: PYSIDE-1017 Change-Id: I3ae505c104a64413ca2bad628d9f9d3e04bb5b88 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Doc: add official CSSCristián Maureira-Fredes2019-05-093-476/+1893
|/ | | | | | | | | This is the CSS that the official web is using, and replace the old PySide1 style when building locally. Change-Id: Ibc78f52913a108b804cc2472f312c34c962635a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken documentation: Move TOC to index pageFriedemann Kleint2019-04-302-22/+15
| | | | | Change-Id: I0f7c6a303cb0d404c42ae96f067eece1442c4a33 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* shiboken: Enable including typesystem XML snippets via entitiesFriedemann Kleint2019-04-161-0/+24
| | | | | | | | | | | | Implement a QXmlStreamEntityResolver which resolves undeclared entities to file names in the type system include path. This is a work-around for the missing handling of standard externally parsed entities of QXmlStreamReader. Task-number: PYSIDE-955 Change-Id: I68ebae8ad465ae460c3a0eeadaef22dca2101e6c Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Move the Api extractor documentation into shibokenFriedemann Kleint2019-04-0317-16/+1307
| | | | | | | | | | | | | | | | It does not really make sense to have it separately and the reference documentation is currently not accessible from the TOC. Move it over and append it to the TOC. Merge the chapters on ownership chapters (for starters, by simply concatenating). The Api extractor overview chapter is dropped as it is outdated anyways. Partially reverts 0d12d71920067be499d9237b4ad04f7f11047759. Task-number: PYSIDE-363 Change-Id: I02f6b0a4bb91fc54267fa03cefd2ac7d4049f07b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Update logoCristian Maureira-Fredes2019-03-261-0/+0
| | | | | | | | | Updating to the new project logo (128x128). optipng was ran on the images: optipng -o 7 -strip all pysidelogo.png Change-Id: I75d0ef76a7fddf957a5095d74c4c836a2c1ebe31 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>