| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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.
|