aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2020-02-11 11:27:54 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-09-22 12:33:21 +0200
commit20b96311b5bca6978f72d0bf3a4ea774e98ebb76 (patch)
tree3f5871a62ec692f285e37acacbd8fe5b9f1e1dca /sources/pyside2/tests
parent936cc4c72e2393ed59e05dca1100150d88b52645 (diff)
Add QColorConstants namespace
The colors inside the namespace are defined: constexpr Q_DECL_UNUSED QColor Black {QColor::Rgb, 0xff * 0x101, 0x00 * 0x101, 0x00 * 0x101, 0x00 * 0x101}; Fixes: PYSIDE-1224 Change-Id: I84ba5fae74e336ab01b3bac467c8fc6e2b45d14b Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/tests')
-rw-r--r--sources/pyside2/tests/QtGui/qcolor_test.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/pyside2/tests/QtGui/qcolor_test.py b/sources/pyside2/tests/QtGui/qcolor_test.py
index 55554b6c5..22955d86e 100644
--- a/sources/pyside2/tests/QtGui/qcolor_test.py
+++ b/sources/pyside2/tests/QtGui/qcolor_test.py
@@ -37,7 +37,7 @@ init_test_paths(False)
import PySide2
from PySide2.QtCore import Qt
-from PySide2.QtGui import QColor
+from PySide2.QtGui import QColor, QColorConstants
class QColorGetTest(unittest.TestCase):
@@ -115,7 +115,8 @@ class QColorCopy(unittest.TestCase):
class QColorRepr(unittest.TestCase):
def testReprFunction(self):
- c = QColor(100, 120, 200)
+ # QColorConstants are disabled for MSVC/5.15, fixme: Check Qt 6
+ c = QColorConstants.Yellow if sys.platform != 'win32' else QColor(100, 120, 200)
c2 = eval(c.__repr__())
self.assertEqual(c, c2)