aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtWidgets/qapp_issue_585.py
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-05-14 11:05:17 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-05-16 15:03:24 +0200
commit28c0061af6b17219ba2bda3a217b76b044e80bcd (patch)
treeda3baf5d5237d58a2e3afbbaee468e367e53ab0f /sources/pyside6/tests/QtWidgets/qapp_issue_585.py
parentf18e3a36b605ed08dab838b27460915dd18cd450 (diff)
Fix some warnings in tests
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>
Diffstat (limited to 'sources/pyside6/tests/QtWidgets/qapp_issue_585.py')
-rw-r--r--sources/pyside6/tests/QtWidgets/qapp_issue_585.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sources/pyside6/tests/QtWidgets/qapp_issue_585.py b/sources/pyside6/tests/QtWidgets/qapp_issue_585.py
index ec8a47569..1300ea4aa 100644
--- a/sources/pyside6/tests/QtWidgets/qapp_issue_585.py
+++ b/sources/pyside6/tests/QtWidgets/qapp_issue_585.py
@@ -40,15 +40,15 @@ import sys
from pathlib import Path
sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util"))
-from init_paths import init_test_paths
+from init_paths import init_test_paths # noqa: E402
init_test_paths()
-from PySide6.QtCore import QTimer
-from PySide6.QtWidgets import QApplication
+from PySide6.QtCore import QTimer # noqa: E402
+from PySide6.QtWidgets import QApplication # noqa: E402
app_instance = QApplication([])
# If the following line is commented, application doesn't crash on exit anymore.
app_instance2 = app_instance
-QTimer.singleShot(0, qApp.quit)
-app_instance.exec_()
+QTimer.singleShot(0, qApp.quit) # noqa: F821
+app_instance.exec()