diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-08-19 09:01:29 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-08-19 22:09:52 +0200 |
commit | 3a7856eb4b129449da8fd3c9b7185a4cb2d9cc68 (patch) | |
tree | dd60ba6b8ac7397b347aebc4e801d37c9028e4df /sources/pyside2/tests/QtCore/qslot_object_test.py | |
parent | 29ab4674dc90c216ab17c7a8022f529f9a46eef7 (diff) | |
parent | cb93ce335cda4b8a8214350b157c55f0c80062d9 (diff) |
Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"
Diffstat (limited to 'sources/pyside2/tests/QtCore/qslot_object_test.py')
-rw-r--r-- | sources/pyside2/tests/QtCore/qslot_object_test.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sources/pyside2/tests/QtCore/qslot_object_test.py b/sources/pyside2/tests/QtCore/qslot_object_test.py index b8d5513ff..7a2691a06 100644 --- a/sources/pyside2/tests/QtCore/qslot_object_test.py +++ b/sources/pyside2/tests/QtCore/qslot_object_test.py @@ -31,7 +31,10 @@ import unittest from PySide2 import QtCore -global qApp +""" +This is a simple slot test that was updated to use the qApp "macro". +It is implicitly in builtins and does not need an import. +""" class objTest(QtCore.QObject): @@ -41,21 +44,15 @@ class objTest(QtCore.QObject): self.ok = False def slot(self): - global qApp - self.ok = True qApp.quit() - class slotTest(unittest.TestCase): def quit_app(self): - global qApp - qApp.quit() def testBasic(self): - global qApp timer = QtCore.QTimer() timer.setInterval(100) @@ -71,6 +68,5 @@ class slotTest(unittest.TestCase): if __name__ == '__main__': - global qApp - qApp = QtCore.QCoreApplication([]) + QtCore.QCoreApplication() unittest.main() |