| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When code must be modified or added to certain
functions, we currently have two options:
* Write a template and include it into the typesystem,
* inject code directly at a certain place of the function entry.
The problem with injecting raw code is that since it is an XML
file, one need to escape protected symbols, like "<" and "&".
Thanks to a couple of complementary commits, now we can place
this code snippets on a separate file without triggering
a whole module compiling process, since the typesystem itself
will not be alterered.
All the injected code from the typesystem was removed
and placed into a single file per module inside a top-level directory
called glue.
Some small fixes were included mainly regarding styling
of the code.
Task-number: PYSIDE-834
Change-Id: I823e92d241a528d75d5940090008db9bf297f49e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation of the enum operations,
wrongly assumes that the first element is always an enum.
This patch add some logic to determinate the types
we are dealing with, to allow operations like:
2 + QtCore.Qt.Key.Key_1
which were not accepted before.
Float numbers are not accepted for enum operations
and a test case was included.
Some tests were adapted since they were wrongly
implemented.
Fixes: PYSIDE-830
Change-Id: I407dca2b7c39fc684dbdac19ad45d259403ebadd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Specify C++ ownership for the event (as is done for
QCoreApplication::postEvent() and similar).
Fixes: PYSIDE-850
Change-Id: I8d34842823d80779716d407e4fa6268533c5d080
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
| |
Task-number: PYSIDE-852
Change-Id: If1ff8407c7f9449be278869e91104372fa86790f
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shiboken did not have support for `nullptr_t` so the
converter was failing when encountering a `nullptr`.
A test case is included.
Fixes: PYSIDE-854
Change-Id: If5aad245e7074ed791bfc7a42a4c6a56de441d5b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
| |
This way it is easier to publish the docs online as well
as package it for offline use. Besides, updated the links
to the sphinx projects so that the linking between them works.
Change-Id: Id7494d5bc8adf95bfaaf25dedb58f3b07ac6dca4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch again contains a complete overhaul of the signature
module. The code was re-implemented to properly support nested
classes. Also, the code was reduced by AutoDecRef and by
adopting a concise C++ style.
Note.. We will add a shiboken signature test and complete
mapping.py after the split into three projects is done. The split
changes a lot and is needed right now!
Signatures were quite complete for PySide, but the support for Shiboken
was under-developed.
Since we are planning to generally enhance error messages by using
the Signature module, we should be able to rely on them to always
produce a signature. Therefore, a general overhaul was needed
to resolve all cornes cases for Python 2 and 3.
Nested classes are supported, as well as plain module functions.
The usage of the typing module might improve over time, but the
Signature implementation is now considered complete.
The loader will respect now the path settings which might not be
the package dir but the build dir. This is more consistens with COIN
testing.
Task-number: PYSIDE-795
Change-Id: I246449d4df895dadf2bcb4d997eaa13d78463d9b
Reviewed-by: Simo Fält <simo.falt@qt.io>
|
|
|
|
|
|
|
|
| |
unsigned long(0) does not work, use static_cast<unsigned long>(0).
Fixes: PYSIDE-846
Change-Id: If41baebdf0b1228b658408e4c300872d17143e6f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
A new version is now in use, causing:
qtattributionsscannertorst.py:122:
".../sources/shiboken2/libshiboken/bufferprocs27.h" is not a file
Change-Id: I14d9b9d8902ff7b3595b0e5b88d957a3847ecdae
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a proper `void*` treatment, so the extra
function does not seems to be necessary.
The injected code used for the interalPointer method was
also removed since is better to leave on shiboken hands
the conversion between void* and python types.
A couple of test were adapted since wrongly used ModelIndex
with Python objects.
Change-Id: I082637c7d1dd1bb0f50a3c453513e5d722f4b783
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Included basic tutorials related to Widgets, QML and UI files.
Task-number: PYSIDE-841
Change-Id: Ia338f8cf1a64e4f09617fb3ac5a898d28e527dbd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\
| |
| |
| | |
Change-Id: I5a8f41a2236601b7c5466586dd1cfc92c1afc391
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When running test in debug mode on Windows, failures occurred:
File "sources/pyside2/tests/QtCore/qfileread_test.py", line 41, in readData
return super(FileChild2, self).readData(maxlen)
UnicodeDecodeError 'utf-8' codec can't decode byte 0xcd in position 21: invalid continuation byte
File "C:/dev/pyside/pyside-setup511d/sources/pyside2/tests/QtCore/qfile_test.py", line 57, in testBasic
self.assertFalse(obj.getChar()[0])
UnicodeDecodeError 'utf-8' codec can't decode byte 0xcc in position 0: unexpected end of data
This is caused by missing initializers and terminating \0 characters in the
QByteArrays introduced by ca806b438e8a27dc4562ac806d189765e93e09e5, unearthed
by MSVC helpfully filling unitinialized data with random values.
Fix by using a QByteArray of size n + 1 filled with 0.
Initialize the character variable in the fix_char* template.
Task-number: PYSIDE-40
Change-Id: Ia604841a89f1b1b9564c16d2f23cd9f7c20f5628
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Once the qtbase commit
(22c1a46a03bc3347afc0e7462e19558283d0e1b7) gets integrated into
the qt/qt5 repo for dev branch, we can revert the terrible
workaround fix, because it won't be needed anymore.
This reverts commit 5cd52cda24bf70bf99f4deec037039df0ab928f5.
Task-number: PYSIDE-724
Change-Id: I627c7ec945b864a1c16ba6cd7288807591f70140
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the function _NamespaceModelItem::uniqueNamespaces()
which created a QSet of_NamespaceModelItem *. Hashing by pointer
values does not have any effect.
Change-Id: I723024f0004aacecf4f06a1baa10678848d4a56b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add missing conversion of the long *result variable.
Amends f4a6d74852b0ba6711195a9c3fc9356e677a3409.
Task-number: PYSIDE-790
Change-Id: I2db9ffd80b569f68b714b21e2adaa3e34949af83
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I3bb491686968e81382c135ab737da259d9796f52
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a type has nullptr as tp_dealloc, there apply different defaults.
Static types had object_dealloc as default, while new heaptypes
created with type_new have subtype_dealloc as default.
A problem was now that PyType_FromSpec also has
subtype_dealloc as default. But that is wrong, because a type that
was written with the static type approach is already written with
object_dealloc in mind and takes somehow care about further issues
with that type.
When we now convert this type and suddenly use subtype_dealloc
instead of object_dealloc, things get pretty wrong.
Finding that out was pretty hard and took quite long to understand.
The fix was then very easy and is the best proof:
Replacing our former (wrong) solution of supplying an
SbkDummyDealloc with a function object_dealloc works perfectly,
and the leakage completely vanished.
The documentation now is also corrected.
Task-number: PYSIDE-832
Change-Id: Ifc20c28172eb5663cd5e60dac52e0a43acfb626c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-838
Change-Id: I88a8c90b53757f05668782bc407e8529f6fbb3c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add QAbstractNativeEventFilter. Re-add the native event filter
functions on QWindow and QWidget, modified to return a tuple
bool/long, using a modification from PySide.
Task-number: PYSIDE-790
Change-Id: I86fef1a0c168e69fb3391cd882ea05190985384d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-487
Change-Id: Ibd984747f091ccb355881f869ed327a9dbbf5dbb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-487
Change-Id: I62c7b117d662f3111b47aa9b840b39f67ef71cac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously whenever a typesystem XML file changed, this resulted in a
full rebuild of all cpp files generated for that particular module.
This change shifts the rules of building in such a way, that files
are rebuilt only if their content has changed.
XML modifications should generally not cause full
rebuilds anymore, unless the change is in a global header.
This is achieved in the following way, assuming a binding library
"foo" added by add_library(foo ...):
1) CMake calls shiboken via add_custom_command.
2) The OUTPUT file for the command is the generated
mjb_rejected_classes.log file, which serves as a timestamp
for when shiboken was last run.
3) All the generated cpp files are marked as "Generated" via the
add_custom_command BYPRODUCTS option. This allows the files
to have an older timestamp than that of an XML file, thus not
forcing constant shiboken re-execution.
4) A new custom target foo_generator is added via add_custom_target.
5) This target has a dependency on the mjb_rejected_classes.log file,
and the target itself is added as a dependency to the "foo" target.
6) Whenever "foo" is built, it will first try to build "foo_generator"
which will force the shiboken custom command to be run, which will
generate the cpp files and mjb_rejected_classes.txt file.
The BYPRODUCT cpp files can then be used as sources in the
"foo" target.
7) If a user modifies the XML file listed in the add_custom_command
DEPENDS option, this will re-trigger shiboken execution, which
will create a new mjb_rejected_classes.log file, which means that
the "foo" target might be rebuilt if, and only if, any of the cpp
file timestamps are new. Otherwise "foo" doesn't need to be
rebuilt.
Change-Id: I9a3844a2fa775106288acc01cb4570a903e16991
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to some unknown determinism, sometimes the type indices written
to the generated module header file have a slightly different order,
which means that many cpp files need to be rebuilt for no reason
(semantically the content of the header file does not change).
Make sure to sort the class list by type indices, to try and make
the generated header file as deterministic as possible.
This is a pre-requisite for improved incremental builds.
Change-Id: Ie6a334453cdbfbb601fbac4b6be9291a746650f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a change in preparation for improved incremental builds,
where modifying one typesystem XML file will not force rebuilding
all generated cpp files.
The previous logic was incorrect, file timestamps should not
be updated if the generated files are unchanged, instead the build
rules need to be adapted to prevent unnecessary rebuilds.
Change-Id: Ia47f8ff1970e974d0e617b6891ab58666da3b1ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt 5 introduces a new class QMetaObjectBuilder for generating dynamic
meta objects for use cases like QML. It provides an API to add methods,
properties and info and a factory method toMetaObject() to obtain
a QMetaObject snapshot reflecting the changes.
Replace the DynamicQMetaObject aggregated by TypeUserData by a class
MetaObjectBuilder wrapping a QMetaObjectBuilder with dirty-handling.
The code to create the binary data of the QMetaObject can then be
removed.
For plain Qt objects, the wrapped base meta object will be returned
(which fixes the bug).
Task-number: PYSIDE-784
Change-Id: Id8a54570aff36c75fe0f3bf2d297a12d02cd773a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a snippet attribute to inject-code and conversion-rule
instructing shiboken to extract code from a source file using
annotations.
Task-number: PYSIDE-834
Change-Id: I576c4a48fe68e9d26fe46e324af5baa88a5c1d34
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This removes the need to copy around test files and the test
will also run when launched from a different directory.
Extend and fix the declare_test() CMake macro to also add resource
files, add .qrc files and modify the tests accordingly.
Task-number: PYSIDE-834
Change-Id: Id469e0b11837f7c6a7d71a20494ac019a32d8ed0
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ensure the diff/dry-run options work for this file as well. Move the
touchFile() utility around and adapt the verifyDirectoryFor() helper
to take a string.
Task-number: PYSIDE-834
Change-Id: Ic34b5f8eff304d9de85f60082f582f0537805cd4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Some warnings are multiline (function modification).
Change-Id: I34db1b15cd0122576e65122c0665d8b4987781fc
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix the exclusion of QCborStreamReader::readStringChunk(char*,qsizetype)
for 32/64bit depending on qsizetype.
Change-Id: I7cd16fc83508c4ad04c2bb5e8b433c4933fef13c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A couple of comments were outdated, and there was
mixed information related to PySide, PySide2 and Qt for Python.
Task-number: PYSIDE-691
Change-Id: I34c17822fc09e9027ee1c0a082ed9a27a5154996
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This includes the latest pyside_tool changes
Change-Id: I6daed548a3bf0c73a880e9b7115f84ae967668d0
Fixes: PYSIDE-837
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I2468031ecb8cc8a97bcb8ddf85e48101ec22eda9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The pointers of probe_tp_name and check->tp_name are different
when using the MSVC debug runtime. Use strcmp() instead.
Fixes: PYSIDE-835
Change-Id: I8b6735a9a407bf3325986edd61a7911964802a24
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
objects
Add helpers with overloads to reduce reinterpret_cast<> and
increase type safety.
Task-number: PYSIDE-784
Change-Id: I334fd7d149a6730094b062dd0371b9a29379d725
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If a GUI class happens to be detected unreferenced when garbage
collecting in a non-GUI thread and is subsequently deleted, crashes
can occur for QWidgets and similar classes.
The hitherto unimplemented delete-in-main-thread" attribute should be
used.
Add the missing implementation. Add the field to shiboken's type entry
and SbkObjectTypePrivate class and pass it via newly introduced flags
to introduceWrapperType().
Defer the deletion when invoked from the background thread and store
the list of destructors in a list in binding manager run by
Py_AddPendingCall().
Task-number: PYSIDE-743
Task-number: PYSIDE-810
Change-Id: Id4668a6a1e32392be9dcf1229e1e10c492b2a5f5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Actually this creates 3 wheel packages:
- shiboken2 (the python module and libshiboken shared library)
- shiboken2-generator (contains the generator executable, libclang and
dependent Qt libraries)
- PySide2 (the PySide2 modules and Qt shared libraries, and tools like
rcc, uic)
Calling the setup.py script will not do the actual build now (in the
sense of calling CMake, make, etc.). Instead it will spawn new
processes (via subprocess.call) calling the same setup.py script,
but with different arguments. These "sub-invocations" will do the
actual building. Thus, the "top-level invocation" will decide which
packages to build and delegate that to the "sub-invocations" of
setup.py.
A new optional command line argument is introduced called
"--build-type" which defaults to "all", and can also be set to
"shiboken2", "shiboken2-generator" and "pyside2". A user can choose
which packages to build using this option. The "top-level invocation"
uses this option to decide how many "sub-invocations" to execute.
A new command line argument called "--internal-build-type"
takes the same values as the one above. It defines which package
will actually be built in the new spawned "sub-invocation" process.
The "top-level invocation" sets this automatically for each
"sub-invocation" depending on the value of "--build-type".
This option is also useful for developers that may want to debug the
python building code in the "sub-invocation".
Developers can set this manually via the command line, and
thus avoid the process spawning indirection.
A new class Config is introduced to facilitate storage of
the various state needed for building a single package.
A new class SetupRunner is introduced that takes care of the
"--build-type" and "--internal-build-type" argument handling
and delegation of "sub-invocations".
A new class Options is introduced to 'hopefully', in the future, streamline
the mess of option handling that we currently have.
setup.py now is now simplified to mostly just call
SetupRunner.run_setup().
Certain refactorings were done to facilitate further clean-up of the
build code, the current code is definitely not the end all be all.
Various other changes that were needed to implement the wheel
separation:
- a new cmake_helpers directory is added to share common cmake
code between packages.
- the custom popenasync.py file is removed in favor of using
subprocess.call in as many places as possible, and thus
avoid 10 different functions for process creation.
- Manifest.in is removed, because copying to the setuptools
build dir is now done directly by prepare_packages functions.
- because prepare_packages copies directly to the setuptools
build dir, avoiding the pyside_package dir, we do less copying
of big Qt files now.
- versioning of PySide2 and shiboken2 packages is now separate.
shiboken2 and shiboken2-generator share the same versions for
now though.
- shiboken2 is now listed as a required package for PySide2, to
facilitate pip requirements.txt dependencies.
- coin_build_instructions currently needs to install an unreleased
version of wheel, due to a bug that breaks installation of
generated wheel files.
- added separate command line options to pyside2_config.py for
shiboken2-module and shiboken2-generator.
- adapted samplebinding and scriptableapplication projects due to
shiboken being a separate package.
- adapted pyside2-tool and shiboken2-tool python scripts for setup
tools entry points.
- made some optimizations not to invoke cmake for shiboken2-generator
when doing a top-level "all" build.
- fixed unnecessary rpaths not to be included on Linux (mainly the
Qt rpaths).
Task-nubmer: PYSIDE-749
Change-Id: I0336043955624c1d12ed254802c442608cced5fb
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With the extended signature API, it is now possible to create
different layouts, depending on the usecase.
The "layout" module defines the layouts which we will need
and also implements the variable signature generation.
Task-number: PYSIDE-510
Task-number: PYSIDE-795
Change-Id: I5b9f88d9feb92cc4c8dc0e212860b6eb4fc16484
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the preparation for a number of planned applications
and extensions using the signature module.
This general overhaul contains:
- Extraction of signature enumerations into enum_sigs.py,
- a list of current keyword errors in arguments which are unsolved
in shiboken, but temporarily fixed in parser.py (too many for XML),
- fix spurious duplications in multiple signatures
- corrections for keyword errors in function names which cannot be
fixed by Python (quite few),
- fixing "..." arguments into "*args",
- supporting the "slot wrapper" type. This is necessary for
methods like "__add__", "__mul__" etc.
- Create an extra function "get_signature" that has a parameter to
modify the appearance, i.e. without self, without returntype, etc.
Task-number: PYSIDE-510
Change-Id: If16f7bf02c6e7cbbdc970058bb630ea4db2b854a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The signature extension has been around for a while.
As more and more demands arise, the quality of the generated
signatures becomes more demanding:
All signatures seem quite correct in PySide. But when testing
the shiboken signatures, some weird results occurred.
It turned out that nested classes were correctly handled by
the code generator, but the produced signatures were quite
wrong. Example:
Before the patch: sample.ValueIdentity.multiplicator()->int
After the patch: sample.Photon.ValueIdentity.multiplicator()->int
This quirk becomes an issue, because now signatures are
replacing the internally generated TypeError messages.
Task-number: PYSIDE-510
Task-number: PYSIDE-795
Change-Id: I16a26ecc2a2d384cb3184144d3934b2606723d53
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The test was written when PySide2 did not have the
"from PySide2 import *" feature. It was written with "try..except"
constructs to find the translated modules.
This did not work correctly due to the path settings in ctest.
When not all modules are selected, they are still partially importable!
For instance, PySide2.QtPrintSupport could be imported, although
it was not compiled, and then complained since a function was not found.
This is possible, because python 3 supports module directories without
an __init__.py file. (I was always against that "feature".)
Instead of adjusting the path setting, this patch uses the above feature
and does not rely on "importability".
Task-number: PYSIDE-331
Change-Id: I9aed4971f10f423918525cf411fd7ff713f40e48
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is in fact a struct. Amends 7127a16f53fdadc709d234abf83d7fadfdf3aba7.
Fixes:
warning: class 'QMetaObject' was previously declared as a struct [-Wmismatched-tags]
Change-Id: I3ed3d17706123f3649ac6e889080c5ab095f7e07
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I577ca66e0bd92cfedd060b46f4946963eb91f991
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The new clang compiler version complains when the "register" keyword
is still used. This patch suppresses this warning for Python.
The file "typespec.h" was corrected to include skbpython.h, too.
This was found after a few warnings still did not vanish.
Change-Id: I1e3299f071c6dffee4cb2596415bc195264d9a9b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove unused #include directives, group by libpyside, libshiboken,
Qt, C++ and sort alphabetically with the exception of sbkpython.h
which sanitizes the "slot" defines and needs to go to the top when
used). Add the module to the Qt classes.
Change-Id: I33d912135bad928d3073a1ddeb487de237d6a45e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Find the AbstractMetaEnum belonging to the type entry and perform some
checks. Generally do not use int for public enums. Warn when a
protected scoped enum is encountered as this cannot be converted.
Task-number: PYSIDE-817
Change-Id: I02b566093b331ea2ea627bf72964aad0a1a51c83
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ied37d22fbd8277811aaea15af0018cec545814c7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Query the feature properties of the configure system to check whether
a class is present instead of running a compile test in QtGui and
QtNetwork.
Remove the macro invocation from QtWigets since the results
(QtWidgets_OPTIONAL_SRC, QtWidgets_DROPPED_ENTRIES) were not used.
Change-Id: I06e03fe1eef85f2340ab4cdb130b8b31b08f7f14
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the AbstractMetaBuilder, change the list of enums into a QHash with the type entry as key
since that is mostly used for searching. Streamline and simplify
the search functionality accordingly.
Task-number: PYSIDE-817
Change-Id: I205cad1f90bc26511ea6b6e9b76ddb1bae544cf1
Reviewed-by: Christian Tismer <tismer@stackless.com>
|