| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Change-Id: I3b0330b4fe4e1ab63b78c583abb46f355bcf10ab
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 56637d5b7c386499feae6cd002c848190389c62b)
Reviewed-by: Simo Fält <simo.falt@qt.io>
|
|
|
|
|
| |
Change-Id: I2bdcf041e19afc4ac04189b3e0de80d764ab16c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patching of the type generation needs to become universal.
Additional to the patch for SbkObjectType_TypeF, we now patch
* SbkObjectTypeTpNew
* introduceWrapperType
which makes the modifications for the heaptype flag complete.
Actually, the modification of tp_new_wrapper has to be more
sophisticated in this general case:
We follow the __mro__ and patch exactly those functions which
have the old wrapper and add the new wrapper.
Change-Id: I51d4d77c99bd18eed2e31d2ab21143c0f4e2ea6c
Fixes: PYSIDE-1051
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
|/|
| |
| |
| | |
Change-Id: Id820dfc57338b9630b77448a697aa9da029ddadf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adding Proprietary License to METADATA to indicate possibility for
commercial licencing. License will be shown in pypi.org with LGPL
possibility.
Change-Id: Ic389adc2a867b9ea1118574fdf627e78acb02ba2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is required to be showed on the description page
on PyPi.
Change-Id: I6e25736ea8540c8e5426dbe9d48678efc1033e0c
Reviewed-by: Simo Fält <simo.falt@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously when building on the Coin VMs, the incorrect
Xcode sdk value of "10.0" was embedded into all the built shiboken
and PySide2 binaries. This causes issues when trying to notarize
a PySide2 app.
The reason why this happens is described as a long investigation
on the respective bug report.
The fix is to ask xcrun to report an SDK path which contains
the version number in the SDK path (/path/to/MacOSX10.14.sdk
vs just /path/to/MacOSX.sdk).
Change-Id: I3f02510953e2f54032c19a48cb8a7162814bf9e7
Fixes: PYSIDE-1066
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simo Fält <simo.falt@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The typing module has problems if it exists twice.
This gave trouble with matplotlib, when typing was imported
and then called PySide indirectly.
The only reliable cure appears to be to use the typing
module if it is already in sys.modules .
The typing27 modue was updated to the latest version
of https://github.com/python/typing (original file with
additional license headers).
Fixes: PYSIDE-1073
Change-Id: Iebfdfe7fd51080a9334db332719928c001501381
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \ |
|
|/| |
| |/
| |
| | |
Change-Id: I0f71c6ca75fae7e1eff6675d787891507d4dd965
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ifc268eea8a3c0137d19524d6d7114e3238a41a6d
Task-number: PYSIDE-1035
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I6ba6cb1799837ebcf093404ca3415c893584f21e
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Simo Fält <simo.falt@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-1035
Change-Id: Ifbd5b2c586901573f466ba0016bc80b0534595df
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I88699b3231707d77014b0ee2fb1e8a710484f66e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When implementing QtCore.Slot.__signature__, the following
extension to writable signatures became useful:
Signatures were corrected to be writable if they were not set
by the signature module at all. But we should also allow
assignment when the signature was set to None.
This feature is only used for exploration; the correct way to
implement a new signature is to integrate it into the normal
generation process, as being done for QtCore.Slot.__signature__.
Change-Id: I010e505a376993f27c46bd1c14e327e44d375abd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \ |
|
|/| |
| |/
| |
| | |
Change-Id: Ibe27e8ef7edc487640bc9cf1fe113d2d27e1e291
|
| |
| |
| |
| |
| |
| |
| |
| | |
Sbk_*_getattro receives an utf8 string and we need to convert it to
ascii string before use it on PyErr_Format.
Change-Id: Ie3cf5286c9eb6b01f86347b00d523837ca41de32
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-1037
Change-Id: Idfc70fe571e4058d0c82db1bd0afea54436fe27c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The signature module was extended to allow automatic creation of
__doc__ attributes by taking str of the signature.
This function has to figure out when it should not touch an object
that does not come from PySide.
The check asked the type that was returned by GetClassOfFunc,
but in case of a global function, the module of the function is returned.
In order to prevent such mistakes, the function has been renamed
to GetClassOrModOf.
Change-Id: I055f1f0483674553f9300d642aa516cec607e66c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Seems the dictionary of modules needs to be copied before iterating
Fixes https://github.com/spyder-ide/qtpy/issues/195
Change-Id: I8517e031c4a250856d3318b364b1cd5dab3f8f80
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\ \ |
|
|/| |
| |/
| |
| | |
Change-Id: Ic2c43ef80769e3063dac771518c803861510f72e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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-Id: I0447da5e1ace3f6acc930aa4296576ec447f1be5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The newest version, 3.5, seems to have an issue
related to out test, which sadly is making the test
to fail.
Until this is not figured out, let's use 3.4
to avoid other patches to be merged.
Change-Id: I71e8aa616dff37b6c5b2552711140c0c0bf10d21
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Code snippets like:
QByteArray *cppSelf = %CONVERTTOCPP[QByteArray *](obj);
cause an assert in shiboken since the '*' is captured into
the target of the assignment and is not considered part of the type.
Make the error message a bit clearer and add documentation.
Fixes: PYSIDE-1037
Change-Id: Ie8da2f57ba91325ea677e1a00852e91726c0e09b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| | |
This is useful when testing in a local developer build.
Change-Id: Ib875dabd21d437951d3909030b47805b807fac9d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Anonymous structs showed up as mysterious, empty entries in
mjb_rejected_classes.log. Output the location.
Change-Id: I0754e426a9fff3d1dac03aa587747ab0d7816df5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I66b59ef11aa268e17434832f69af4e2e27146286
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|\ \ |
|
|/| |
| |/
| |
| | |
Change-Id: I3b3285a4e0315aea8da0426f179515866f53a7f8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Another entry with converters exists a few lines below.
Change-Id: Id1de3835e42869a55e0bf865aa992f38748f2e88
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The file is too large to be maintainable.
Task-number: PYSIDE-1024
Change-Id: I9e95ede1b7e7ce804059ef510dcec9dc9e773a48
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\ \ |
|
|/| |
| |/
| |
| | |
Change-Id: I79d2166f18d8ed941c6c34fcbc7b185c2da02f0c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|