aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-07-051-1/+0
|\ | | | | | | Change-Id: I71a1165ef9dea0eb084b271a0362c3f1e12829e3
| * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-07-051-1/+0
| |\ | | | | | | | | | Change-Id: I3b3285a4e0315aea8da0426f179515866f53a7f8
| | * PySide2/QtCore: Remove duplicated type entry for "bool"Friedemann Kleint2019-07-041-1/+0
| | | | | | | | | | | | | | | | | | | | | Another entry with converters exists a few lines below. Change-Id: Id1de3835e42869a55e0bf865aa992f38748f2e88 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-07-0325-330/+330
|\| | | | | | | | | | | Change-Id: I389468b76913ac3c8113ab89833c756a7a72e54f
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-07-022-6/+1
| |\| | | | | | | | | | Change-Id: I79d2166f18d8ed941c6c34fcbc7b185c2da02f0c
| | * Leave QVariantMap as a name, not a typeCristian Maureira-Fredes2019-07-022-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem happened on the QtLocation module, when the QVariantMap argument was being used in several functions, and this type was declared as a primitive-type in QtCore. An approach to change the type to a container-type failed, because since QVariantMap is a typedef, is was already registered as a name associated to the definition QMap<QString, QVariant>. The solution was to register the name at the beginning of the module (like QVariantList), and remove the type declaration, leaving it only as a name. Previously, the wrongly generated code looked like this: Shiboken::Conversions::PrimitiveTypeConverter<QVariantList>() but with this patch, it looks like: SbkPySide2_QtLocationTypeConverters[SBK_QTLOCATION_QMAP_QSTRING_QVARIANT_IDX] which is the proper name established by the code on glue/qtcore.cpp: Shiboken::Conversions::registerConverterName(SbkPySide2_QtCoreTypeConverters[SBK_QTCORE_QMAP_QSTRING_QVARIANT_IDX], "QVariantMap"); Change-Id: Id172cf5b1e3ac784bc9497359279e81fcba1d8ec Fixes: PYSIDE-1028 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.12' into 5.13Friedemann Kleint2019-06-266-17/+17
| |\| | | | | | | | | | Change-Id: I5bfa45782938d3bf43e16164f1ecd69f53bfcf8e
| | * Cleanup pointer and trailing whitespace (omissions)Christian Tismer2019-06-256-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "Cleanup pointer whitespace" patch was augmented by some C++11 changes. Unfortunately, this was done in the same commit, and so some old whitespace that was removed could re-appear invisibly, since it was in the original version. This fix tries to remove all trailing whitespace and also adds a few " *" corrections that were lost. The "type *" entries in XML files were changed back to "type*". Change-Id: Ic5c945ad64a47455fb15eebdf184b126af5ecd1d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-06-2419-309/+314
| |\| | | | | | | | | | Change-Id: Ia09beccd944e1276caa6aecbeb248e69917b7115
| | * Cleanup pointer whitespace everywhereChristian Tismer2019-06-2419-309/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Among other files to fix, basewrapper.(cpp|h) was full of uncommon pointer whitespace. After fixing that, I could not resist and fixed also libshiboken, generators, and after acceptance also PySide. Most of the time, this regex worked fine (\w\w+)([*&]+)[ ]*(?![&*]*[/=]) replaced with \1 \2 but everything was checked by hand. I did not touch the shiboken tests which are quite hairy. It turned out that inserting a space between a variable and asterisk causes a crash of shiboken, if the same line contains "CONVERTTOCPP". This was temporarily fixed by adding another space after it. Example.. sources/pyside2/PySide2/glue/qtcore.cpp line 977 QByteArray * cppSelf = %CONVERTTOCPP[QByteArray *](obj); //XXX /|\ omitting this space crashes shiboken! cppgenerator.cpp was special, since it was modified to _generate_ correct pointer whitespace. This caused a few testcases to fail, which had to be adjusted, again. This was difficult since some internal names must end on "*" and generated code normally not. Removing the last errors involved binary search on path sets... Apply C++ 11 fixits to the changed code, where applicable. Done-with: Friedemann.Kleint@qt.io Task-number: PYSIDE-1037 Change-Id: I4ac070f52c5efb296c05d581c9d46e6f397a6c81 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-06-191-7/+6
|\| | | | | | | | | | | Change-Id: I5aa8f69849db51c61d058b7f0197b883b7d2d4e2
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-06-191-7/+6
| |\| | | | | | | | | | Change-Id: I42955abfeb1fe8b7c6443a9b334154984286b9cc
| | * Support the qApp macro in "scriptable application"Christian Tismer2019-06-171-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renamed from "Fix scriptable application to support the qApp macro" because qApp was improved instead of scriptable application. The qApp macro needed some extra effort to support the qApp "macro" which is only defined in the Python wrappers. I took some generated code, created a QApplication instance in Python and used then reduced generated code to get at the object and adjust the refcount. This solution was then rejected, because I can do better, and in fact, scriptable application now has a correct qApp macro too, without any change to scriptable application. The central idea was to look into the module init function at import time and to see if a Q*Application already exists. I was not aware of that import. Many thanks for the rejection! :-) Update.. -------- After many attempts to make the qApp variable correctly behave like always, I recognized that pre-existing Q*Application instances have no wrappers or constructors at all! With that, it is not possible to create a sophisticated qApp macro as a singleton variable in the desired way. Fortunately, this is also not necessary, because a C++ Q*Application cannot be deleted from Python, and there is no point in supporting more that a simple variable. So in case of a pre-existing instance, the qApp variable now gets redirected to that instance. A small test was added to application_test.py that is triggered by an import. A weird effect when "qApp" was typed interactively before calling "QApplication()" was fixed, too. Change-Id: Ic69dd6a21c964838a90f63e316d299b62a54d612 Fixes: PYSIDE-571 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * Fix negative refcount on QSocketNotifierChristian Tismer2019-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 43451e3bc17467593df64cb73ce8c0bf9e60045f from 2018-05-09 introduced a refcount bug that was not caught because we do not build with debug Python. This also revealed an omission in the patch "PySide: Allow any existing attribute in the constructor" when debug Python is used. Change-Id: Idbcbbc87f0a83bb696d03e05af0cf616b21f7335 Fixes: PYSIDE-1027 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-06-072-0/+18
|\| | | | | | | | | | | Change-Id: I920a77a3a8c79bba0fd7e5e4f990facf4081ca08
| * | Add some missing Qt3D Animations classesMike Krus2019-06-052-0/+18
| | | | | | | | | | | | | | | Change-Id: Id555f32c9ead510f70c1f9ce9c90f8131963d23c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-05-243-152/+65
|\| | | | | | | | | | | Change-Id: I38964a8efc7905afd879cd2a96e75149d5942c8a
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-05-243-152/+65
| |\| | | | | | | | | | Change-Id: I334119b879bd53f422d3916cc8774376997384e1
| | * shiboken: Make it possible to extend namespacesFriedemann Kleint2019-05-222-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt has some modules, where functions and classes are added to namespaces of other modules. For example, QtGui adds the free functions mightBeRichText() and convertFromPlainText() to the "Qt" namespace and Qt3DQuick adds a namespace "Quick" to the namespace "Qt3DCore" started in Qt3DCore. Shiboken was unable to handle this since the name of the index constant was derived from the namespace name and would thus clash. Also, all code model items from the base module would be re-generated into the extended namespace. To fix this: - No longer join namespace code model items in clang builder. - Search for pre-existing namespaces in traverseNamespace() before creating a new one, continuing populating it. - Add a "files" attribute taking a regular expression to match header names to the namespace type entry, making it possible to restrict code model items by files when extending namespaces (as otherwise, all base items are again added). - Add "extends" attribute specifying the package name of the namespace to extend, which will be used as base type in CPython. - Disambiguate the SBK indexes of namespaces and the init_ functions by adding the module name. Change-Id: Ib552e878911942fa4d52d2bb0c6695e5b2c4c341 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * generate_pyi: Simplify, Enhance and Get Rid Of Any Import ProblemsChristian Tismer2019-05-191-152/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generate_pyi.py script always had the problem that it was not easy to distinguish different kinds of ImportError. When ImportError was raised during a build, we assumed it was just a not-yet built module and ignored it. When patch 97df448e "Modernize cmake build" was checked in on 2019-02-07, a real import error was introduced on Windows. It was not recognized until 2019-05-13 that Windows had stopped generating .pyi files. It was discovered by working on an enhancement to dependency checks that erroneously looked for "libshiboken*" on windows. This should have raised an error in "generate_pyi.py" but did not, because the generation was skipped due to the real ImportError. General Redesign ---------------- It turned out that all the former difficulties with importing modules could be completely avoided, by explicitly using the inherent dependencies. The script was drastically simplified by using the module name as an argument. It was not clear in the first place that this would work, but actually we recognized that all modules a script wants to import are already built when CMake starts the .pyi generation. The only visible quirk is the pair QtMultimedia/QtMultimediaWidgets where both modules must be compiled before generating. (maybe that is an error in our XML files, or a Qt "feature"?) Enhancements ------------ The generate_pyi script is now completely deterministic, because all imports are enforced to work. There is no more polling for translated modules necessary. Everything is generated after a module was linked, The "--skip" semantic was first enhanced much further. In the end it was recognized that we don't need the parameter any longer, because with the determinism we are never computing a pyi file more than once. The parameter was then completely removed. The "--check" option was added for Python 3. It takes some time and is only automatically active in a COIN build. Task-number: PYSIDE-735 Change-Id: I3cc58f6cad80d8208e17f62d472fd48aa6aeebd6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-05-0831-21/+1702
|\| | | | | | | | | | | Change-Id: I261e242b553c0533b88063be3309f49a1aa0f612
| * | PySide2/QtOpenGLFunctions: Add modifications for newly added functions in 5.13Friedemann Kleint2019-05-072-0/+15
| | | | | | | | | | | | | | | Change-Id: I110198721586ba1a14929a195f149c09f26f7099 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * | PySide2/QtLocation: Remove temporary workaround for missing functionsFriedemann Kleint2019-05-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove modifications, fixing: (location) signature 'loaderError()const' for function modification in 'QGeoServiceProvider' not found. (location) signature 'loaderErrorString()const' for function modification in 'QGeoServiceProvider' not found. Change-Id: I76874b9aad130bb678e7e181e5cd62317d6a49dc Reviewed-by: Christian Tismer <tismer@stackless.com>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-05-0630-18/+1687
| |\| | | | | | | | | | Change-Id: Ia87a2e46bb051f1cccf3b7ba988aeb5eb32c0f0e
| | * Add PySide2: Add OpenGL version functions as separate moduleFriedemann Kleint2019-05-0229-10/+1645
| | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenGL version functions produce a lot of library code, so, add them as a separate module. Task-number: PYSIDE-955 Change-Id: I44737f4741f0a81f46a192961173e154ae66698e Reviewed-by: Christian Tismer <tismer@stackless.com>
| | * Avoid too much stickiness when using --reuse-buildChristian Tismer2019-04-261-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had some unwanted cache effects and needed to manually remove certain files before building. Otherwise it could happen that a build pretended to be ok, although there was a bug that prevented generation of the ".pyi" files. Further investigation showed: Using option "--reuse-build" with "no" and then with "yes" creates errors in the signature module. This makes "reuse-build" useless in this case. We now add an "a" to "pyside3d_build" as "pside3da_build" if "--limited-api=yes" was given. (different proposals welcome.) That solved most of the stickiness problems. A left-over lock directory is removed now, since it would prevent re-computation of the .pyi files. This is implemented by a recursive call to the script, where the subprocess does the work and the main process checks if there was a crash and removes the lock. The "--skip" parameter of generate_pyi.py was refined: When set, it is checked if the time stamp of all imported modules is less than the ".pyi" file time stamp. Only then the generation is skipped. By editing any involved python file, the ".pyi" files will be regenerated. Task-number: PYSIDE-560 Change-Id: I1b1d8ffbc58db3d4b38bf65e3795efcad7e7870c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * Fix warnings about signatures 'setUniformValue(const char*,...)' not being foundFriedemann Kleint2019-04-261-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a regular expression with the types, fixing: qt.shiboken: (gui) signature 'setUniformValue(const char*,GLfloat)' (specified as 'setUniformValue(const char*, GLfloat)') for function modification in 'QOpenGLShaderProgram' not found. Possible candidates: ... setUniformValue(const char*,float,float,float,float) in QOpenGLShaderProgram setUniformValue(const char*,int) in QOpenGLShaderProgram setUniformValue(const char*,uint) in QOpenGLShaderProgram ... Amends 05ae61cba5f943eb58343b44f8d474bc88bf0ce4 Task-number: PYSIDE-989 Change-Id: Ib12ca0309dfa46cca87e8deb546378b185a56b66 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-04-2467-73/+98
|\| | | | | | | | | | | Change-Id: Ieb5a4ac5d5d33fe1e93e1d286f1b88d45f31db06
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-04-2467-73/+98
| |\| | | | | | | | | | Change-Id: I28805a29caa05e996b490ba46e27ddbc243cc074
| | * Add explicit methods for QOpenGLShaderProgramm.setUniformValue (i/f)Cristian Maureira-Fredes2019-04-242-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selecting which overload to use is in hands of the shader program code that defines the type, then it is better to explicitly call signatures that are overloaded using number types, specially for OpenGL. This change will help with PYSIDE-989, because it will allow to call `setUniformValue1f` without having the problem of using the generic `setUniformValue` that will end in calling the wrong method (the integer one). Since the primitive type conversion is a separate global issue, another task has been opened PYSIDE-1000. Task-number: PYSIDE-989 Change-Id: I77e5616e081e570bee880a1a403faf3cf6c55099 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Declare XML files to be in encoding UTF-8Friedemann Kleint2019-04-1864-64/+64
| | | | | | | | | | | | | | | | | | | | | | | | Some XML tools trip over the missing character set. Change-Id: Icbe1b2485325b70c4772b6a370a98fd529437a8a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * Make the PepType_AS_BUFFER definition completeChristian Tismer2019-04-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PepType_AS_BUFFER should also be defined for the non-Limited API version to avoid ugly #ifdef constructs. This patch augments the definition and simplifies qtcore.cpp . Change-Id: Iddfb39e8afaf992f4edf72d871eec1eaf85d5963 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Revert an unwanted debug change in generate_pyi.pyChristian Tismer2019-04-161-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the complications with embedding and PyInstaller, an error condition was temporarily left in the code. It is now removed. Change-Id: I9113081dbbcbc84534517c72308eb1d25fbf201c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * Add array modification for QGLShaderProgram::setAttributeArray(int,const ↵Friedemann Kleint2019-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | float *v,int,int) Change-Id: Ia44c94995bee2f095f1e90b614f9f1cdbc1dde3c Task-number: PYSIDE-988 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-03-269-630/+10
|\| | | | | | | | | | | Change-Id: I14560b2c2ca6d01414760fc6ecdef7054aedd1b9
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-03-259-630/+10
| |\| | | | | | | | | | Change-Id: I799b9e4784722de40e53922f7355ab801b924833
| | * Implement Embedding To Make Signatures Always AvailableChristian Tismer2019-03-202-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Situation.. PySide works fine with normal applications. But when installers are used to pack the application together, then the signature extension cannot be loaded. This is a problem that exists since the signature extension was written. But starting with PySide 5.12.1, the signature extension is very visible, because it is used to support the __doc__ attribute. There have beed successful attempts to solve the problem for PyInstaller and Py2App. But there are more packers available, and they all need a change both in PySide and in the packer. Solution.. To solve this problem once and for all, we embed the Python support files in the binary shiboken package. When the Python files are not normally accessible, they are unpacked from a ZIP file. Details.. - The embedded files shall only be used when the normal files are not available, - The signature extension should no longer be lazily loaded. When the application starts, all files should be present. - We drop support for shiboken2.support.signature and use a single, independen folder 'shibokensupport' (proposal). This avoids problems with multiple existence of the shiboken2 folder. PySide2.support.signature remains the official interface, but it's only an alias when PySide2 exists. - The embedding is used when the normal files cannot be loaded for some reason. It can be enforced by a sys variable "pyside_uses_embedding". - Testcase is included. - Tested with PyInstaller on macOS Fixes: PYSIDE-932 Fixes: PYSIDE-942 Change-Id: Iaa62dc0623503a2e0943eedd10d2b2484c65cc2d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Simplify Python Imports For EmbeddingChristian Tismer2019-03-209-634/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the project split, shiboken exposed its own modules, and the overall structure with shiboken2.support.signature and PySide2.support.signature was already quite complicated. When introducing embedding, it is necessary to have some support folder that gets unpacked from a zipfile. That means, the shiboken2 root directory would be in the zip file in the embedding case. This does not only increase the complexity, it further means that we must make shiboken2.so available in the shiboken2 containing zipfile! In order to avoid that, we stop the dependency from the two support directories and use shibokensupport, instead. The simplification of the loader and other modules is also significant. Task-number: PYSIDE-510 Change-Id: Ic735a8d36f10f03698378f2ac9685a5955e40b0c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-03-2112-21/+92
|\| | | | | | | | | | | Change-Id: I6c2deacef427bccb9c51608f3e10922b9b16353c
| * | Add bindings for 5.13Friedemann Kleint2019-03-208-2/+45
| | | | | | | | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I789e0f13062c254fe1766eb10fd68f3bb3373594 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-03-194-19/+47
| |\| | | | | | | | | | Change-Id: I137dc1d4b7dc73ee8ad4cff2eb031e2aaead2644
| | * Add toBytes() and BufferProtocolCristian Maureira-Fredes2019-03-151-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VoidPtr: Add toBytes() method that return a char* representation of the void* pointer. QByteArray: The current implementation only provided the Buffer Protocol for Python2, this patch includes the getbuffer implementation for Python3. Having a BufferProtocol implementation for Python3 allows the initialization of VoidPtr to get access to the internal content, so one can go back and forward with the representation of it: ba = QByteArray(b"Hello World") vp = VoidPtr(ba, ba.size()) vp.toBytes() # b"Hello World" The BufferProtocol was also changed for Python2 including the new buffer protocol (Py_TPFLAGS_HAVE_NEWBUFFER) function `bf_getbuffer`. A test case was included. Fixes: PYSIDE-934 Change-Id: I8936966da91b2dcc879c582cfc35e6a35f7a60b6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * Add ownership to QGraphicsItemGroup.addToGroupCristian Maureira-Fredes2019-03-051-1/+7
| | | | | | | | | | | | | | | | | | | | | Change-Id: I0c3741133072762443d80663be02a70abf9cc9ef Fixes: PYSIDE-95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| | * Update link to shiboken's words of advise pageCristian Maureira-Fredes2019-03-041-1/+1
| | | | | | | | | | | | | | | Change-Id: Ie2c1c7b9feefb56a9e987f71806a2ce400578fe8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * Amend The Python 3.5 FixChristian Tismer2019-03-011-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the bug found in PYSIDE-928, the contextlib problem of Python 3.5 also vanished. What remains is the crash on shutdown which is caused by module 'testbinding'. Task-number: PYSIDE-953 Change-Id: I07f18fa468fdb0758ee4e4b7663c3a42bec42822 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | PySide2: Fix Qt3D events' modifier enumerations for 5.14Friedemann Kleint2019-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The enumerations were changed in qt3d/a356d132b2a426ecd7edb7858245266433b3e855 to be proper flags. Annotate accordingly. Change-Id: I38b07d85a4edcb1951a9f3f8f88eaea9086d5d11 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | PySide2/QtGui: Temporarily work around link errorFriedemann Kleint2019-03-201-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | Remove a function introduced by qtbase/1bfabe35d8178c93e66acef21c01e08980f9ed0d whose implementation is missing. This will be fixed by qtbase/1bfabe35d8178c93e66acef21c01e08980f9ed0d. TODO sth else wrong with Q3DInput::QMouseEvent::Modifiers Change-Id: I117915053c6be7aa2c7d0cb1db08cab1edd89108 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devFriedemann Kleint2019-03-018-3/+117
|\| | | | | | | Change-Id: I0f3c2de6195b863dc60ecbb988e4e14182e3ad03
| * Prevent Python 3.5 From Crashing The BuildChristian Tismer2019-02-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 3.5 has a bug that crashes the build. See the description in the issue tracker. The cure is to use a more recent contextlib.py and to avoid a PySide cleanup function that creates the crash. The problem is not solved for Python 3.5, and it is not clear if the testbinding module has a hidden bug, too. But this fix seems to be good enough for the moment. We should decide if we are going to fix Python 3.5 or abandon it altogether. Change-Id: Iacf2237de1f34d2b3cd1d68f1fb5833bdca3fdc2 Fixes: PYSIDE-953 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Add setPageSize new signature to QPageSizeCristian Maureira-Fredes2019-02-262-0/+49
| | | | | | | | | | | | | | | | | | | | | | The generated code only takes an enum from the meta class (QPagedPaintDevice) as valid argument of the function `setPageSize` (QPagedPaintDevice::PageSize), but it should also accept a QPageSize argument. Change-Id: Ia31a69a5e52e781844ce6a7e4ff6e5e95d17563d Fixes: PYSIDE-940 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>