| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Considering we are not compatible with Python 2 anymore,
we can drop the 'object' explicit inheritance in the class
declaration.
Pick-to: 6.8
Change-Id: Iac3a95aa9721c3ff1a755f457c0936ca157a8470
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
| |
As unearthed by the whitespace change.
Pick-to: 6.8
Change-Id: I58c1a38c3c4a9c91719131d7950950ddf475872b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.8
Change-Id: I1a5964463f703ade0657816cb974206355a5ae5b
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Many modules were imported but unused in our tests.
Additionally, some type hint issues were solved.
Pick-to: 6.8
Change-Id: Ic2368690e9a6ce0fffea812206185aa4f3dc3c58
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The new enums still support old syntax by the forgiveness mode.
Nevertheless, when using mypy to check files, strict correctness
is enforced.
We correct a large number of forgiveness-induced errors,
but there is still a whole lot of other complaints to fix.
Task-number: PYSIDE-2846
Change-Id: If566187d268ef75bc09b8d86f73d2c7d19f284f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Port the test class to use UsesQApplication which keeps one instance.
Pick-to: 6.7
Task-number: PYSIDE-2810
Change-Id: Ice5fe122ba0f9b357f10582addf87890890de9d3
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
| |
Add a future statement to all Python source files.
Task-number: PYSIDE-2786
Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the typical pattern ported from C++
dialog = QDialog(mainWin)
dialog.exec()
one would expected the dialog to be deleted. However,
due to the constructor heuristics creating a parent-child
relationship, the dialog leaks. Add a modification
to remove the relationship in case exec() is called.
Change-Id: Ibc6f8c150cbd80a4085af4a5b713ee7c2c62abf3
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
| |
The test is crashing on Windows due to a missing import.
Pick-to: 6.6 6.5
Change-Id: Iec366a236c72185b2768c4d08a4eb2b7c982e237
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
|
| |
Mostly spacing related.
Pick-to: 6.6
Change-Id: I748a8a06f456c5d4bafb94c397c43b3b2ee9e3e9
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Builtin types no longer have tp_dict set. We need to
use PyType_GetDict, instead. This works without Limited API
at the moment.
With some great cheating, this works with Limited API, too.
We emulate PyType_GetDict by tp_dict if that is not 0.
Otherwise we create an empty dict.
Some small changes to Exception handling and longer
warm-up in leaking tests were found, too.
Pick-to: 6.6 6.5 6.2
Task-number: PYSIDE-2230
Change-Id: I8a56de6208ec00979255b39b5784dfc9b4b92def
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.
Task-number: QTBUG-105718
Task-number: QTBUG-88621
Change-Id: I98bd2e80f182d8bf7aef6b633f37a428e2dac69b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
| |
|
|
|
|
|
|
| |
Makes navigation with Qt Creator easier.
Change-Id: I40c6bc641faddcdbd265d6e886c2f3bd3b271be5
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In QFormLayout::getItemPosition() on the C++ side, *rolePtr is not set
if row == -1, in which case on the Python side this gets converted to a
random value outside the enum range. Fix this by setting *rolePtr to a
default value in the glue code.
Pick-to: 6.2 6.3
Change-Id: I0c67c771ed017f14b211fa6ccf9c89706152d214
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
The struct TakeRowResult was not explicitly declared in the
typesystem, leaving out some QFormLayout functions like
QFormLayout::takeRow(...).
Fixes: PYSIDE-1312
Pick-to: 6.2 6.3
Change-Id: I77577cb54ff9cca56435b62c4848832e79f575f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Force the named arguments code to be generated for constructors of
QObject-derived classes in QtWidgets.
Fixes: PYSIDE-1986
Change-Id: Ibc04959091c55a51aa77021f71786ff927f78fb3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the new forgiveness, all the "normal" uses of old enums
are working with the new enums, too.
What does not work are range violations and inheritance of enums
from other enums.
Also, the implemented trick does not work for enums which
do not belong to a class. The induced bugs are easy to find,
because they should normally break at import time.
[ChangeLog][PySide6] The new forgiveness mode of Python enums
allows to use old enum code, most of the time. Much changed
test code was reverted.
Change-Id: I9c081831309f1b2358fe86e6107b0f4d78fd48cf
Pick-to: 6.3
Task-number: PYSIDE-1735
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by a
SPDX-License-Identifier. Files that have to be modified by hand are
modified. License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These tests are now completely identical to the old tests
and have an adapted Python Enum version if suitable.
Both versions can be selected once at runtime.
Having both test versions available as a runtime option
is a nice feature that really helps understanding the
consequences of the PyEnum move.
[ChangeLog][PySide6] The QEnum tests are enabled for both the
old Qt Enums and the new Python Enums.
Change-Id: I78a7473f4a86f8d2115acc56e4ed11cf135eb000
Pick-to: 6.3
Task-number: PYSIDE-1735
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
Helps for hierarchies that do not have virtual destructors where the
default typeid(t).name() does not work (QStyleOption).
Pick-to: 6.3
Fixes: PYSIDE-1909
Change-Id: I9ce3769a8c3550d011023597eede0ae6f8c9ad68
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the changes in Qt6 related to moving QAction completely to
QtGui, the 'on-demand' functions associated to QMenu were not properly
exposed.
This patch manually adds setMenu()/menu() using QObject's.
A simple test case was added.
[ChangeLog] QAction.setMenu() and QAction.menu() were implemented.
Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Pick-to: 6.2
Fixes: PYSIDE-1627
Change-Id: Ib8102a9cf513ee2e13ff71751b1167ca0146af31
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change 108d82d2ca5323652a50706b37f829b9f0457367 introduced a regression
that when enum is passed to a QVariant and that QVariant is processed
from C++, it does not work as expected.
This patch handles the case of enum, separately for the function under
consideration.
Pick-to: 6.2
Task-number: PYSIDE-1870
Change-Id: I5d002cb36f23d8763de737578af7b52d8259a306
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These ten errors could be removed.
There were more GC calls needed.
Sometimes, calling GC twice did the trick.
We are now at 14 core errors, 18 in total :)
Task-number: PYSIDE-1843
Task-number: PYSIDE-535
Change-Id: Iafb3f93682639ba28e5326f3b8cdebf6670a7b69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Add gc.collect().
Task-number: PYSIDE-535
Task-number: PYSIDE-1843
Change-Id: Ia52e53a42cb6fa266dfabcec607fb3391eb9d22a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many QtWidgets tests do not require classes from QtWidgets any
more due to splitting out the QtGui module and moving further
classes into it. Move the tests to the proper module.
As a drive by, move some misplaced tests from QtGui into QtCore or
QtWidgets, respectively.
Pick-to: 6.2
Change-Id: Ib995ce6556fceff4eb8ec8ac9b25680834a2426f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, the conversion from QVariant->enum in Shiboken was
same as the conversion from QVariant->int. So, the user will have to
explicitly convert the returned integer to the original enum type.
With this patch, an enum type is considered as an Object type rather
than an int type. This enables the enum type to be considered as itself.
Added tests for all conversions of QVariant types.
Pick-to: 6.2
Fixes: PYSIDE-1798
Change-Id: I18acc08e1f59ac7df844444d0ad6950e1d70ab21
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the new context manager is in place, most of
the examples benefit from moving QPainter into a
`with` statement.
The comments concerning PyPy could be removed, again.
[ChangeLog][PySide6] The examples are updated to use the new
context manager for QPainter.
Task-number: PYSIDE-535
Change-Id: Idf7e1f734d549ed663383ffbb2416297ebb1e0c7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Context managers existed in Python since 2005 (PEP 343).
They were invented to support resource management for
different Python implementations that cannot rely on
immediate object destruction.
PyPy is the first alternate Python implementation
that can run PySide. QPainter does not work in PyPy
without an explicit end() call. For convenience, we
supply a context manager that handles this. Like in
file I/O, we now prefer instead of
painter = QPainter(paintable)
the new indented form
with QPainter(paintable) as painter:
[ChangeLog][PySide6] QPainter has become a context manager.
Using a with statement saves the need to call painter.end() .
Task-number: PYSIDE-535
Change-Id: Ib8bebbe121dc08334d31c9663a1e5bc8042c3b62
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
This will be replaced by a context manager, soon.
Also, begin and end should not simply return a boolean
but raise an exception when something serious broke.
Task-number: PYSIDE-535
Change-Id: Ieb2f845a01105381aab539e04b964de7a551d739
Pick-to: 6.2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Seven tests create an RPython: NotImplemented error that needs
fixing in PyPy. We skip the error until solved, but keep an entry
in blacklist.txt in order to not forget about the fact.
This brings the error count from 30 down to 23.
Task-number: PYSIDE-535
Change-Id: I36c8d3e3e4b5b24508bae884a392f976c41964da
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
Start a timer to close the window as soon as paintEvent()
is called instead of waiting.
Pick-to: 6.2
Change-Id: Id7a0e1123e148bdc8ba142ccbe0ff9d7a02c77dd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
| |
There is no need to show a widget here.
Pick-to: 6.2
Change-Id: I914e6c43ca398cf9fffd27d2f182c8ad47c9a0f6
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In PyPy, types cannot simply be patched. It would be
quite some effort to derive extra heap types for that.
Instead, we use `get_signature()` for all tests, which
has the same effect.
Task-number: PYSIDE-535
Change-Id: I8d9e4adcfc33231d0cd96260feaf2b205bef9a18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
After qtbase/851ed6f0b1014e5acabdc1f977979841d16ecc31, calling
QCoreApplication::quit() no longer terminates QDialog::exec() when not
in QCoreApplication::exec(). This means, TimedQApplication can no
longer be used to terminate the test. Add a timer that closes dialogs
instead.
Task-number: QTBUG-98088
Task-number: QTBUG-98239
Pick-to: 6.2
Change-Id: I3fa26f063a83fd1afeee557e8b6d3d250ec46ec6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PyPy has a major difference when it comes to distinguish
PyCFunction and PyFunction/PyMethod. PyCFunction is not
differentiated in PyPy and its handling collapses with
PyMethod handling.
A simple way to emulate the difference is by a redefinition
that uses a check for __module__, that does not exist for
builtins.
Observation: There are quite a number of false callbacks in
Qt that create wrong notifications. Before this error was fixed,
these errors were reported by the error handler. When handled
correctly, these spurious notifications are ignored, again.
The effect of this change is very good:
76 errors left instead of 99.
[ChangeLog][shiboken6] The override handling for PyPy was fixed
because PyPy has a different understanding of builtin functions.
Task-number: PYSIDE-535
Change-Id: I7d7419135a50df9a540e953b75890ca2ec28993c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In PyPy, the __del__ method is only triggered
reliably by calling gc.collect()
Also, the del statement does a deletion from the namespace,
but the real deletion happens when gc.collent() is called.
This was applied to all tests which use del, regardless if
it has a visible effect on PyPy or not. It turned out to
save more 8 errors, which is great.
Task-number: PYSIDE-535
Change-Id: I6a58d90629c9eafec7307c17f021251113b3c7f2
Pick-to: 6.2
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
QObject::property() returns a QVariant for whose type a shiboken
converter is retrieved by name (QVariant::typeName()). This fails for
QFlags types since QVariant::typeName() returns the fully expanded
name QFlag<Enum>. Register the flags converter under that name, too,
to fix this.
Pick-to: 6.2
Fixes: PYSIDE-1673
Change-Id: I23e83da34b82196d76b78fa44f67647da65737c8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Terminating the application via closing the last window
only works when the window was actually shown.
Add a call to show() and reformat code.
Pick-to: 6.2
Task-number: QTBUG-97033
Change-Id: I1e0a82d1baf1676de5a38c1a8fd2408e104b464a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
| |
Fixes: PYSIDE-1650
Change-Id: I05926888aa4de8c3a34c712ed2000ba59e524833
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
[ChangeLog][PySide6] Tests which use reference counting
need to be skipped in upcoming PyPy builds.
Task-number: PYSIDE-535
Change-Id: I5dca3257d3dc40f53e9b4e4a69e24c07938047c2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the major problems are solved in
py3.10-prep: re-implement zip import
py3.10-prep: reset the type cache after feature switching
py3.10-prep: Fix parser.py for changed typing module
, there are only some minor changes left to do. One thing
is still not clear:
* Unsolved: In time_test.py, the last two tests work but
crash at shutdown.
It is not yet clear if this is a PySide or Python error.
This will crash Python 3.10 if not solved until the release.
[ChangeLog][PySide6] Support Python 3.10. This is by 99% solved.
Looking for a crash with unknown origin.
Fixes: PYSIDE-1436
Change-Id: I94cffa7ed16a2651e09924fe5babc188b1b4c2b8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Wherever possible/useful, os.fspath was removed and the
according pathlike modification inserted. This is still
not the awaited end of the conversion, but a good step
forward.
Task-number: PYSIDE-1499
Pick-to: 6.1
Change-Id: I0a22ddeec06ada05dc4a97ed104d06f5f1bbf472
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When this method is used in Qt/C++, the argument gets internally cast
to a QKeyCombination if it is a QKey, but in Python land this is not
automatically covered.
A workaround was for the users to manually cast the QKey, but this
adds an extra step to achieve the same.
This patch adds a new method to QAction and QAbstractButton to use
setShortcut with a QKey as an argument.
Pick-to: 6.1
Change-Id: I9e9ebe16a65cb5aeb26a367faecbbbd414d80e03
Fixes: PYSIDE-907
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
| |
Add a porting note.
Pick-to: 6.1
Change-Id: I4ccb1dc2a3a5925e55e94e7f3d23b1fb199afe4a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
| |
Change-Id: I0868f70d7dfeafa7762296da5aa6efc2f32fcb5e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
| |
Change-Id: I9b0ad08839bf1246620c557ec304dfa90882907b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
| |
Change-Id: Id0a6c5e67f53623cc6d41ccc377218479931ee65
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
| |
Change-Id: I6dac1f54152fecab7af6831bc3c813a016408aae
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
| |
Change-Id: If4e1d64af662b1802f2f748121bda5488a82235a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
| |
Change-Id: I52f92326fdd903078cce5b6408d96d742bfa42b8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|