diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-08-21 08:18:20 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-08-21 08:18:20 +0200 |
commit | d9225ff6dd397af9558a882de2a33a981e994a53 (patch) | |
tree | dd60ba6b8ac7397b347aebc4e801d37c9028e4df /sources/pyside2/tests/QtCore/qslot_object_test.py | |
parent | b33f0c3708c16821a846013d28ca600863003b3e (diff) | |
parent | 3a7856eb4b129449da8fd3c9b7185a4cb2d9cc68 (diff) |
Merge remote-tracking branch 'origin/5.14' into dev
Change-Id: I7cec8ab37a9ab0186b16ec0324f971b07d59ef75
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() |