aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest/qvariant_test.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2024-02-13 18:18:37 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-03-05 13:37:13 +0100
commitfb0270f39de6ed190a114b8b87afe9ba9b4d93b1 (patch)
treef145ca0d2e2e61aac463f789df3a45f088e64ea8 /sources/pyside6/tests/pysidetest/qvariant_test.py
parentd985296478c053202e41999bcb1826cf055652b1 (diff)
Enum: Move special Flag patch into a snippet
A patch that corrects Qt.Modifier and Qt.KeyboardModifier causes early loading of QtCore.Qt . Move the patch into snippets, running it only when needed. Task-number: PYSIDE-1735 Task-number: PYSIDE-2404 Change-Id: I26cc7aa767d5474bf54a22fbad24fae62daafa5f Pick-to: 6.6 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/tests/pysidetest/qvariant_test.py')
-rw-r--r--sources/pyside6/tests/pysidetest/qvariant_test.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/sources/pyside6/tests/pysidetest/qvariant_test.py b/sources/pyside6/tests/pysidetest/qvariant_test.py
index 8b789b2c7..faefc8169 100644
--- a/sources/pyside6/tests/pysidetest/qvariant_test.py
+++ b/sources/pyside6/tests/pysidetest/qvariant_test.py
@@ -11,9 +11,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1]))
from init_paths import init_test_paths
init_test_paths(True)
-from testbinding import TestObject, TestQVariantEnum, QVariantHolder
+from testbinding import TestObject, TestQVariantEnum
from PySide6.QtCore import Qt, QKeyCombination
-from PySide6.QtGui import QKeySequence, QAction, QMatrix3x3
+from PySide6.QtGui import QKeySequence, QAction
from helper.usesqapplication import UsesQApplication
@@ -26,8 +26,8 @@ class PyTestQVariantEnum(TestQVariantEnum):
return Qt.Orientation.Vertical
def channelingEnum(self, rval_enum):
- return (isinstance(rval_enum, enum.Enum) and
- rval_enum == Qt.Orientation.Vertical)
+ return (isinstance(rval_enum, enum.Enum)
+ and rval_enum == Qt.Orientation.Vertical)
class QVariantTest(UsesQApplication):
@@ -43,8 +43,6 @@ class QVariantTest(UsesQApplication):
QAction().setShortcut(Qt.CTRL | Qt.AltModifier | Qt.Key_B)
QAction().setShortcut(QKeySequence(QKeyCombination(Qt.CTRL | Qt.Key_B)))
QKeySequence(Qt.CTRL | Qt.Key_Q)
- # Issues a warning but works as well
- QKeySequence(Qt.CTRL + Qt.Key_Q)
def testEnum(self):
# Testing C++ class
@@ -64,15 +62,6 @@ class QVariantTest(UsesQApplication):
# check toInt() conversion for IntEnum
self.assertEqual(PyTestQVariantEnum.getNumberFromQVarEnum(Qt.GestureType.TapGesture), 1)
- def testMatrixTemplates(self):
- holder = QVariantHolder()
- matrix = QMatrix3x3()
- matrix.setToIdentity()
- holder.setValue(matrix)
- returned = holder.value()
- self.assertTrue(returned, QMatrix3x3)
- self.assertTrue(returned.isIdentity())
-
if __name__ == '__main__':
unittest.main()