aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update the pysideversion.rst documentFriedemann Kleint2018-03-021-9/+9
| | | | | | Task-number: PYSIDE-363 Change-Id: Ibed88d97e70c7b6861ee47b23a7f4402683ba51e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Revert "Temporarily disable building of Qt3D for Qt >= 5.10"Friedemann Kleint2018-03-021-1/+1
| | | | | | | | | | | | Change qt3d/352dacc0040f77345ab2f6e9019ff68ba2ed354e has made it up to the dev branch and the qt5.git integration succeeded, so, Qt 3D can be re-enabled. This reverts commit 52ac602d7b25dc31e681dcddc0b6dc9452fa4f59. Task-number: PYSIDE-487 Change-Id: I4b95a7050f03786a08e4fb14c1bb332ca0281db4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Check slot-signal association when connectingCristian Maureira-Fredes2018-03-022-4/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When connecting a signal with a slot there is a process to associate the proper signal signature, but the slot signature was not verified. This missing verification step lead to wrongly associate the slots and the signal signatures, for example: def on_clicked(checked=True): ... QGroupBox.clicked.connect(on_clicked) will wrongly connect the slot "on_clicked" with the signal "clicked()" (without any argument), when the proper signal is "clicked(bool)". This can be solved by manually specifying the arguments: QGroupBox.clicked[bool].connect(self.clicked) We can add an additional verification step to associate the proper signal if the slot has a certain number of arguments. There is an existing test that checks the compatibility of this change with all the ways to connect signals and slots. A few additional cases were added. Task-number: PYSIDE-104 Change-Id: Ic5b06fa3bb91903f7d506e0e2c52a6f7d3dc4570 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Documentation/inheritance_diagram.py: Fix import logicFriedemann Kleint2018-03-021-38/+36
| | | | | | | | | | | | | | | | The script tried to import a class or a module to obtain an introspectable object, which failed for nested classes like PySide2.QtCore.QStateMachine.SignalEvent, resulting in numerous warnings like: WARNING: Could not import class or module 'QStateMachine.SignalEvent' specified for inheritance diagram Rewrite the import to strip off the path components in a loop until the import succeeds and then walk up the attributes again to obtain the object. Task-number: PYSIDE-363 Change-Id: I33c6b4c6145b501a2f8f9ef3325610fefad9580d Reviewed-by: Christian Tismer <tismer@stackless.com>
* Type system: Add attribute indicating C++ 11 enum classesFriedemann Kleint2018-02-289-24/+75
| | | | | | | | | | | | | Introduce enumeration for the type to EnumTypeEntry which can be specified by the boolean "class" attribute. For the enum classes, the value names need to be qualified by the enum name to match the C++ API. For the C++ generator, add an overload to Shiboken::createScopedEnumItem() that takes a PyTypeObject and add the enum items to the enum so that the name is in the enum scope. Change-Id: Ia0e469d13b08c196b9ddd965b9cf3cc62a38630b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Remove unused code related to enumerationsFriedemann Kleint2018-02-282-29/+2
| | | | | | | | Remove class struct EnumValueRedirection and add explanatory comment to EnumValueTypeEntry. Change-Id: Ic4665436f301943805c7985188bc41c4ad3e8336 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Type system parser: Refactor convertBoolean()Friedemann Kleint2018-02-282-10/+10
| | | | | | | | Turn it into a static helper and use QString::compare() to avoid the call to toLower(). Change-Id: Ifc10a7e8b5df4df80ee23135e32aea34ed72d295 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Type system parser: Introduce QStringLiteral for attribute valuesFriedemann Kleint2018-02-281-29/+34
| | | | | | | Avoid QString allocations for them. Change-Id: Ia55fba30f790a938900e7b5217daeaa6098beaf6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken/qtdocgenerator: Fix inline imagesFriedemann Kleint2018-02-282-14/+57
| | | | | | | | | | | | | | | | | | The rst ::image elements do not work inline, they require a line each. Work around as recommended by using rst substitution references instead, using a tag enclosed in '|' and defining it below. Split out a separate inline image handler and store the references to be written out later. Fixes warnings like: WARNING: image file not readable: PySide2/QtCore/images/cursor-cross.pngAcrosshaircursor,typicallyusedtohelptheuseraccuratelyselectapointonthescreen. Task-number: PYSIDE-363 Change-Id: I860875957688885ca48038aa3aa96bd9c38da709 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken/qtdocgenerator: Escape more charactersFriedemann Kleint2018-02-271-1/+6
| | | | | | | | | | Fix several warnings: Inline literal start-string without end-string. Task-number: PYSIDE-363 Change-Id: Iadd753d9e8c46b6f00e915e494b01f763e6ce035 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix inheritance_diagram.py to run with Python3Friedemann Kleint2018-02-271-6/+7
| | | | | | | | | | | | | | | | | | - Fix _class_info() to return a real list instead of list view, fixing: TypeError: can't pickle dict_values objects - Enclose font names in quotes, fixing dot complaining about a syntax error. - Encode the hash string get_graph_hash(), fixing TypeError: Unicode-objects must be encoded before hashing - Pass on options as dict instead of list to render_dot_html(), render_dot_latex() Task-number: PYSIDE-363 Task-number: PYSIDE-617 Change-Id: If050b73cf35ac6a6c58c0d3e5ea713c736ea842c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken/qtdocgenerator: Pass full name for inheritance diagramFriedemann Kleint2018-02-271-1/+1
| | | | | | | | | | | Fixing numerous warnings: WARNING: Could not import class '...' specified for inheritance diagram Task-number: PYSIDE-363 Task-number: PYSIDE-617 Change-Id: I84013d8be442c43212f0726a141ce0dc9b51c92c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* missing_bindings.py: Update documentation URLsFriedemann Kleint2018-02-271-1/+3
| | | | | | | | 5.9 is no longer a snapshot. Add 5.10, 5.11. Change-Id: I2eec453101c06abb8c83f28bd6e71ca67492a291 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Fully qualify enum valuesFriedemann Kleint2018-02-263-71/+115
| | | | | | | | | | | | | | When using C++11 enum classes, enum values need to be fully qualified. Add the enum name where the values are written and handle it in the various resolve() functions. Split out ShibokenGenerator::guessScopeForDefaultFlagsValue() from ShibokenGenerator::guessScopeForDefaultValue() for clarity. Task-number: PYSIDE-487 Change-Id: Idf8d627ab88111ad67734bee8b4d130ef53e038d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Fix generated initialization code for enum classesFriedemann Kleint2018-02-263-1/+7
| | | | | | | | | | Wrap value in int(), which is required for enum classes. Add a compile test to libsample. Task-number: PYSIDE-487 Change-Id: I78f07ae66da64caad1f75722308256e40e91eded Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Augment signature mapping for 5.11Christian Tismer2018-02-261-1/+3
| | | | | | | | | There is some new structure that is not yet supported. I hope this works because I have no installation of 5.11. Change-Id: I310bfc4f20d33b2a6511ce59a4d68aec971a4128 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* setup.py: Distinguish debug/release PythonChristian Tismer2018-02-261-0/+5
| | | | | | | | | | | | | | When developing the heap types, I had to switch between debug and release Python very often. This patch allows for debug and release to co-exist without re-building everything. Additionally to the 'd' that gets appended to the build and install folders, I used a 'p' for debug Python. Please feel free to change that as you like. Change-Id: I022face5177bb69589809c8b235f09161d7fabd2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Refactor finding of enumerationsFriedemann Kleint2018-02-235-75/+52
| | | | | | | | | | | | | | | - Add helper AbstractMetaEnum::findEnumValue() which finds unqualified as well as qualified enum values. - Remove unused function bstractMetaClass::findEnumForValue(QString). - Remove 2nd parameter from AbstractMetaClass::findEnumValue(QString, AbstractMetaEnum *). The comment claimed that it is excluded from the search, but the condition was the reverse. Just removing it apparently does not do harm. Task-number: PYSIDE-487 Change-Id: I32b036045ea335b805fba79df327cc42d787f18c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-02-2314-427/+192
|\ | | | | | | Change-Id: I5d1a4734e8f44785898ba62beaa0bdd2004fca22
| * Signature: make the parser more complete for 5.11Christian Tismer2018-02-231-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser regex could not handle angle bracket pairs with commas in it. This is needed for template parameter lists. When they contain commata between the angle brackets, the parser did not recognize that. This fix allows for one level of angle brackets with whatever content. It will probably be needed in 5.11, but the syntax that the regex recognizes should always be complete. I had a hard time to understand this split regex again, so I added some more documentation, and it should now be simple to extend it even more. Task-number: PYSIDE-510 Task-number: PYSIDE-616 Change-Id: Ic854852f35af8b4526a63ffe920f2c01204c1f31 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Deprecate --iculib-url optionAlexandru Croitor2018-02-231-6/+2
| | | | | | | | | | | | | | | | | | | | The option is not being used anymore since commit c605d686f8cc4c8d370ec4d6260fca4b423f5526 , but we need to keep the name around, so that setup.py doesn't error out in Coin because we still pass that option. Change-Id: I6f3433d1feacd8940aa48ba7e1113fe44a19ed9b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Remove _utils.py module from packageAlexandru Croitor2018-02-225-366/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt4 days, _utils.py was used to register a custom qt.conf file into the Qt Resource System, which contained a Prefix (and other locations like binaries / QML imports) so that QtCore can find the correct location of the QPA plugin, and all other requirements. The code was not adopted to work for Qt5, and was silently failing without doing anything. It is not needed anymore though, since the qt.conf registration is now done in C++ in libpyside shared library, since the commit e455d995be989cbdfef2bcd54fd7057a9b036b52 . Thus remove the _util.py file, and adjust __init__.py accordingly. Task-number: PYSIDE-600 Change-Id: I76e3ea442a6e9b9df4996e628ffffcc7384b7f82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Make sure wheel names contain both PySide2 and Qt versionAlexandru Croitor2018-02-221-5/+31
| | | | | | | | | | | | Task-number: PYSIDE-613 Change-Id: Iad411a46618d157b17f62b403591f348acd98a4e Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Don't copy duplicate libraries on package installationAlexandru Croitor2018-02-229-29/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes sure to resolve symlinks and copy only one file for every dynamic shared library used (vs 3 before -> 2 symlinks + 1 actual library). This avoids duplicate files, as well as saves space when creating wheel (e.g. no 3 copies of standalone WebEngine library). This filtering happens copying from CMake install dir into pyside_package_dir (the symlinks are still present in the CMake dir, but that shouldn't harm anybody, and might be useful for users of shiboken only for example). Task-number: PYSIDE-495 Change-Id: I0fe454e16c6b254a8682aa7b1c702ec01a3064f0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix setup.py install to work on macOSAlexandru Croitor2018-02-211-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | This change amends e0a4372160d9b1ab1550589784cc456b93d28cab to allow running setup.py install without getting exceptions from distutils. Specifically the problem was that distutils did some additional checks to make sure that plat_name == get_platform(), which will not be the case because of the modified minimum deployment target. The fix is to disable that check via a flag. Change-Id: I066c0d4b7a6b27fceaf094c15bace7aba3c873bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix wheel packages on macOS to contain min correct deployment targetAlexandru Croitor2018-02-211-20/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python's distutils does not know about the minimum deployment target of extensions, but only the version that was used when building the Python interpreter itself. This value is propagated to the final wheel name, and confuses users on which macOS version can the package be used. This patch computes the correct minimum deployment target, and forces distutils (and wheel) to use it in the wheel name. Unfortunately it requires a slightly dirty hack to circumvent a rigid check in distutils itself. Task-number: PYSIDE-612 Change-Id: I4380ee81840f9746b210579700cc5d69d3865810 Reviewed-by: Fredrik Averpil <fredrik@averpil.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | sphinx: Remove deprecated config keysFriedemann Kleint2018-02-234-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove - html_add_permalinks: the key has been changed to str and has a default. - html_use_smartypants: Replaced by smartquotes and defaults to true. Fixes warnings: WARNING: The config value `html_add_permalinks' has type `bool', defaults to `str'. WARNING: html_use_smartypants option is deprecated. Smart quotes are on by default; if you want to disable them, use the smartquotes option. Task-number: PYSIDE-363 Change-Id: I85092597a860f58cc012220edbf0c03749326432 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | QtDocGenerator/QtXmlToSphinx: Fix see-also linksFriedemann Kleint2018-02-222-93/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "See also" links may appear in the qdoc WebXML output as nested links: <see-also>QAbstractXmlReceiver<link raw="isValid()" href="qxmlquery.html#isValid" type="function">isValid()</link> which was handled in handleLinkTag(), or as direct text: <see-also>rootIsDecorated()</see-also> which was not handled, causing numerous warnings: .../QAbstractXmlNodeModel.rst:448: WARNING: Content block expected for the "seealso" directive; none found. Refactor and split QtXmlToSphinx::handleLinkTag() into several functions to operate on a struct LinkContext and keep 2 instances for nested link tags and directly embedded links. Task-number: PYSIDE-363 Change-Id: I734884267209f3621bfc5db4bf4347b838eb0de6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Deploy libclang into standalone packageAlexandru Croitor2018-02-221-0/+58
| | | | | | | | | | | | | | | | The executable shiboken2 depends on libclang shared library being found in the same directory as the executable. Change-Id: Id59435bdf9df9a0f59ae897c414cf4ce312e6d62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Reduce number of warnings when running shiboken on a custom moduleAlexandru Croitor2018-02-221-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running shiboken on a custom XML file (like the scriptableapplication example) would show tons of warnings about not being able to find certain types or enums or other things inside Qt modules. For scriptableapplication that was the case, because the wrappedclasses.h file would only include the <QMainWindow> header file, and not the rest of QtWidgets / QtGui headers, which means that shiboken found types declared in XML files, but could not find the actual declarations inside the preprocessed header file. This change adds some additional conditions so that warnings are not printed when a typesystem file is loaded with the generate="no" attribute, because no C++ code will actually be generated for types defined inside such a typesystem file. Task-number: PYSIDE-587 Change-Id: I1f166483c2f343796e08d3142e5e296c4ee43f27 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add CMake-based build rules for scriptableapplication exampleAlexandru Croitor2018-02-223-21/+294
| | | | | | | | | | | | | | | | | | Mostly a clean-ish port of the qmake project file, which also uses the pyside_config.py for getting proper include and link paths. Task-number: PYSIDE-597 Change-Id: I87f71b93ecdcc27d49250ccc0710e64300532dab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Remove the internal functions Qt::get_enumName()/Qt::get_enumMetaObjectFriedemann Kleint2018-02-214-12/+2
| | | | | | | | | | | | | | | | | | | | They apparently originate from an expanded macro and result in doc warnings. Change-Id: I2418034f643156855091e1e94e0fbb2a58e77bfc Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | QtDocGenerator: Indent the function list containerFriedemann Kleint2018-02-211-1/+1
| | | | | | | | | | | | | | | | | | Fix warnings: Content block expected for the "container" directive; none found Task-number: PYSIDE-363 Change-Id: Ie855ac355478060c0d280413a31dffcb03cf3935 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | QtDocGenerator: Ensure newline before tablesFriedemann Kleint2018-02-211-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings like: warning: Undefined substitution referenced: "Constant |Description" on tables like: *amplitude**period* +-------------------------+-----------+ |Constant |Description| +=========================+===========+ |QEasingCurve.InOutElastic| | +-------------------------+-----------+ Task-number: PYSIDE-363 Change-Id: I56cd9b73dacbfd84260c059a8916db5540029816 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | QtDocGenerator: Add newline before Synopsis/Detailed DescriptionFriedemann Kleint2018-02-211-3/+5
| | | | | | | | | | | | | | | | | | Fix sphinx warnings: warning: Explicit markup ends without a blank line; unexpected unindent Task-number: PYSIDE-363 Change-Id: Iec9d8b35317dc9c1009db468284cb7b7a88104a0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | QtDocParser: Fix and refactor queriesFriedemann Kleint2018-02-211-34/+58
| | | | | | | | | | | | | | | | | | | | | | | | - Use a QTextStream for better readability - Extract a helper function to format the function parameter type query: - Fix the function parameter type attribute ("left"->"type") - Fully qualify enumeration and other non-primitive types Task-number: PYSIDE-363 Change-Id: I529e839fb737f30bd9b70d10a48fcfb0c9141f8f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Documentation extraction: Add error handlingFriedemann Kleint2018-02-216-13/+100
| | | | | | | | | | | | | | | | | | Trim the strings returned by the XPath queries and warn about failing queries. Task-number: PYSIDE-363 Change-Id: Ia0233d490497597cb78aa16b0908fe226270705c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | DocParser: Add helper function to create list of documentable functionsFriedemann Kleint2018-02-215-35/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move code from shouldSkip() helper of the doc generator into the doc parser and use that for the qdoc/doxygen parsers. The additional checks (most importantly the check for declaringClass != ownerClass excluding the virtual functions added by AbstractMetaClass::fixFunctions() to derived classes) avoid running unneeded XPATH queries. Task-number: PYSIDE-363 Change-Id: Ib1141a348c96b269a50c63dd94fe93931c12d1ec Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken/docgenerator: Refactor code doing the escapes for rstFriedemann Kleint2018-02-201-18/+39
| | | | | | | | | | | | | | | | | | | | Introduce a streamable class that does the escaping and some helpers for QString/QStringRef. Task-number: PYSIDE-363 Change-Id: Ica6d8a2ab43eeb597b4e9080330dc2ce700e0ed2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken/docgenerator: Remove unneeed QStringRef::toString() callsFriedemann Kleint2018-02-201-5/+5
| | | | | | | | | | | | Change-Id: I4bbaa7d46bab2526906655c5f03bbd25a142bbc4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.9" into refs/staging/5.9Friedemann Kleint2018-02-202-2/+13
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-02-202-2/+13
| |\| | | | | | | | | | Change-Id: If56adeea2f888d8bc34e202b697f735508896c84
| | * Fix rpath of QtWebEngineProcess in standalone macOS framework buildAlexandru Croitor2018-02-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rpath already present assumes the presence of some symlinks, which are not present when copying over the Qt frameworks. Thus the rpath needs adjustment. Task-number: PYSIDE-605 Change-Id: I2fec6f53c8b617a6e755718e9174cadd2c485b5e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Fix MACOSX_DEPLOYMENT_TARGET being set by distutils.spawn()Alexandru Croitor2018-02-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though a user might specify a CMAKE_OSX_DEPLOYMENT_TARGET value, this will not automatically set the regular MACOSX_DEPLOYMENT_TARGET environment variable, which is picked up by the compiler to decide which standard library to use. Because CMake is invoked via run_process -> distutils.spawn(), spawn might decide to set its own value of MACOSX_DEPLOYMENT_TARGET. That is undesirable. Make sure to always specify the environment variable based on given value, or current OS version. (cherry picked from commit 6945dfb657a17fd66fd547e086c6fa9c76f06074) Change-Id: I7f2dcc546c447d30fc1585cda220e3437cee9491 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Fix heap corruption crash on macOS 10.8 CI machineAlexandru Croitor2018-02-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macOS 10.8, PySide2 branch 5.6 integrations were misteriously failing with crashes on exit in the objecttype_test.py test, with a stack trace similar to: 0x00007fff8899e90a _sigtramp + 26 0x0000000100784710 0x0 + 4302849808 (note the 0x0 address) 0x0000000100055408 dict_traverse + 168 0x0000000100107f77 collect + 407 0x00000001001089f4 PyGC_Collect + 52 0x00000001000ef503 Py_Finalize + 259 0x00000001000eefca handle_system_exit + 250 0x00000001000ef235 PyErr_PrintEx + 469 0x00000001000efebb PyRun_SimpleFileExFlags + 299 0x00000001001071dd Py_Main + 3101 Reproducing it on a CI VM was very difficult, requring dubious manipulation of PATH, PYTHONPATH and LD_LIBRARY_PATH environment variables. In the end the issue was diagnosed to be heap corruption, and thus the difficulty in reproducing it. The testParentFromCpp test in objecttype_test.py calls the destroyCppParent method to delete its parent. Because the deletion of the parent invokes the destructor ~ObjectType(), that in turn deletes the child. This lead to head corruption, because the child "o" by destroying its parent, destroys itself, and once the "delete m_parent" is done, the next "m_parent = 0" would write to invalid (freed) memory. In a release build of the Python interpreter, this ends up in accessing the freed memory in the GC collection phase (but under a debugger this crashed in several other random places). The fix is to delete the "m_parent = 0;" statement, so that nothing is written to freed memory. Change-Id: I2d7a41b99a3255ebb300e6157b3dd0d78eb27a54 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Fix typo in libicu detectionAlexandru Croitor2018-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When libicu libraries are present in the qt lib dir, this caused trying to copy the files into the same folder where they are located which will obviously fail. Change-Id: Ibcabec2e44dac70e0c3c56e52ff0c8ac7749dbc0 Reviewed-by: Fredrik Averpil <fredrik@averpil.com> Reviewed-by: Simo Fält <simo.falt@qt.io>
* | | shiboken/docgenerator: Pad table rows up to header column countFriedemann Kleint2018-02-201-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a warning about a malformed table (qcursor.cpp) whose last row has too few columns. Task-number: PYSIDE-363 Change-Id: I5eec88226e48064ee54e3abe1247d9dc06dc1d82 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | shiboken/docgenerator: Refactor code using split()Friedemann Kleint2018-02-201-48/+38
|/ / | | | | | | | | | | | | | | Use splitRef() where applicable or rewrite. Task-number: PYSIDE-363 Change-Id: I08dcafbba82327f6ff4c02f582341083b4b48755 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | shiboken/docgenerator: Remove helper createRepeatedChar()Friedemann Kleint2018-02-201-10/+23
| | | | | | | | | | | | | | | | | | | | Add a streamable Pad class for these purposes or use the corresponding QString constructor. Task-number: PYSIDE-363 Change-Id: I7e58ae19d2b0f2e1e14c0a235a5ab311350174c2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Doc: Adapt QML basics tutorial for Qt Quick 2Venugopal Shivashankar2018-02-198-58/+57
| | | | | | | | | | | | | | | | | | | | - Update the helloworld example to use Qt Quick 2 import - Use second person style consistently in the tutorial set Task-number: PYSIDE-363 Change-Id: Ia2b6636e850433bd69e5d6b4fb36faa1cb7b0edb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>