aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-10-081-0/+18
|\ | | | | | | Change-Id: Ibe15176ae36ea31bd1799d9bf8a39b57f9338ca0
| * Fix bad shutdown effect on QApplication.instance()Christian Tismer2019-09-301-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When app = QtWidgets.QApplication.instance() is used before a QApplication has been created, the qApp code sees no qApp instance in C++ and assumes a shutdown. This patch keeps track of QApplication being created and behaves correctly on that aspect. It is still unsolved that QtCore.QObject.staticMetaObject gets deleted on a qApp shutdown, which is too much. I think this can be handled in another patch if at all, since the shutdown / recreate feature is undocumented and of little use. Change-Id: I140b6dba45f7cd337580373dbf72bc6d0a625fea Fixes: PYSIDE-1093 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | libpyside: Use new static stringsFriedemann Kleint2019-10-046-8/+134
| | | | | | | | | | | | | | Initial-patch-by: Christian Tismer <tismer@stackless.com> Task-number: PYSIDE-1087 Change-Id: I5b4f0e70bc9b79dd4a4a545e97722ceba778ee53 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Enable the Function Registry for 5.14 finaleChristian Tismer2019-10-0119-287871/+157721
| | | | | | | | | | | | | | | | | | | | | | This concludes the registry start for 5.14 with improved files. Old versions are removed, since the format has changed quite much. Task-number: PYSIDE-795 Change-Id: I3c5dc1480d1eecce4018e4b6a5856d7961fbef86 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Enable the Function Registry for 5.14 augmentedChristian Tismer2019-09-302-10/+39
| | | | | | | | | | | | | | This patch fixes some small quirks and improves the scraping. Change-Id: Ia0366e2e29c833fe985353768de166fd538f0d24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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-284-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-251-1/+2
|\| | | | | | | Change-Id: I27c0e49bf4768339ce62669085d9a62ffd9ecf5a
| * libpyside: Fix compiler warningFriedemann Kleint2019-09-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Restore the warnings formatting code in helper fillQtProperties() to what it was before, (since QByteArray propName is constructed from PyObject *key), fixing: format ‘%S’ expects argument of type ‘wchar_t*’, but argument 3 has type ‘PyObject*’ {aka ‘_object*’} [-Wformat=] Amends bff242cfd8a34dcf2848a8864732eb5bdf85dbf0. Task-number: PYSIDE-1019 Change-Id: I724c5eb698327b8b6474c895f1b149b08e729bd1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@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-245-14/+7
| | | | | | | | | | | | | | | | | | | | 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-112-11/+5
|\| | | | | | | Change-Id: I61c67513918f39cfb45e6c24f693bb7a78c5d797
| * Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Friedemann Kleint2019-09-112-6/+1
| |\
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-09-112-6/+1
| | |\ | | | | | | | | | | | | 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>
| | | * Bump version for 5.12.5Simo Fält2019-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I741a7880bf87cca4a6482cc0e07e6f878e2e02b3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | | Fix formatting of the deployment documentationFriedemann Kleint2019-09-111-5/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | Fix wrapping and bullet list. Fixes: PYSIDE-1089 Change-Id: Ibf4c7f6ccb5b167da6ccb4afa9cc2c51d0551c78 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | Bump version to 5.13.2Simo Fält2019-09-061-1/+1
| | | | | | | | | | | | | | | Change-Id: I4e65ab4e24d563372e548f426b830a9490b8e99f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-0511-283/+339
|\| | | | | | | | | | | Change-Id: I235035ccd510bcb548ffde00244215192d06e600
| * | Doc: Improve the documentation styleTopi Reinio2019-09-021-20/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Restyle the admonition (warning/note/seealso) paragraphs, use the same font for all link types, and separate entries with ', '. - Drop the rounded corners on multiple section titles. - Use a monospace font for enumeration tables (value column). - Restyle the <blockquote> element that is used for overload/parameter docs to separate them from the documentation 'body'. - Replace list-style-type:'' with list-style:none as the former does not work on all browsers. Change-Id: I0c37bd05448d7ce38a47af7449ca0bc9efff68b4 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * | 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>
| * | CMake modularization: macros creationCristián Maureira-Fredes2019-08-281-180/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First step of this process that only considers the idea of encapsulate the diffrent CMake processes we currently have in all our main CMakeLists.txt files. This patch simply takes some sections of the existing cmake files and move them to a macro file. Additionally, a couple of macros were written twice in shiboken and pyside, so now they are only once. Task-number: PYSIDE-1033 Change-Id: I2c63d8a2eba3d8951097ec9c9042c782fde5dd62 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
| * | Add QtCore.Slot.__signature__ and much more manuallyChristian Tismer2019-08-218-48/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-205-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Docs: Add missing pysideversion codeCristián Maureira-Fredes2019-08-201-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The file pysideversion was removed, but the Getting Started page was still referencing it. This change add the code that used to be in pysideversion.rst Change-Id: Ie80b2cd95cac6f50e52be2556d53de209422f26e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Update docs styleCristián Maureira-Fredes2019-08-201-12/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some upgrades to improve the readability: * Reduce margins, * Remove round-corners from boxes, * Remove parameters and return type boxes and use bold instead, * Always show the Table of Contents. Task-number: PYSIDE-1067 Change-Id: Ibaa484172103eff17426ae03ee6f95c78fe51143 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Add Qt Core bindings for Qt 5.14Friedemann Kleint2019-09-054-3/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-195-25/+20
|\| | | | | | | | | | | Change-Id: I56b8450c17fd83a24ee2ec9eb8f66f3530caba6c
| * | simplify the qslot_object_test to use the qApp macroChristian Tismer2019-08-151-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The qslot_object_test needed an adjustment, because it uses the name "qApp" without being aware that a qApp builtin variable exists for exactly that purpose. Change-Id: Ic3df95ee33ece5de573b2dcc6ec2d6e2a1ffee73 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Bump version to 5.13.1Simo Fält2019-08-151-1/+1
| | | | | | | | | | | | | | | Change-Id: I88699b3231707d77014b0ee2fb1e8a710484f66e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Documentation: update QInputDialog snippetsCristián Maureira-Fredes2019-08-141-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapting the code, since we return a tuple (retval, ok) instead of the Qt/C++ approach of having the boolean ok as a parameter. Task-number: PYSIDE-1059 Change-Id: Ied9f99048b95c034850111135ba47ff3aad34917 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | 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-065-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Merge remote-tracking branch 'origin/5.13' into 5.14"Friedemann Kleint2019-07-3040-5/+142
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-07-2940-5/+142
| |\| | | | | | | | | | | | | | Change-Id: I057084ef25f7bbe8ec62ef7893b1d44b0074d987
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Alex Blasche2019-07-1840-5/+142
| | |\| | | | | | | | | | | | | 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>
| | | * Change QtQml tests file permissions to 644Cristián Maureira-Fredes2019-07-1734-0/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I0447da5e1ace3f6acc930aa4296576ec447f1be5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * Add optional support for types in QSettings::valueCristián Maureira-Fredes2019-07-175-5/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Fix build against Qt 5.13Friedemann Kleint2019-07-301-0/+4
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | For development purposes, the 5.14 branch is currently built against Qt 5.13. Qt 5.14 deprecation fixes must be guarded by version checks. Change-Id: I41f7185577c612e8daf8020b9fe57d9ff2c66379 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-07-057-6/+161
|\| | | | | | | | | | | Change-Id: I71a1165ef9dea0eb084b271a0362c3f1e12829e3
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-07-057-6/+161
| |\| | | | | | | | | | Change-Id: I3b3285a4e0315aea8da0426f179515866f53a7f8
| | * Add support for parameterNames in SignalsCristian Maureira-Fredes2019-07-046-5/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were many uses cases when a proper interaction between Python and Qml was needed, one of them was the case to emit signals from Python an get those values via an argument name in QML. A simple example describing this situation can be found in PYSIDE-634: Python: sumResult = Signal(int, arguments=["sum"]) sumResult.emit(42) Qml: onSumResult: console.log(sum) // will print 42 A test case based on the same example was added. Change-Id: I0908f97d88eaadc0c02d81bc4daca936f72f6c6a Fixes: PYSIDE-634 Reviewed-by: Christian Tismer <tismer@stackless.com>
| | * 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>