aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2
Commit message (Collapse)AuthorAgeFilesLines
* Fix Python 3.8 problemsChristian Tismer2019-12-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | This patch fixes some refcounting problems with Python 3.8 . One incompatible change was announced in the what's new document, but actually there were two more problems which were not explicitly mentioned but took much time to sort out. The patch is compatible with the limited API changes (tested with debug build and API error disabled). It is also independent of the Python version which is full Limited API support. For more info, see the documentation mentioned below. The flag error is circumvented now! We either find a better solution or leave it as it is. For now this is ok. Fixes: PYSIDE-939 Change-Id: Iff4a9816857a6ebe86efd4b654d8921e4e464939 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix refcount issues with QSettings glue codeCristián Maureira-Fredes2019-11-281-4/+11
| | | | | | Task-number: PYSIDE-939 Change-Id: I5bda4e2025e31bf192bf0bf70c82aa626cd19714 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-11-281-0/+3
|\ | | | | | | Change-Id: I698090a9c9fdc995e00e39873aa35f8edda0f0b1
| * Remove QGraphicsItem::scroll from QtCharts5.13Mariana Meireles2019-11-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | Removing this method to avoid being inherit from QChart, so we don't have the problem of having two scroll methods with the same arguments and we don't call the wrong one. Change-Id: Ia98ae1fdea39bed4435869fae7e5d380a73e9d91 Fixes: PYSIDE-1101 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | shiboken: Store the unqualified entry name in TypeEntryFriedemann Kleint2019-11-251-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous change adding a parent pointer, this is working towards building the target lang name by walking up the hierarchy, prepending the names, making it possible to exclude namespaces. Pass the unqualified name from the XML parser and build the qualified name in the TypeEntry constructor. For this to work, a new ConstantValueTypeEntry is added replacing the abuse of EnumValueTypeEntry for nontype-template parameters. As a side effect, it is no longer possible to nest types by qualifying with "::" in XML: <object-type name="Class"/> <enum-type name="Class::Enum"/> This needs to be fixed in the type system files. [ChangeLog][shiboken] As a result of a code cleanup, it is no longer possible to nest types by by qualifying with "::" in the type system files. The elements need to be properly nested. Task-number: PYSIDE-990 Task-number: PYSIDE-1074 Change-Id: I8a2f93c40d59167b0ba205ef3ff3b325d242c3d3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | PySide2: Enable a build for Qt built with -no-feature-sslFriedemann Kleint2019-11-011-4/+4
| | | | | | | | | | | | | | | | | | Move QSslCertificate and QSslCertificateExtension out of the SSL branch since they are always present independently of -no-feature-ssl. Change-Id: I022d0f5e73b83f7a3c4774839e856734e17d0056 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Revert "PySide2: Fix Qt3D events' modifier enumerations for 5.14"Friedemann Kleint2019-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | The build was broken after qt3d/a356d132b2a426ecd7edb7858245266433b3e855 was reverted by qt3d/7f3bba6e8a4a3bdb36f40a636b76c02902c09d02. This reverts commit 38f0302cc99292c8d8cbadbf64918b723d2f7f8d. Change-Id: Ic7fd3c7894d4cf48d3c6fcc57e5a18333a1571f5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-10-313-14/+47
|\| | | | | | | Change-Id: I9f31a647fd9d4ad9c854a307f8b5df1be935354a
| * Fix booleans and empty list cases in QSettingsCristián Maureira-Fredes2019-10-281-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the fix for PYSIDE-1010 there were two things that were not properly understood: 1. A special case for booleans was required, 2. When a list was detected, the split was wrongly creating a list with a '0' instead of an empty one. Additonally, due to the wrong treatment we couldn't notice if the value 0 was None, the number zero, or even false, so this patch amends the previous implementation to properly treat these cases. New test cases were added. Change-Id: I41d5387bb835cfa96f94e5577e993a4b87b303f0 Fixes: PYSIDE-1130 Fixes: PYSIDE-820 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * Add inject-code for QVideoFrame::bits()VaL Doroshchuk2019-10-252-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Since QVideoFrame::bits() returns uchar* which is not covered by conversion functions, added the same replacement as was done for QImage::bits(). It should return a buffer object to satisfy Shiboken::Buffer::checkType(). Fixes: PYSIDE-849 Change-Id: I33bdb13f3b892f325ccf3b1ef4bef59744b60f2d Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * Release ownership in QAbstractVideoFilterWrapper::createFilterRunnableVaL Doroshchuk2019-10-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | QAbstractVideoFilter::createFilterRunnable() is supposed to be called only from VideoOutput QML element when paint event is received, where the QML element takes the ownership of returned QVideoFilterRunnable object. Need to release the ownership, so Python will not delete the underlying C++ object. Fixes: PYSIDE-785 Change-Id: I041d9a43cafaf42d638778ea70b8a115276805b1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Improve the NumPy Support by iterablesChristian Tismer2019-10-303-11/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Working example, by overriding cppgenerator: >>> from PySide2 import * >>> QtCore.QUrl.fromStringList(("asd", "def")) [PySide2.QtCore.QUrl('asd'), PySide2.QtCore.QUrl('def')] >>> def func(lis): ... for thing in lis: ... yield thing ... >>> QtCore.QUrl.fromStringList(func(["asd", "def"])) [PySide2.QtCore.QUrl('asd'), PySide2.QtCore.QUrl('def')] Also working, by overriding shibokengenerator >>> QtGui.QMatrix4x4(func(range(16))) And all other QMatrix sizes as well: >>> QtGui.QMatrix2x2(func(range(4))) >>> QtGui.QMatrix2x3(func(range(6))) The PySequence cases seem to be quite completely covered. Supporting lists and QVector is not yet clear and needs more research. Note.. QtOpenGLFunctions is not tested at all and nothing works on macOS, segfault. Ignored for now! A simple numpy test shows how versatile this solution is. We now need to improve signatures and error messages to optimize the experience. Task-number: PYSIDE-795 Change-Id: I195cd46cf47c2eb83276fe48fce8e6070cf30fda Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Properly nest types in type system filesFriedemann Kleint2019-10-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Nesting types by specifying "::" currently works by coincidence (as long as no modifications or further elements apppear) since the lookup is mostly name-based. It might be removed in a follow-up step. Task-number: PYSIDE-990 Task-number: PYSIDE-1074 Change-Id: I43db8a25a192e94b6a6d51f78233c3526f719406 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Qt3DAnimation: Add class QAbstractChannelMappingFriedemann Kleint2019-10-252-0/+2
| | | | | | | | | | | | | | | | | | Fix warnings: class 'QSkeletonMapping' inherits from unknown base class 'Qt3DAnimation::QAbstractChannelMapping' class not found for setup inheritance 'Qt3DAnimation::QAbstractChannelMapping' Change-Id: Ib9ff5d61d49eef158d71b9973cc4820a9754b2ce Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Speed: Avoid some repeated string constant initializationFriedemann Kleint2019-09-302-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a basic concept to avoid the repetition of string constant creation in Python by using helper functions returning static instances. There is currently no real shiboken finalization, so we postpone finalization until shiboken has one: - call the finalize_strings() function - build finalization for other stuff (all signatures etc) Initial-patch-by: Christian Tismer <tismer@stackless.com> Task-number: PYSIDE-1087 Change-Id: If3483ba91f719ee0472eb53583460ba35163bc9d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Enable the Function Registry for 5.14Christian Tismer2019-09-281-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function registry was not enabled for versions greater than 5.12 . This is now needed, since the function registry will be used in the tests for the improved NumPy support. There were new cases of Python keywords touched by enums which had to be renamed. This was moved into the code generator instead of the runtime overhead. The formatting of the enums was rewritten and reports all enums now that can be found (also those which are copied into the parent class). The formatting of the function registry had not been used for a long time and had entries that showed the wrong number of subclasses. The usage of the registry was also simplified by using the full names of functions. They can now directly be accessed. Task-number: PYSIDE-795 Change-Id: I734f6811205f3c3528a911975677eb677fedd2dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add bindings for Qt 5.14Friedemann Kleint2019-09-257-0/+29
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I52b4c13f881599812a311f01937fde92ba4c0f3f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Clean up string related macrosFriedemann Kleint2019-09-241-4/+3
| | | | | | | | | | | | | | | | | | | | Expand and remove some macros and fix up versions. Initial-patch-by: Christian Tismer <tismer@stackless.com> Task-number: PYSIDE-1087 Change-Id: I20a0be86e6ec6c21423de47bfd81ed003263c922 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | PySide: Clean up indentation, fix refcounts and improve generated codeChristian Tismer2019-09-181-2/+3
| | | | | | | | | | Change-Id: I5795526cd9d18dda329c9d6694e2fc1269c9d771 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-111-6/+0
|\| | | | | | | Change-Id: I61c67513918f39cfb45e6c24f693bb7a78c5d797
| * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-09-111-6/+0
| |\ | | | | | | | | | Change-Id: I7f3e2a11fe744b5c868698e63cf10882c168c53f
| | * Remove extra ref on QDataStream::setDeviceCristian Maureira-Fredes2019-09-061-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the documentation the object does not take ownership of the QIODevice. Change-Id: I1a617844fd825e6420167c4a5d848fd36e90823f Fixes: PYSIDE-1007 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-052-23/+72
|\| | | | | | | | | | | Change-Id: I235035ccd510bcb548ffde00244215192d06e600
| * | signature: Support typing.Optional[T] and refine a bitChristian Tismer2019-08-291-21/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature was missing "typing.Optional[T]" which has to be wrapped around any argument with a default value of "None". This is the only case where the repr of a type looks different than it was written, because it renders as "typing.Union[T, NoneType]". Solving that by redefining a few typing structures was way too hard and too error prone. It was finally solved by a regex replacemet that is run as a post process in generate_pyi.py . The enumerations are now even more complete, since toplevel enums are also included. This had the effect that enums with Python keywords were revealed, and so the function "createEnumItem" had to be modified. The order of creation was also changed to avoid name clashes. The overall structure was improved, and instead of parsing the generated signatures to find out if something is a class method, this is now very cleanly implemented as an inquiry to get_signature(). I tried to make sense of the flags structure that comes with many enums. PyQt5 has a standard set of "__...__" methods without useful signature information. I could mimick that as well, but that would create a whole lot of pointless extra information. We should decide later if it makes sense to include that. Right now the flags structures show the class name, only. This patch will be merged with the 5.14 branch. The additions of this patch could fortunately be placed into areas which do almost not overlap with the 5.14 signature additions. Change-Id: Ie513e15917b04d746ab597fb7a9eb1fd766f7c73 Fixes: PYSIDE-1079 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | Add QtCore.Slot.__signature__ and much more manuallyChristian Tismer2019-08-212-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature of QtCore.Slot and other classes could not automatically be generated because the function is not generated by cppgenerator.cpp . We add it manually in the C++ code into the generation process. The case of QtCore.Slot had diverse follow-up issues to be solved: - Classes which did not inherit from Shiboken were not generated. This is a long-standing omission and creates very many new simple types. - The arity of Slot has default arguments after the varargs parameter "*types". This needed an extended Python parser analysis that fixes the arguments given to the inspect module, accordingly. - The signature generation was completely new implemented and relies no longer on the restricted syntax of a Python (2) function but generates signatures directly as Parameter instances. Implemented classes with hand-made signatures: QtCore.ClassInfo QtCore.MetaFunction, QtCore.MetaSignal QtCore.Property QtCore.Signal QtCore.SignalInstance QtCore.Slot QtQml.ListProperty QtQml.VolatileBool As a side effect, many more subtypes were published. Enums are done, which concludes this work. Fixes: PYSIDE-945 Fixes: PYSIDE-1052 Change-Id: Ic09f02ece3a90325519e42e4e39719beb0c27ae9 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * | Fix wrong Python init return codesChristian Tismer2019-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PySide classes had wrong return values in their init code. In case of errors, they would not show up immediately. The following modules are affected: sources/pyside2/libpyside/pysideclassinfo.cpp sources/pyside2/libpyside/pysideproperty.cpp sources/pyside2/libpyside/pysidesignal.cpp sources/pyside2/libpyside/pysideslot.cpp sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp This error exists since Nov 03 2010 . Fixes: PYSIDE-1077 Change-Id: I8cf9bf7d1d8f8dca1155274cb24408f423557bac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | Add Qt Core bindings for Qt 5.14Friedemann Kleint2019-09-052-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding the new QCalendar class is required to unlock the branch since the rejected constructor QDate(int, int, int, QCalendar) causes test failures in of QDate. Task-number: PYSIDE-487 Change-Id: I2720b92f3356421065f539ea0eba75d3049b9702 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | Enable multimedia classes after API fixupFriedemann Kleint2019-08-212-12/+6
| | | | | | | | | | | | | | | | | | | | | Change-Id: I58e14a919fdf8cb297bed8e91d964c3767c0b98c Fixes: PYSIDE-1041 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-08-193-4/+3
|\| | | | | | | | | | | Change-Id: I56b8450c17fd83a24ee2ec9eb8f66f3530caba6c
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-08-143-4/+3
| |\| | | | | | | | | | Change-Id: Ibe27e8ef7edc487640bc9cf1fe113d2d27e1e291
| | * correct QtPrintSupport dependencyChristian Tismer2019-07-292-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtPrintSupport was missing the XML entry QtWidgets in typesystem_widgets_common.xml, which resulted in follow-up errors in generate_pyi . With this addition, the following pointer-types patch will create a correct signature def getPageMargins(self, unit: PySide2.QtPrintSupport.QPrinter.Unit) -> typing.Tuple[float, float, float, float]: ... Task-number: PYSIDE-951 Change-Id: I0b87cc31c3b39e727aec0a433687a131f1dc1aa6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * shiboken: Allow for "auto" as target of type for CONVERTTOCPP in injected codeFriedemann Kleint2019-07-291-3/+2
| | | | | | | | | | | | | | | | | | Task-number: PYSIDE-1037 Change-Id: Idfc70fe571e4058d0c82db1bd0afea54436fe27c Reviewed-by: Christian Tismer <tismer@stackless.com>
* | | Support Pointer Primitive Types by Arrays or Result TuplesChristian Tismer2019-08-073-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- This change is part of the improved numpy support -- Most primitive types are handled in XML, but this was not reflected by the signatures, error messages, doc strings and hinting stubs. In order to enhance the information shown to be more correct, the C++ parser part was rewritten for Python. It is written closely to Python syntax, but keeps the existing information about primitive types intact. AbstractMetaType::NativePointerAsArrayPattern is now used to mark a variable as an array. Heuristics are no longer used. If a pointer variable is not marked as an array, the Python parser generates a return value. If more than one value would be returned, a result-tuple is generated. Because we now have a deterministic categorization of types, the "const" attribute is no more needed and the entries in mapping.py are reduced. A few missing <array/> markers were added. The tool also now handles typing.List[] differently in arguments and return types. While return types stay lists, they are for now changed to typing.Sequence[] in argument lists. A test was included. These messages belong to the previous "deprecated functions" patch: Further, QMatrixMxN.constData was removed from the typesystem and replaced by a surrogate function that calls QMatrixMxN.data, but also generates a warning. The long forgotten generate_pyi.py was now published in the same course. Task-number: PYSIDE-795 Task-number: PYSIDE-951 Change-Id: Ia59fe4986919525a70ea7cc453c64cdf46e7fba0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | PySide: Create a framework for deprecated functionsChristian Tismer2019-08-063-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During development of the patch "Support Pointer Primitive Types by Arrays or Result Tuples" some functions in QtGui turned out to be removal candidates. The name "constData" should be deprecated in favor of the existing "data" function. Other implementation also do not have this. Instead of simply removing, we now create a surrogate function with the name "constData" in fure Python that gives a warning and calls the "data" function. This is now extracted into its own commit since the deprecation is a completely different and independent issue. The implementation does not do any extra imports in advance. and is easily extensible to more post-installation actions. Task-number: PYSIDE-795 Change-Id: I410c69a87d9f0df78f736991b2ee0a2747678911 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | QtWinExtras: Add QtWin namespaceFriedemann Kleint2019-08-012-0/+5
| | | | | | | | | | | | | | | | | | Task-number: PYSIDE-1047 Change-Id: I864a5d1d0e57d15f913012f783876a38b9458315 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-07-293-5/+60
|\| | | | | | | | | | | Change-Id: I057084ef25f7bbe8ec62ef7893b1d44b0074d987
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Alex Blasche2019-07-183-5/+60
| |\| | | | | | | | | | Change-Id: Ic2c43ef80769e3063dac771518c803861510f72e
| | * Cleanup signature module before substantial changeChristian Tismer2019-07-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were some refinements applied while developing "Support Pointer Primitive Types by Arrays or Result Tuples". This patch moves these changes out which are not essential for that patch. They include - sort all mapping groups by name - replace huge regex by a pattern generator - replace dictionary string entries by SimpleNameSpace - improve PEP 563 handling - simplify "zero(sometype)" substantially - better handling of "QGenericMatrix" (preview) A test for the generated pattern against a reference parser was added. Task-number: PYSIDE-795 Task-number: PYSIDE-951 Change-Id: I5a6b236850c63a7db77b7f7b88881486fd1e61be Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * Add optional support for types in QSettings::valueCristián Maureira-Fredes2019-07-172-5/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This add an optional named parameter to the function value() to automatically cast the type that is being returned by the function. An example of this situation could be an ini file that contains the value of a one-element list: settings.setValue('var', ['a']) The the ini file will be: [General] var=a # we cannot know that this is a list! Once we read it, we could specify if we want the default behavior, a str, or to cast the output to a list. settings.value('var') # Will get "a" settings.value('var', type=list) # Will get ["a"] The cppgenerator was modified to add a verification step before trying to get the named parameter, since it could be optional and having one named parameter was assumming that all of them were provided. Change-Id: I8f379debea86b42cf89019d432e990084c9e6614 Fixes: PYSIDE-1010 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | | 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