| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With virtualenv 20 we have the case where the first
path in the PYTHON_LIBRARIES cmake variable was wrong:
a_virtual_env/libs/python3.lib
so the python code inside the helper didn't have a proper
check if the file was valid or it was just a wrong construct.
Additionally, the 'prefix' variable will contain the virtual
environment directory location, which will not contain the 'libs'
directory, because that's included in the system's installation path.
To solve this, we use the 'INCLUDEPY' directory, which is correct
as a base to create the real 'libs' one.
Task-number: PYSIDE-1231
Change-Id: Ifca08d74c49cd57572836a087edb96c089266dc7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 22e359bc19daf19033332aa2d7bb9726c7f4be14)
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I741a7880bf87cca4a6482cc0e07e6f878e2e02b3
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Change-Id: I15d5c647e68344ae4a05898be6d8a334cf25f3b4
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: If1386242c31e00412f289c9137c6a0427355ed9c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are signals and properties which are correctly supported
in PySide by the function "fillQtProperties". The structures are
introspected by calling "QMetaObject::indexOfSignal" and
"QMetaObject::indexOfProperty".
By allowing any property, extending the above restriction,
we break the Qt API slightly, but have the tremendous
advantage of being able to write all needed properties into
the constructor call.
This approach is a compromize that keeps the attribute calls
as they currently are. Supporting real properties where we
actually have getter and setter functions would be possible
as well, but that would break compatibility very much!
It has to be discussed if we want to support a configuration
switch that enables this incompatible change.
If we would go this far, then I would do this together with
changing mixedCase to lower_case.
A simple test case has been added.
Task-number: PYSIDE-1019
Change-Id: I8094df51d63aa767a5a9ec1c83bcf7db7b157a01
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of setting CMAKE_BUILD_TYPE as a regular variable,
set it as a cache value, but only as a default. If the user
specifies -DCMAKE_BUILD_TYPE=Foo on the command line, that will
take priority.
PySide2 will inherit the build type from the shiboken build, also
unless explicitly specified on the command line.
Fix missing quotes around the build type in shiboken_helpers.cmake.
Task-number: PYSIDE-980
Change-Id: I2f7e5f71b66467ca5b30056c42d26d9a54ff265b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idiom to create an application if none exists
qApp or QApplication()
did not work on Python 2. This was recognized when another
unrelated test broke that tried to use the idiom.
This patch adds the missing method to Py_TYPE(Py_None)
which Python 3 already has.
A test case was added.
Side-effect.. The warning about missing braces is gone,
after the "PYTHON_IS_PYTHON3" macro is defined. This
was forgotten in the review when when the macro was
moved out of signature.cpp .
Task-number: PYSIDE-571
Change-Id: I9b9304f407cd4cafb3ba0945ffb045802503a343
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Some use cases need direct data access for performance,
e.g. initializing QPolygonF data with numpy.frombuffer. Implementing the
Buffer Protocol as described in PEP3118 will allow direct data
access.
Change-Id: I13c46055b1cba115d099f1becb64c4cd04acdf0e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Existing PATH, LD_LIBRARIES_PATH or DYLD_LIBRARY_PATH values should be
appended to the ones we set ourselves. This takes care of finding any
system libraries which a distro / OS might set by default.
Change-Id: I1b3d1ea20c024e8ffcba3fb38d9088917130abfe
Fixes: PYSIDE-1008
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When trying to generate the pyi files on Windows, the python modules
failed to be imported due to Qt dlls not being in PATH. This happened
because we overrode PATH instead of prepending to it.
When generating pyi files on Windows, make sure to prepend new values
to PATH while also keeping the old values.
Amends 97df448edbc035a2f531508a5cfe5739fb2de18d
Change-Id: I74c374c3a9687169dd4af0ed232bda76a0267fc4
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyInstaller has a bug when multiple versions are installed.
There are also some other traps which can give additional
trouble.
The "--reuse-build" problems have vanished meanwhile and
were removed. The numpy problem with Python 2.7.16 was added.
Change-Id: I6c60d8ee823963b59fc6b65a6ab8007314e4098c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Introduce C++ structs with QByteArray to be used for signal and slot
names and signatures, removing a lot of code dealing with char *
pointers, strdup() and reallocating.
Change-Id: I28acf727bc6cf468285b153c85b0a342fd79f7d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
The function slotCall() used the now deprecated function
QString::sprintf(). Rewrite the code using QByteArray since converting
to QString and back is wasteful for the purpose.
Change-Id: Ifcd50e76bb7ea0c9d2f2e7453c6e265abe6265b7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I1415417ab761c57e64c0f031a9b63b5f85c9c7c7
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
float *v,int,int)
Change-Id: Ia44c94995bee2f095f1e90b614f9f1cdbc1dde3c
Task-number: PYSIDE-988
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
| |
Change-Id: I45998473fe82c1affbf0d88b1e0d38a95795cfa5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Including in the documentation a section related to deployment,
and also tutorials associated to the following tools:
PyInstaller, cx_Freeze, and fbs.
Task-number: PYSIDE-901
Change-Id: I6162b039b5df3eced38ce65fe7cb143be9f0de82
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having all the Qt modules on the main page is too verbose.
I created four sections with a couple of them and added
more context to clarify when to use them.
All the modules are still listed in a new page called `modules`.
I included an `overview` page with some general information from
our wiki: compatibility among platforms, an example and the FAQ.
Task-number: PYSIDE-691
Change-Id: Ic9e2519aa2caa9c8a645633c2c1772e4844b5ec5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
| |
Updating to the new project logo (128x128).
optipng was ran on the images:
optipng -o 7 -strip all pysidelogo.png
Change-Id: I75d0ef76a7fddf957a5095d74c4c836a2c1ebe31
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The registry had a duplication of code in the self-test that
led to an oversight.
To prevent that in the future, the error handling has been
rewritten, and an extended self-test was written that checks
the correctness of every case.
A truth table has beed added as a reference for questions.
Change-Id: I4570b2388c9b179b33c9520a484e09b9ccb68918
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Also added the necessary leading paragraphs.
Change-Id: Ie8682e878aa8470ee8ca1f3231d0c8ccc14bc68d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
- Add the necessary source files based
on the video tutorial in QtStudios
Change-Id: Icdb16db8ff41c449e7657b9e2142d61ceddc1478
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 the corresponding Sphinx configuration entry.
Change-Id: I73f213275544089f75d45b98d85df320c71c3fb1
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Document the tabbedbrowser tutorial only when QtWebEngineWidgets are
present. Otherwise, the sphinx run will fail since autodoc cannot
import the QtWebEngineWidget Python module.
Change-Id: I23e671e15aa1725b20e4d0db17942f3fbc04bf20
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
| |
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>
|