diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-19 19:08:27 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-22 15:27:19 +0100 |
commit | 5bea8c440e5d64106102ad5a202220c016bb3964 (patch) | |
tree | 4fd80e661f51caad0d308746d6b17f4e843a5b86 /sources/shiboken6/tests/samplebinding | |
parent | a10efb90f048764527c1d26bc0362c6db8f4234e (diff) |
shiboken6: Fix comparison operators in namespaces
Change qtbase/e7fd9a9f4ab1fcc017174d6d7760c731857b89fc introduced some
mixed flag operators in Qt which caused compile errors. They should be
ignored by traverseOperatorFunction() since they cannot be attributed
to any class, but traverseOperatorFunction() was only called for the
global namespace. Fix by calling it for operator functions in
namespaces as well.
Task-number: QTBUG-99948
Pick-to: 6.2
Change-Id: I57419563f10f1a0d33aea027a166119f969bca5d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/tests/samplebinding')
-rw-r--r-- | sources/shiboken6/tests/samplebinding/sample_test.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/samplebinding/sample_test.py b/sources/shiboken6/tests/samplebinding/sample_test.py index ec97658c8..660a3cd3d 100644 --- a/sources/shiboken6/tests/samplebinding/sample_test.py +++ b/sources/shiboken6/tests/samplebinding/sample_test.py @@ -80,6 +80,11 @@ class ModuleTest(unittest.TestCase): self.assertEqual(sample.countVarargs(1, 2), 1) self.assertEqual(sample.countVarargs(1, 2, 3, 'a', 'b', 4, (5, 6)), 6) + def testSampleComparisonOpInNamespace(self): + s1 = sample.sample.sample(10) + s2 = sample.sample.sample(10) + self.assertEqual(s1, s2) + def testConstant(self): self.assertEqual(sample.sample.INT_CONSTANT, 42) |