aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | shiboken: Fix non-deterministic order of some SBK type indexesFriedemann Kleint2018-07-268-119/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change underlying type of the type database from a QHash<qualified_name, list of entries> to a QMultiMap<qualified_name, entry>. Previously, there was an allEntries() accessor and a function named entries() building a QHash<qualified_name, entry>. Simplify this so that there is only an entries() accessor returning the QMultiMap. Refactor the various Typedatabase::find() functions to operate on an iterator range of the QMultiMap. This unearthed some bugs: 1) In the generators, the call to findType(packageName()) would return the namespace entry for "sample" instead of the intended module type entry named "sample" due to the ordering. Add a new function to search for module type entries and assert that it finds it. 2) There was a duplicate, empty primitive type entry for QModelIndexList. Task-number: PYSIDE-757 Change-Id: I1814e4ca67d306e1488398507707cfd07b3f2c78 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken: Add support for type aliases (using)Friedemann Kleint2018-07-264-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractRayCaster is the first class in Qt to use type aliases: using Hits = QVector<QRayCasterHit>; Treat them as typedefs if a canonical type can be obtained for them. This requires adding some simplification of the canonical types obtained for standard containers. Task-number: PYSIDE-751 Change-Id: I521a8b02d3c8cb89e4f72a817fbacc5955041570 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge branch '5.11' into devAlexandru Croitor2018-07-253-15/+15
|\| | | | | | | Change-Id: I7e3add2bdd36c0fe9fe99122d35a4409fed80773
| * Build script/Linux: Use installed patchelf if presentFriedemann Kleint2018-07-243-15/+15
| | | | | | | | | | | | | | | | | | | | Add path search helper and use installed patchelf instead of building the contained source. Task-number: PYSIDE-740 Change-Id: I8043aa58ff9ebc4884eee9f15745865f10bb30fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Fix the allow-thread attribute to actually have an effectFriedemann Kleint2018-07-2510-34/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, calls to BEGIN_ALLOW_THREADS/END_ALLOW_THREADS were always generated since the value of XML attribute was not used. Fix it to actually use the value. Since having it default to "no" caused a number of deadlocks (related to thread functions or functions calling a virtual function (potentially reimplemented in Python), introduce "auto" as default value. "auto" turns off BEGIN_ALLOW_THREADS/END_ALLOW_THREADS for simple getter functions. Task-number: PYSIDE-743 Change-Id: I4833afef14f2552c75b3424417c2702ce25cb379 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Enable macOS 10.13 in CISimo Fält2018-07-251-2/+2
| | | | | | | | | | Change-Id: Idd0f8721854614bf7ba2d9d38372627f8ed1b6b1 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Add debug output for container typesFriedemann Kleint2018-07-242-0/+9
| | | | | | | | | | Change-Id: Ied74ec8ca7e3b3c439204c5010b0b727be3b13b2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken: Output type database in debug modeFriedemann Kleint2018-07-241-1/+3
| | | | | | | | | | Change-Id: Id481aa5593c02c32656b141eaab6af800f978ebe Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken: Add exception specification to clang parserFriedemann Kleint2018-07-246-0/+35
| | | | | | | | | | | | | | | | | | For exception handling, calls into C++ might need to wrapped in try/catch. Detect noexcept functions for which this can be omitted. Task-number: PYSIDE-62 Change-Id: I37aced91ace184edf211a457a60c131d516a4037 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Friedemann Kleint2018-07-2432-158/+155
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-07-2431-142/+139
| |\| | | | | | | | | | Change-Id: Ie90b31ed1b88f1353261fc4040db2d788df279e6
| | * Pep 384 Final Cut: Remove PepTypeChristian Tismer2018-07-2329-141/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While trying to document the Limited API Project, it suddenly struck me: We can make the patch much much simpler and implement it without the necessity to have an extra PepType! Now I am happy to continue the documentation, because it is now no more improvable. This version will last as long as the layout of PyTypeObject does not change substantially. When that happens, then we need to rewrite stuff with the according PyType_GetSlot() access functions. These access functions will until then be complete enough so that we can live without the tricks like inventing a reduced PyTypeObject as was done in the current implementation. Task-number: PYSIDE-560 Change-Id: I49849cc377baa6794a5b53292691e21d6e2853ab Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * Blacklist flaky test web_engine_custom_schemeChristian Tismer2018-07-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test has failed three times until it passed. We therefore blacklisted it on all platforms. See also the bug report. Task-number: PYSIDE-754 Change-Id: Ieb84eb6605d309eb3963fbc867fcf8f6fc497a3e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * shiboken: Remove -fno-exceptions from Clang parse optionsFriedemann Kleint2018-07-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The option is a workaround for an old LLVM bug and is no longer needed. Worse, it causes parse errors in code that declares throw(). Task-number: PYSIDE-62 Change-Id: Ib72b14cc704c04ae3b4197fd2af718276e3fe788 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | shiboken: Fix invalid QStringRefs in type parserFriedemann Kleint2018-07-241-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QStringRefs returned by QXmlStreamAttribute do not point to some XML buffer but into a string within QXmlStreamAttribute itself and thus become invalid when the attribute is removed from the list. Store them in a QString instead. Amends e0e44f0fd5b05ee299bd4e377b0d4a302c442aae. Task-number: PYSIDE-743 Change-Id: I841eb70379af8e006868c6352283bf2970dd127d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | PySide2: Remove unimplemented attributesFriedemann Kleint2018-07-236-35/+21
|/ / | | | | | | | | Task-number: PYSIDE-743 Change-Id: Ic9827a7a460db639c4316bbf4f06561007704476
* | Fix some clang-tidy warnings in shibokenFriedemann Kleint2018-07-2324-256/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 'else if' after return/break/continue - Use const ref for complex arguments passed by value where possible - Fix 'if (foo) delete foo' to 'delete foo' - Use container.isEmpty() instead of container.size() in checks - Use ' = default' for trivial constructors/destructors - Use range based for where possible - Complete constructor initializer lists - Fix invocations of static methods - Replace some reinterpret_cast by static_cast - Remove unused variables/fields - Use initializer lists for return types Change-Id: Id5b44a2f9d429f66ef069d532a1cd31df796d38e Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Improve the XML error messagesFriedemann Kleint2018-07-231-4/+6
| | | | | | | | | | | | | | Use colons to separate name, line and column as compilers do. Change-Id: I43adf1c9f7ac50759777fbbd855faaa7f858f369 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken: Add options for diff and dry-runFriedemann Kleint2018-07-234-83/+106
| | | | | | | | | | | | | | | | | | Refactor and breathe life back into the existing diff/dry-run functionality of class FileOut and make it available via command line options. Change-Id: I32e1e262c0c2e8f107776923477fe9714ad295cf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken: Add comparison to AbstractMetaTypeFriedemann Kleint2018-07-233-8/+29
| | | | | | | | | | | | | | | | | | | | | | Extend the existing rudimentary comparison function from the meta builder and provide comparison operators. This will be useful for later refactorings. Task-number: PYSIDE-672 Change-Id: I793656a733db676d9bc3ab8910869e50274f6a79 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken: Cache TypeInfo in clangbuilderFriedemann Kleint2018-07-233-6/+33
| | | | | | | | | | | | | | | | | | Add a cache containing the TypeInfo for the CXType structs. Task-number: PYSIDE-672 Change-Id: Ibd0b5bb3f01fa507a65ded8f121c12a10aa7c401 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken/libsample: Add test case for nested containersFriedemann Kleint2018-07-232-0/+7
| | | | | | | | | | | | Task-number: PYSIDE-752 Change-Id: I88d8bf7598b9dc74adec9a4aaee8bd90db8ae6e9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-07-208-9/+570
|\| | | | | | | Change-Id: I1b6fdc6b0ac59dd726a9977620f1070bebf237a6
| * libshiboken: Use std::set::find() instead of searching the setFriedemann Kleint2018-07-191-1/+1
| | | | | | | | | | | | Task-number: PYSIDE-727 Change-Id: Ia79f34ed466eb7652946e49db6ef6db8dd9fa03d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Doc: Add snippet override for QQuickViewVenugopal Shivashankar2018-07-191-0/+67
| | | | | | | | | | Change-Id: I051ddcc61904f293ed0f21173e040f8c89e2232e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Doc: Remove repetitive text in the licenses pageVenugopal Shivashankar2018-07-191-4/+0
| | | | | | | | | | Change-Id: Ide68c9045413f26ad7d7fc781aef03d61ea99179 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Generate fully Qualified Names for FlagsChristian Tismer2018-07-162-4/+9
| | | | | | | | | | | | | | | | | | The flags structure should give correct full names. See the doc in the issue tracker. Task-number: PYSIDE-747 Change-Id: I6b5c602566d3e4b8a2a93e2522e92da956578b18 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Add chart themes exampleCristian Maureira-Fredes2018-07-133-0/+493
| | | | | | | | | | | | | | Task-number: PYSIDE-738 Change-Id: I9567eeb3350ab39656f13ee9218f535ec3782a87 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Refactor attribute parsing in typesystem parserFriedemann Kleint2018-07-194-1178/+1681
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split up the 1400 lines Handler::startElement() function into smaller helper functions. Previously, the function populated a hash with the default values of all attributes. The values were then set by fetchAttributes() from the XML attributes and applied later on. In this setup, it is not possible to add deprecation warnings since it not possible to tell which attributes were actually present in the file. Change this to operate on the QXmlStreamAttributes list from which the consumed options are removed. Add a warning about unused attributes. It is now possible to add deprecation warnings and the default values are now more obvious. Task-number: PYSIDE-743 Change-Id: I1ee04e9490b3664bba4c976fe654183819610b58 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Fix command line helpFriedemann Kleint2018-07-192-10/+10
| | | | | | | | | | | | | | | | | | The one-character path options only take one path argument. Add parameter to the doc generator options. Task-number: PYSIDE-363 Change-Id: Ia1a0c1552a5d1e3ec86609e9899e985628874545 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Update documentation of the command line optionsFriedemann Kleint2018-07-191-17/+83
| | | | | | | | | | | | | | Task-number: PYSIDE-363 Change-Id: Ic0ef5d9cbdc15f13b540ccd9ed1275681080aa2c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Refactor attribute enumeration lookups in parserFriedemann Kleint2018-07-195-262/+330
| | | | | | | | | | | | | | | | | | | | | | | | Replace the static QHashes in Handler::startElement() and other places which required converting and lower-casing the QStringRef's returned by the QXmlStreamReader by lookup functions that take a QStringView, which can be constructed from QString or QStringRef. Task-number: PYSIDE-743 Change-Id: I10234f2ddfff13ee7e0ee67f9aee118a088e5ab8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Document the smart-pointer-typeFriedemann Kleint2018-07-171-0/+20
| | | | | | | | | | | | Task-number: PYSIDE-363 Change-Id: Ib07430cb26676a47e6de1453c10b080719f7ed7d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken/ApiExtractor tests: Handle parse failuresFriedemann Kleint2018-07-171-1/+2
| | | | | | | | | | | | | | | | Pass up the bool return. Task-number: PYSIDE-743 Change-Id: Ic63a33be4c20a225d9f6a2e8a750e0e90bdce358 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Improve debug output of TypeEntry classesFriedemann Kleint2018-07-162-20/+92
| | | | | | | | | | | | Task-number: PYSIDE-743 Change-Id: Ie4794c6387ef5ffaf8a5813b744fa725427b5f09 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Refactor command line arguments handlingFriedemann Kleint2018-07-167-179/+190
| | | | | | | | | | | | | | | | | | | | | | In main, replace the class ArgsHandler by plain QMap handling. Remove the args parameter of Generator::doSetup() and add a new virtual handleOption(key, value) to the generators instead. Add missing initialization. Change-Id: I9bc844172a81244f729d87a3d4262545e6433904 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | ApiExtractor manual: Remove deprecated sphinx config key html_use_smartypantsFriedemann Kleint2018-07-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | Fixes warnings: WARNING: html_use_smartypants option is deprecated. Smart quotes are on by default; if you want to disable them, use the smartquotes option. Amends 32a2eb95758f7beb13b54053bfa97c9bc973b9f0. Task-number: PYSIDE-363 Change-Id: I0a4a8578aacbeca1fba08cffd54adfeac6022f21 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Make revision and SBK index a member of TypeEntryFriedemann Kleint2018-07-136-46/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They were previously stored in a global hash, apparently due to BC issues. Replace the global set/getTypeIndex/Revision functions by member functions of TypeEntry in typedatabase.cpp. As a drive-by change, simplify the code assigning the SBK numbers to use a flat list of entries ordered by revision and name instead of a grouped hash (bearing in mind that revision is rarely used) and might be removed one day). Also replace the use of std::unique() by the !contains()/append() pattern since std::unique() assumes an ordered list which is likely not the case. Task-number: PYSIDE-725 Task-number: PYSIDE-743 Change-Id: I9356acf1f5795446c08f266c1323f1db65cd490c Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Remove global-static hashes used for members of TypeEntryFriedemann Kleint2018-07-132-27/+11
| | | | | | | | | | | | | | | | | | | | | | TypeEntry::customConversion and ComplexTypeEntry::defaultConstructor where previously stored in global-static hashes, apparently due to BC issues. This can now be fixed. Task-number: PYSIDE-725 Task-number: PYSIDE-743 Change-Id: If4f28246a5b83e3772021a518058a9d152bb3e3f Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Make targetLangPackage() a normal property of TypeEntryFriedemann Kleint2018-07-132-58/+4
| | | | | | | | | | | | | | | | | | | | Normally, only the root typesystem element has a package specification; there is no need to have virtual functions for it. Task-number: PYSIDE-725 Task-number: PYSIDE-743 Change-Id: I3b86c8418cf16ce372c1953279a115e2eff0e984 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Remove unused TypeEntry classesFriedemann Kleint2018-07-132-128/+0
| | | | | | | | | | | | | | Task-number: PYSIDE-725 Task-number: PYSIDE-743 Change-Id: I61fcd8af7329c14ef064795c13787005b4375548 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-07-1327-5740/+1447
|\| | | | | | | Change-Id: I85c005419736d5abf65077ff259509610853af4e
| * Add text properties QML exampleCristian Maureira-Fredes2018-07-122-0/+303
| | | | | | | | | | | | Task-number: PYSIDE-738 Change-Id: I5f22cd322d4414d5ee4be38042b0fc849c40987a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Add model data exampleCristian Maureira-Fredes2018-07-121-0/+183
| | | | | | | | | | | | Task-number: PYSIDE-738 Change-Id: I21d19112cef4aff73505e5e5ae533c9a428e74f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Include manylinux1 in package name for python2 builds on LinuxSimo Fält2018-07-111-7/+9
| | | | | | | | | | Change-Id: I777cf3bd4f060610782fe6a09acd0e10ef713f0b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Add nested donuts exampleCristian Maureira-Fredes2018-07-111-0/+137
| | | | | | | | | | | | Task-number: PYSIDE-738 Change-Id: I16c8bbfaa8c7ed6fc08ed6b16c9bdf8dd23ce0a2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Add percent bar chart exampleCristian Maureira-Fredes2018-07-111-0/+99
| | | | | | | | | | | | | | Task-number: PYSIDE-738 Change-Id: I0b62e0b93b64ab3a8c4447650c430941a7b4ae0c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Add legend exampleCristian Maureira-Fredes2018-07-111-0/+252
| | | | | | | | | | | | Task-number: PYSIDE-738 Change-Id: I68614a1a0e417f8318adc4f008d452bc280abcb3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Add donut chart breakdown exampleCristian Maureira-Fredes2018-07-111-0/+181
| | | | | | | | | | | | | | Task-number: PYSIDE-738 Change-Id: I9b75a87615ef5888d98e21c8429f425a05e3a08c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Fix limited API incompatibility with Python 3.7Christian Tismer2018-07-103-77/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Python 3.7 appeared, the structure of pystate.h was changed, substantially. Unfortunately this structure contains the trashcan code, which is only available as a macro and not part of the limited API. This code is normally not used by application programs. It prevents crashes when chains of millions of objects are deallocated. I disabled this for now when the limited API is active. As soon as somebody complains about crashes, I will try to implement it again in a safe way, but I am not sure if it is worth it in the first place. Task-number: PYSIDE-737 Change-Id: Id0daf391448ddcb9df3d299f859ef024714fa736 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>