aboutsummaryrefslogtreecommitdiffstats
path: root/sources
Commit message (Collapse)AuthorAgeFilesLines
* Prepare Limited API for Python 3.7Christian Tismer2018-06-263-94/+132
| | | | | | | | | | | | | | | PySide has successfully been tested with the Python 3.7 branch. There will be no change in the areas that are important for us. It is then safe to bump the supported version and the limited API version checks to fully include Python 3.7. The macro errors in the limited API was fixed by a pull request, but it was too late to get it into 3.7rc1. The error workaround was therefore extracted into pep384_issue33738.cpp and will be deactivated later. Change-Id: Iec3f277b02cac03a5cf44cbcf955ddc690c112e5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* existence_test.py: Make multi signature mismatch message more verboseFriedemann Kleint2018-06-261-2/+12
| | | | | | | | | It now looks like: multi-signature count mismatch for 'QOpenGLShaderProgram.setAttributeArray'. Actual 10 [ (int,PySide2.QtGui.QVector2D,int) (int,PySide2.QtGui.QVector3D,int) (int,PySide2.QtGui.QVector4D,int) (int,float,int,int) (int,int,int,int,int) (str,PySide2.QtGui.QVector2D,int) (str,PySide2.QtGui.QVector3D,int) (str,PySide2.QtGui.QVector4D,int) (str,float,int,int) (str,int,int,int,int)] vs. expected 4 [ (int,float,int,int) (int,int,int,int,int) (str,float,int,int) (str,int,int,int,int)]') Change-Id: I6c99e1fceeeb1647c8b3b291564190b9a2c0dd32 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix index() method of QAbstractItemModel-derived classesFriedemann Kleint2018-06-252-2/+14
| | | | | | | | | Prepend virtual methods when creating function groups so that overriding method the most-derived class is seen first. Task-number: PYSIDE-570 Change-Id: I791e3da09783c4c31ac293060aed8bb2bc8472d5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Doc: Fix typos and minor editsVenugopal Shivashankar2018-06-252-4/+4
| | | | | | | | In addition, scaled down the app screenshot. Change-Id: I9edf9bf6dc3c2f4e81097feaccaa266498776a6f Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* shiboken: Search for Clang builtin-includes at runtimeFriedemann Kleint2018-06-233-56/+82
| | | | | | | | | | Replace the search executed at build time by CMake by a run time search in shiboken since the location at build time typically won't match any more for the deployment case. Task-number: PYSIDE-693 Change-Id: Ib15fbba5d8c3fecf30aaae7195b88a648a7ed0fe Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Add command line options for system include pathsFriedemann Kleint2018-06-223-40/+59
| | | | | | | | | Refactor class HeaderPath to contain an enumeration for the type instead of the boolean framework flag and add handling. Task-number: PYSIDE-693 Change-Id: I60a62b831ddd5ce7519a066135854ff723db2fc6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Add error handling to added functionsFriedemann Kleint2018-06-221-2/+17
| | | | | | | Add some handling in case an argument type cannot be parsed. Change-Id: Ib901d023ed60f74fe82a06d8c08fd704f1350a7a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Improve error message about missing function for modificationFriedemann Kleint2018-06-223-7/+20
| | | | | | | | | The signature is passed through TypeDatabase::normalizedSignature() which calls QMetaObject::normalizedSignature(). Keep the original signature and output it in the error message. Change-Id: Ibd1ddd0dee17d828710caf4bf6d674c35776b4c2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Add the missing snippet filesVenugopal Shivashankar2018-06-2213-0/+689
| | | | | Change-Id: I83b66d2aa7a9e607d458f22b2ef6fc25e4abe944 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QtQml/bug_814.pyCristian Maureira-Fredes2018-06-221-1/+1
| | | | | | | | | | Since roleNames() expects a QByteArray we should pass the roleName as bytes, not a Python string. Task-number: PYSIDE-722 Change-Id: I67bf78503cd1e6acf43aab3531bf3b184e9a9159 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken/doc generator: Search snippets with to suffix "py" firstFriedemann Kleint2018-06-221-1/+7
| | | | | | | | | Replace .cpp by .py and try to find the snippet. Fall back to .cpp. Task-number: PYSIDE-363 Change-Id: I82b23df9894e626c97b44dc5a841f5fa70ae1d57 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Allow building just QtCore bindingsAlexandru Croitor2018-06-222-1/+18
| | | | | | | | | | | | | | | | | | | This change introduces tracking of modules for which bindings will not be built. This allows us to add conditions on disabled modules, and thus disable certain tests. Thus we disable pysidetest test when its dependencies are not met. Due to this, we can now builtd bindings only for QtCore, allowing faster development iteration when touching only QtCore. Note that this only affects which module bindings will be created. Shiboken itself still requires QtCore, QtXml and QtXmlPatterns, as does pyside2-rcc. Change-Id: I75084a1741e7f4c3594e43af0fd9668a0e969c56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QVariant conversions when using PySequencesCristian Maureira-Fredes2018-06-212-11/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we transform QVariant arguments to internal types, starting from the Python ones, to others related to shiboken. After checking if the current object is a PyDict we proceed to check if it's a PySequence. PySequence is the complementary 'sequence-like' type of PyDict, and allows finite and infinite sequences, like lists or generators. The problem is that when one implements a class which includes the __getitem__ method, Python already thinks that it correspond to a PySequence, then we try to get the elements to transform into a QList<QVariant> but it fails at the first attempt. The solution was to not assume that all PySequences have finite length (or a length), and also to have a fallback case similarly to the PyDict treatment, wrapping the PyObject as a QVariant. Task-number: PYSIDE-641 Change-Id: I3b755f47ed076147024de38e5e0a86932d981f88 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Remove QT_LOGGING_RULES to fix QLibraryPath pathsCristian Maureira-Fredes2018-06-212-19/+0
| | | | | | | | | | | | | QT_LOGGING_RULES was internally overwriting the PySide2 QLibraryPath configuration, so all the paths were incorrect. Please follow PYSIDE-717 for a discussion on an alternative to have a proper solution. Task-number: PYSIDE-694 Change-Id: I551d7876a416ac31fcff70d843a28c98dfa5ed08 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Bump 5.11 branch version to 5.11.1a1Alexandru Croitor2018-06-132-6/+6
| | | | | | | | | This is to start generating snapshot wheels again, so that they would not override the v5.11.0 release wheels. Change-Id: I1b4c5211471ec760cad14d56aa3ee2102fea5322 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* Be more descriptive about version parts in pyside_version.pyAlexandru Croitor2018-06-112-4/+16
| | | | | | | | | And in shiboken_version.py. Change-Id: I52132c555ee9a911c2232f5eeabfa0d7960990bc Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Bump version to 5.11.0, for first TP releaseAlexandru Croitor2018-06-112-4/+4
| | | | | | Change-Id: Ie3eefe170294a8eafc91b434650dc483aadf02c0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix failing versioninfo_test when the version is not a pre-release oneAlexandru Croitor2018-06-083-3/+3
| | | | | | | | | | | | The test used to fail when pre-release version parts are empty (aka there is no "beta1" or "alpha2"). Make sure to always include at least an empty string when those version parts are not set, and adjust the test accordintly to check for a string. Change-Id: Ia30bb99de7f122456e132516346df4e3c0a1fa94 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Merge branch '5.9' into 5.11Alexandru Croitor2018-06-087-5/+156
|\ | | | | | | Change-Id: I7e55b4f27f77e2333b9e0f4cddc8de4b89b6043b
| * Doc: Fix typo in the code snippet for QQuickImageProvider5.9Venugopal Shivashankar2018-06-081-1/+1
| | | | | | | | | | Change-Id: I2af23226c93706c0c18f07ce4cf59e362b170997 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Add bindings for QtWebEngine (aka Quick)Alexandru Croitor2018-06-075-2/+153
| | | | | | | | | | | | | | | | | | | | | | There is only one method we really need, QtWebEngine::initialize() which is used for all Qt Quick based WebEngine applications. Otherwise you get a warning upon startup of a Qt Quick WebEngine application, and this might lead to undefined behavior. Task-number: PYSIDE-688 Change-Id: I7de2bbb58c49cb2a41b0e13ffc9de6a3161f3960 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Fix openssl lib path not being properly set on WindowsAlexandru Croitor2018-06-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This lead to failure of importing PySide2, because on Windows __init__.py tried to load QtNetwork and that failed because it could't find the ssl libraries. This is a regression and amend of 87e85c460 . Task-number: PYSIDE-687 Change-Id: I298153b054baf5fa85b1831d88a99480c5c0a249 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Update pyside2-tools submodule SHA1Alexandru Croitor2018-06-071-0/+0
| | | | | | | | | | | | | | Includes latest changes regarding attribution. Change-Id: If4e7a21fde6bb2941cdfaae4f6fb1a7d91a64c8f Reviewed-by: Simo Fält <simo.falt@qt.io>
* | Merge branch '5.9' into 5.11Alexandru Croitor2018-06-0758-388/+558
|\| | | | | | | Change-Id: I2de0fe8456fca242c56ea28520126f9ebbf540d8
| * Fix addImageProvider ownership transferCristian Maureira-Fredes2018-06-071-0/+5
| | | | | | | | | | | | | | The QQmlEngine takes ownership of the QQmlImageProviderBase. Change-Id: Ia01e4151054623c96c24a2d07009d876eaacaa55 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Undo renaming of Pep384_InitChristian Tismer2018-06-063-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The functions which were named Pep384XXX were renamed in order to get "PepType" as a function-like macro that suggests the similarity between "PyTypeObject" and "PepTypeObject". But the renaming of the module initialization function was not intended. Change-Id: I555633ccbd8e1354c27f2c1957c81905be54d86b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Fix glitch in voidptr.cpp after the PEP 384 commitChristian Tismer2018-06-053-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By lots of editing, somehow an expression in voidptr.cpp became incomplete. We should improve the current test to be certain that the VoidPtr is working. This problem can be avoided by not doing many type casts at once. Doing the same in two steps is much safer because a forgotten call would give a compile time error. Task-number: PYSIDE-560 Change-Id: Ibb24a27f439cbda490723131f34f93978725420f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Doc: Include webengine module docsVenugopal Shivashankar2018-06-053-0/+10
| | | | | | | | | | Change-Id: I9ea0bed7709265c89e1bf38624024e61ee07adc7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Doc: Update the html_title and download.qt.io URLVenugopal Shivashankar2018-06-012-2/+2
| | | | | | | | | | Change-Id: I9b923d6fefbfae4efcf63f7459cf1ee89fb08f19 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Doc: Document the tabbed browser demoVenugopal Shivashankar2018-06-014-4/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | - Added docstrings to the examples sources to autogenerate the docs for the different parts. - Updated the conf.py.in to include sphinx.ext.viewcode to generate html for every source file of the example. Change-Id: I668c55070556ca49d12d38c8ec83f09313bffc36 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * shiboken: Streamline the type parsing codeFriedemann Kleint2018-06-016-186/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace struct TypeParser::Info by TypeInfo and remove TypeParser::Info. Move method TypeParser::Info::instantiationName() to TypeInfo for this purpose. Change TypeParser::parse() to return TypeInfo. Task-number: QTBUG-672 Change-Id: I123d5bf378ad146867b571e47e31ae08a92b2504 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * shiboken/ClangBuilder: Fix nested qualified namesFriedemann Kleint2018-06-011-1/+22
| | | | | | | | | | | | | | | | | | | | | | The qualified name was obtained by splitting by "::", which would result in "std::list<std::string>" -> ("std", "list<std", string>"). Fix by splitting up to first '<' or '(' only. Task-number: PYSIDE-672 Change-Id: I9d790535e877da251a5b6c352dc550e4077877bd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Improve the QByteArray implementationBoxiang Sun2018-06-0134-192/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The available constructors for QByteArray are now: bytes, bytearray, and QByteArray, unicode is not accepted anymore. Also the concatenation is now possible between QByteArrays. Even though is not possible to initialize a QByteArray with an unicode, we include the possibility to compare it with one (Compatibility with PyQt). The __repr__ and __str__ are now properly working. There seemed to be a confusion regarding data types between Shiboken, Python2 and Python3 related to bytes, so now the structure is based on the flag SBK_BYTES_NAME, which is define as "bytes" for Python3 and "str" for Python2. Many tests were modified to properly handle string, using the `py3kcompat` module. Task-number: PYSIDE-232 Change-Id: I8b671f367c60a0870c72dcbe5662106b3225037d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Improve sbkstring::toCString to support unicodeBoxiang Sun2018-06-012-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | If `unicode` is used in Python 2, shiboken cannot properly translate it to `const char *`. sbkstring did not supported a proper conversion of unicode types in Python2, and this change includes it. Task-number: PYSIDE-100 Change-Id: I3a70d935ad61b0e567e620c62754800370270a6b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Update pyside2-tools submoduleCristian Maureira-Fredes2018-06-011-0/+0
| | | | | | | | | | Change-Id: I15f0f823b4fe45f544c0800e1bd3f205ccf7efaf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.11Friedemann Kleint2018-06-0183-1755/+4676
|\| | | | | | | Change-Id: I31a0ff26bc02e6cc2ec2a816c16d170fc334f800
| * Fix test to assert only if english is the localeCristian Maureira-Fredes2018-06-011-4/+4
| | | | | | | | | | | | Change-Id: I3188c33414d283478a6ff6d7d354ce9231b4f106 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Add missing API of QtWebEngineWidgetsDavid Rosca2018-06-012-10/+21
| | | | | | | | | | | | Change-Id: Ifafae9a5eac1844bf9057bc5e1f912e287499aa7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Don't pass -DFORCE_LIMITED_API=yes from setup.py unless asked forAlexandru Croitor2018-05-312-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was weird seeing "-DFORCE_LIMITED_API=yes" being passed from setup.py to CMake when "--limited-api" is not included on the command line, and then seeing "-DFORCE_LIMITED_API=yes" with Python 2 builds. It gives the impression that maybe it could work with Python 2. Instead, don't pass "FORCE_LIMITED_API=yes" from setup.py by default (but still pass it if it's present on the command line), and instead default to "yes" within the CMake project themselves. In the end nothing changes, limited API builds will still be default, but at least it's not as confusing to see the "-DFORCE_LIMITED_API=yes" lines for Python 2 builds in the CI log. Change-Id: I08c863394dd148d88bec324a6cab35459d75303a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Fix module names to contain correct limited api suffixAlexandru Croitor2018-05-312-89/+107
| | | | | | | | | | | | | | | | | | | | | | This includes .abi3.so on Linux and macOS, and .pyd on Windows. Otherwise if you build with Python 3.6, and try to install the package on Python 3.5, none of the modules would be found on import. Change-Id: I56639da6319cfa06e23ae793d66099813074adf4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * PEP 384-squash: Implement PEP 384Christian Tismer2018-05-3076-1596/+4541
| | | | | | | | | | | | | | | | | | | | This is the condensed checkin of 18 commits which created the implementation of PEP 384. Task-number: PYSIDE-560 Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * shiboken: Streamline the type parsing codeFriedemann Kleint2018-05-304-98/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove bool *ok-parameter from AbstractMetaBuilderPrivate::translateType() It was only used to handle the special case of void return values of functions where translateType() returned nullptr/ok = true. Add a check TypeInfo::isVoid for this purpose and move this handling to traverseFunction instead. For all other cases, translateType() returning nullptr means failure. - Remove the code triggered by the bool resolveScope parameter of AbstractMetaBuilderPrivate::translateType(). It has been observed to not find any matches, likely due to the types being fully qualified by Clang. - Remove function AbstractMetaBuilderPrivate::decideUsagePattern() which was a one-liner calling AbstractMetaType::decideUsagePattern() Task-number: PYSIDE-672 Change-Id: I0336896917cb914d4d622eefa0a21e6e319efa0f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Fix qtattributionsscannertorst.pyFriedemann Kleint2018-05-291-37/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tool was originally written to handle a license embedded in a Python file. This has changed, the license now exists as a text file. Rewrite the tool to concatenate the output piece-wise instead of using fixed formats to be able to cope with missing URLs and versions. Add the copyrights, which were previously missing. Task-number: PSYIDE-363 Change-Id: I5ec0bd7a4b81e9f794f56f6b2b09062c331936ae Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.11Friedemann Kleint2018-05-293-3/+13
|\| | | | | | | Change-Id: I4b6ef2bcc91c46b3084f9797c1bbfaddc4367941
| * Documentation: Fix some oversights in the index pageFriedemann Kleint2018-05-281-2/+2
| | | | | | | | | | | | Task-number: PYSIDE-363 Change-Id: Ib0bc82733932eb96f9d2ca42649d28bc600d8f60 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Documentation: Fix Qt11ExtrasFriedemann Kleint2018-05-281-1/+6
| | | | | | | | | | | | | | | | | | | | Work around the non-standard header naming of the module in the documentation generation (see also file sources/pyside2/PySide2/QtX11Extras/QtX11Extras_global.post.h.in). Task-number: PYSIDE-363 Change-Id: I3ff8bb666513a13fde4d13693fd06bdd7866e050 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Documentation: Add QtMultimediaWidgetsFriedemann Kleint2018-05-282-0/+5
| | | | | | | | | | | | | | | | | | They share the qdoc.conf file with QtMultimedia, which needs to be special-cased, similar to QQuickWidgets. Task-number: PYSIDE-363 Change-Id: I5abade0a715ff3245be2322eae42e7c93f643fc9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.11Friedemann Kleint2018-05-2613-127/+329
|\| | | | | | | Change-Id: I0c5b60263ed642a9b6f6b5d6a1492a11f278bfd5
| * Add QtScxml to the documentationFriedemann Kleint2018-05-252-1/+5
| | | | | | | | | | | | | | | | Complements 9d10897929350417f4c7b2dcf06966ff7c67c5a6. Task-number: PYSIDE-487 Change-Id: I4a01c986535c0d7ba8362760c1b8e89a2f8e9936 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Remove left-over documentation filesFriedemann Kleint2018-05-251-120/+0
| | | | | | | | | | | | | | - _templates/index.html Change-Id: Idcde052a1a77e2ade1de712db79da95d5ed6c02c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>