| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the loop ensuring the window is mapped introduced by
918cd72f5eaebf56287a5ab0ac2e149ba1617a57, since on Wayland, the paint
event occurs there, causing a hang. This loop is usually used to
ensure a window is in a deterministic state for playing mouse events,
etc, but for paint events it should not be required.
Skip the native event test for Wayland, too.
Change-Id: I2b44dc098873614e2b8d9bc54444917fd4905e9f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
As of 3.14, the interpreter will sometimes just borrow references and
newly created objects may have different initial reference counts.
Pick-to: 6.10 6.8
Task-number: PYSIDE-3147
Change-Id: I845460202abb95715ebf395b378b81b7790660bb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Adapt to qtbase/c5cd2dc72499b7cb8fef623aed1c8215e6957e77.
Task-number: PYSIDE-1650
Task-number: PYSIDE-3168
Change-Id: Id87857f3017b05494640653fe934e01b8cc7b8f0
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As of 3.14, the interpreter will sometimes just borrow references and
newly created objects may have different initial reference counts. Fix
the test cases where a base ref count of a new object is compared
against.
Pick-to: 6.9 6.8
Task-number: PYSIDE-3147
Change-Id: I698be2309362fc65f6727971a5cec4fc4f40cf2e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
| |
Change-Id: I3eae10ca459eae88632357ae5334c93fa2d0254f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.9 6.8
Change-Id: Idff689832a68fadf6c4492032df3ed94b9343389
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.9 6.8
Change-Id: Ibcd0ee3190638ac224c6dd770de0dffe93ed9dda
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Move it from QtGui to QtWidgets, completely. Use pathlib.
Use a temporary directory to avoid clobbering the source
directory.
Pick-to: 6.9
Change-Id: Id73b87ea81a1b334e2506cb2e32b49e70a5b007d
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
It does not really test anything and just slows down test
execution.
Pick-to: 6.9 6.8
Change-Id: Idd84f22e261eca089c346d0ff2e5e406eb9effd1
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Ece Cinucen <ece.cinucen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Use the timer logic introduced for qfontdialog to close the dialog.
Reduces test time from 0.984s to 0.073s.
Pick-to: 6.9 6.8
Change-Id: I5ac1dd8da9f2b814ccea4ea9a8fddb03395620c9
Reviewed-by: Ece Cinucen <ece.cinucen@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Disable native dialogs and add a timer closing the widget opened by
the static getFont() function. With that. the test can enabled.
Pick-to: 6.9 6.8
Change-Id: Iee9b0a341aa13527f5edcb10fd2188d111cee841
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Ece Cinucen <ece.cinucen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The check has been failing since Qt 5, probably due to some changed
deletion sequence, but was never caught since it is in a slot. Fixes:
Traceback (most recent call last):
File "sources/pyside6/tests/QtWidgets/bug_576.py", line 26, in onButtonDestroyed
self.assertTrue(isinstance(button, QPushButton))
Pick-to: 6.9
Change-Id: Ibf09ba315f05ac4f457ecb856ed476bc96a6c090
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Qt.Orientation was passed when emitting
QHeaderView.sortIndicatorChanged(int,Qt.SortOrder), causing a
warning:
_pythonToCppCopy: Cannot copy-convert 0x7f87761442c0 (Orientation) to C++.
Pass the right type and check.
Pick-to: 6.9 6.8
Change-Id: If74037c2a00c017a40c826cabd62ec381b2c4431
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The check needs to be more fine-grained since
Shiboken::ObjectType::getOriginalName() returns
"QGraphicsObject*" for Python-derived classes, also.
Amends f81fb9ee887d088e8988d743bb7cac4f781fff82.
Pick-to: 6.9
Fixes: PYSIDE-3115
Task-number: PYSIDE-3069
Change-Id: I4589ec85075e712ed1c66acfce257ff41d965ec4
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Fix exec_ and deprecated QMenu.addAction() overloads.
Fix warnings about inactive QPainter in bug_919.py.
Pick-to: 6.9
Change-Id: I483190480ca5b467bd070c3239f78166e6de3a51
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the default-superclass specification QGraphicsItem for
QGraphicsObject since it causes the type discovery to directly cast
from QGraphicsObject* to QGraphicsItem*. This crashes
since QGraphicsObject inherits from QObject as first base class.
The intention of the class attribute was to ensure that any
QGraphicsObject class is stored as a QGraphicsItem. To preserve this,
hardcode it in QVariant_resolveMetaType().
Pick-to: 6.9
Fixes: PYSIDE-3069
Task-number: PYSIDE-86
Task-number: PYSIDE-1887
Change-Id: I3704988f105b118b1e4ef8d078b68c01ba89386c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Call qApp->quit() delayed from the paint event. This fixes crashes on
macOS and warnings:
QBackingStore::flush() called for QWidgetWindow(0x600003a22460, name="MyWidgetClassWindow") which does not have a handle.
Pick-to: 6.8
Change-Id: I2e5d8aa1cfc36c4c247f681b4219f52c1a618737
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
As a drive-by fix flake errors.
Pick-to: 6.8
Task-number: PYSIDE-1735
Change-Id: I9829b011fee78fc8edd1aefdd3066ae89e63644b
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|