| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Old template typo that was transformed into a snippet.
Change-Id: I58dfcde3d7f0bf7b769d76b51fea659d98aac5ed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite the function to use keyword arguments instead of ordered
arguments. Also add error detection when required arguments are not
passed, or have a typo in them.
Adjust all the module cmake files to use keyword arguments.
Change-Id: I7bb0c6561d7dca1e7f673e29eb457da50ae5df04
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
There was still leftover code on the typesystems
but not all could be translated to snippets, so
it was replace by templates.
Task-number: PYSIDE-834
Change-Id: I7dbe2f15171ce6a60137be970312dc80622219c9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the old glue code was directly injected into
the typesystem, so it was possible to add them
as snippets.
There are still a couple of header files that will remain
there, because the include tag does not have the file/snippet
tags.
A few lines of code were modified in favor of "modern" C++,
and good practices.
Task-number: PYSIDE-834
Change-Id: I3072298b16d7280550c6a7f6abae045250663ba6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a main template file that hosts most of the
code-templates we use in the typesystems, but there
were still several templates written in each module-typesystem
file.
The templates that are used on different typesystem
are now placed in:
sources/pyside2/PySide2/templates/core_common.xml
Additionally, the templates used only by a certain module,
are placed next to it, e.g.:
sources/pyside2/PySide2/templates/widgets_common.xml
Some simple templates were moved to the snippets files too.
Task-number: PYSIDE-799
Change-Id: I4f355cf2ae983aba9e85414e910550189cd18dcb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The module-specific glue files as well as the standalone glue files
are now installed into the PySide2 package.
The glue files are now also listed as dependencies for the shiboken
generator run, which means that modifying those files will now
correctly force a shiboken re-run for the relevant modules.
Change-Id: I545c7ada379fafb7f225d0b0f5ce495bf6d4795d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to the nature of the qApp singleton,
it was not enough to add the refcount of the style
via the typesystem, as usual.
An additional step of getting a reference to the qApp
to set the parent of the style was required.
A test case was included.
Change-Id: I5e60983e961e7d3d310b1e1c2f6f9b80ee095308
Fixes: PYSIDE-861
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- codecForHtml(), mightBeRichText(), convertFromPlainText() are now
in qtextdocument.h
- QSortFilterProxyModel: using QObject::parent; is not seen by Clang
- QCoreApplication::"winEventFilter() is a left-over from Qt 4
- Member template QMetaEnum fromType() is ignored by Clang
- QGraphicsScene::drawItems() is removed a few lines above
the failing modification
Fixes:
signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found.
signature 'fromType()' for function modification in 'QMetaEnum' not found.
signature 'parent()const' for function modification in 'QSortFilterProxyModel' not found.
signature 'codecForHtml(QByteArray)' (specified as 'codecForHtml(const QByteArray&)') for function modification in 'Qt' not found.
signature 'mightBeRichText(QString)' (specified as 'mightBeRichText(const QString&)') for function modification in 'Qt' not found.
signature 'convertFromPlainText(QString,Qt::WhiteSpaceMode)' (specified as 'convertFromPlainText(const QString&,Qt::WhiteSpaceMode)') for function modification in 'Qt' not found.
signature 'drawItems(QPainter*,int,QGraphicsItem**,const QStyleOptionGraphicsItem*,QWidget*)' for function modification in 'QGraphicsScene' not found.
Change-Id: I7fcae940999890b490d0793d160c722924dea6ec
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Task-number: PYSIDE-487
Change-Id: Ib37efc4e480a978f920d3bc40756fe7abd59cb19
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\
| |
| |
| | |
Change-Id: I302543eef74bc1f3dc6340cdfab7510a66ea1b6a
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-66
Change-Id: Ifec85a5305bc196b261818bbc1b9af16fc07c927
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I5dd997d995feae2ddf207eb213fb08233dece77c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The return order was wrong, and since it is based
in templates used by other methods, a new template
needed to be created.
Task-number: PYSIDE-755
Change-Id: I905529844063f7e913f264e68cfceb6ce7b45358
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
refs/staging/dev
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While trying to document the Limited API Project,
it suddenly struck me:
We can make the patch much much simpler and implement it
without the necessity to have an extra PepType!
Now I am happy to continue the documentation, because
it is now no more improvable.
This version will last as long as the layout of
PyTypeObject does not change substantially. When that
happens, then we need to rewrite stuff with the according
PyType_GetSlot() access functions.
These access functions will until then be complete enough
so that we can live without the tricks like inventing a reduced
PyTypeObject as was done in the current implementation.
Task-number: PYSIDE-560
Change-Id: I49849cc377baa6794a5b53292691e21d6e2853ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|/
|
|
|
| |
Task-number: PYSIDE-743
Change-Id: Ic9827a7a460db639c4316bbf4f06561007704476
|
|
|
|
|
|
|
|
|
|
| |
This is the condensed checkin of 18 commits which created
the implementation of PEP 384.
Task-number: PYSIDE-560
Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
When no arguments are passed, build an empty list
and to start a QCoreApplication, QApplication and
QGuiApplication.
This is a small effort to include the idea
of a default parameter from Python.
Change-Id: Ieedc1e7ee17de996778aa2d0bddfb88c5ef208cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-487
Change-Id: Ib862be9c0c62be09a34c3a79740d147b9788cb34
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Add QScroller, QScrollerProperties, QAccessibleWidget
Task-number: PYSIDE-487
Change-Id: Ia0322715bd494c5f4102ed1180eb92eb49b441f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removing the word 'project' from all the headers,
and changing the PySide reference from the examples
to Qt for Python:
The following line was used inside the source/ and
build_scripts/ directory:
for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done
and the following line was used inside the examples/ directory:
for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done
Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting owner as default to not allow Python to create a copy
of the QPixmap associated with the QLabel.
The C++ object pointer is acquired through the pixmap() method.
A test case was included.
Task-number: PYSIDE-150
Change-Id: Ie6975c39cbf49a59ebd478db0e1a0c30fc14864a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
When referring to the project one should use "Qt for Python"
and for the module "PySide2"
Change-Id: I36497df245c9f6dd60d6e160e2fc805e48cefcae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
| |
Change-Id: I2d41bb92335bcbd2300da29b793ce0529e57960a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reimplementing a class must respect the closest
base class instead of falling back to QObject.
By adding a default-superclass argument one can
verify that field first when shiboken is getting
the base classes.
This problem was found by reimplementing
QGraphicsObject including methods from one of its parent
classes, QGraphicsItem.
With this change, the generated wrapper will list all the
base classes in `Sbk_QGraphicsObject_Type_bases` leaving
QObject at the end, because if not, it will match
inmediately.
A test case was included.
This change doesn't affect other existing tests.
Task-number: PYSIDE-86
Change-Id: I6b9a220497b12c8085302a502f8581cc2d3fb11b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
| |
When using setHeader on a QTreeView,
the view needs to take ownership of the header object.
Task-number: PYSIDE-227
Change-Id: Ib37c00c098be422c7f0df4a32a6795c267642a41
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When new widgets were added to a QTreeWidget
the ownership was not being transferred.
This problem happened when the Widget was being
build inside the method call.
When trying to show owner-less Widgets inside the
Tree, a segfault happened.
A test case was added.
Task-number: PYSIDE-73
Change-Id: I0f1c3c065ae8ed0a336c8e39b1766f3e8870b54d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After setting an item delegate for columns and rows
in classes that inherit from QAbstractItemView (like QTreeView)
the reference was not kept, causing a segfault.
This was solved by keeping the reference of the object.
A test is provided.
Task-number: PYSIDE-226
Task-number: PYSIDE-219
Change-Id: I43eeb6e85a37537311d838f5abb0ee1ab10ea713
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are many inconsistencies in the associated
typesystem files that complement the binding generation,
this is a first attempt to try to standardize it.
Just Qt Coding Style were applied (when possible).
In the future the process to access and manipulate
Shiboken objects must also be standardized.
Change-Id: Ida57d1630a893bc5b608f64119b4c8d638bb9c66
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\
| |
| |
| | |
Change-Id: I777970f7bb17db766660d82556559eadd7293355
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replacing shiboken call setParent with releaseOwnership
so Python will not delete the underlying C++ object.
A test case is provided to check that the error is not
happening.
Task-number: PYSIDE-213
Change-Id: Ic0f383c3d93b905885f76788d32d62ba37ed9d2f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As reported on PYSIDE-264, when an item of an already cleared
QListWidget was being accessed, a segfault happened when trying
to access this deleted data.
Due to the lack of an invalidation process of the python objects
when clear() was called, the generated validation step before accessing
the data had no effect.
This was solved injecting code to set their parents to NULL, and
invalidating them.
The outcome of trying to access deleted data then will be a RuntimeError,
instead of a segfault.
A test case is provided.
Task-number: PYSIDE-264
Change-Id: If52dd85827500c96a078a8f9d61921a275fb28f9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Removing depth and Mode from tests.
assertEqual instead of assertTrue.
Change-Id: I9f0f04a460790b65af264c58ab65f248ae207e81
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Modify the typesystem.xml files such that all dependent files
are loaded via module (for example, QtCore/typesystem_core.xml).
As a result, it is no longer necessary to add each dependent directory
to the typesystem path; it is sufficient to pass the binary and source
path of PySide2 and the source directory of the Qt module only.
This requires rewriting the dependency checking for --reuse-build
so that it loops over the source directories of the dependent
Qt modules.
Change-Id: Ib234c2673f4ee93cc8a3282fac69bcfcfaebd0ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I94cb5a7dab97cff3591bac534228bfd3e3ad5938
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For short the new features:
- there is a qApp in QtCore, QtGui and QtWidgets for compatibility,
and also in __builtins__ for a true macro-like experience.
- if you delete any qApp variable, the Q*Application is reset and you can
start over.
Long description:
There is a qApp macro in Qt5 which is equivalent to Q*Application.instance() .
Python does not have macros. Both PyQt5 and PySide2 have an
according structure in QtWidgets. In the case of PySide2, the qApp
variable is first initialized to None and later to QApplication().
This does not reflect the original sense of the qApp macro, because
- it only handles QApplication,
- it does not handle destruction.
This "macro" should live in QtCore, but both PyQt5 and PySide2 decided
to put this in QtWidgets. As a compromize, I propose to put qApp into
all three modules, and into __builtins__ as well, so wherever you
create an application, you find this "macro" in place.
While changing the code, I stumbled over the template
set_qapp_parent_for_orphan. I tried to make sense out of it and finally
removed it. There were no side effects but bug PYSIDE-85 is gone, now.
With some extra effort, I created a singleton qApp that changes itself.
This way, a true macro was simulated. Note that this was not possible
with a garbage collected variable, and I had to make shiboken aware of this.
As the final optimization, I turned qApp also into a fuse variable:
Delete any qApp variable and Q*Application will finish when there is
no extra reference.
Task-number: PYSIDE-85
Task-number: PYSIDE-571
Change-Id: I7a56b19858f63349c98b95778759a6a6de856938
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Q*Application had PySequence as Parameter, although
only QStringList is accepted. That resulted in an implausible error
message when a list of, say, Integers was given.
This patch
- replaces PySequence by QStringList (one more tuple layer),
- fixes QCoreApplication to give the same kind of error messages,
- renames the shiboken function sequenceToArgcArgv to listToArgcArgv
and changes it to only allow list descendents.
We also changed signature.typing in one line to display List[str] correctly.
I think this belongs more to PySide-331, a fixed qApp.
Task-number: PYSIDE-510
Task-number: PYSIDE-331
Change-Id: Ib256c6a2db05a3db826454e1bf1b4729d59a240b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|/
|
|
|
|
|
|
|
|
| |
In AbstractMetaBuilder, no longer change array types like "int[]"
to "int*".
Task-number: PYSIDE-354
Task-number: PYSIDE-516
Change-Id: Ia9e15ae3fca895bf179275eb31a94323d91f4941
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
The printing classes were moved to QtPrintSupport module, and the
remaining classes are always present in their respective modules.
Change-Id: I2e0ec061efc28c89f0476829541a7d2d3f01877f
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
| |
Also include the optional QtNetwork sources, so that QSsl* class
bindings are properly generated.
Thus the optional QtWidgets and QtNetwork classes should be picked up.
Change-Id: Id4d21dc577f2b551dce83999be76cdfd9d0b88d2
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
in preparation for a subtree merge.
this should not be necessary to do in a separate commit, but git is a
tad stupid about following history correctly without it.
|