Skip to content

Commit 7e76d36

Browse files
committed
Fix qt6 compatibility in test
(cherry picked from commit 0ead32e)
1 parent ebf54f0 commit 7e76d36

3 files changed

+6
-6
lines changed

tests/src/python/test_qgscategorizedsymbolrenderer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,8 @@ def test_to_sld(self):
939939
# this category should NOT be included in the SLD, as it would otherwise result
940940
# in an invalid se:rule with no symbolizer element
941941
symbol_which_is_empty_in_sld = createFillSymbol()
942-
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.NoBrush)
943-
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.NoPen)
942+
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.BrushStyle.NoBrush)
943+
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.PenStyle.NoPen)
944944
renderer.addCategory(QgsRendererCategory(None, symbol_which_is_empty_in_sld, 'empty', True, '4'))
945945

946946
dom = QDomDocument()

tests/src/python/test_qgsgraduatedsymbolrenderer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,8 @@ def test_to_sld(self):
586586
# this category should NOT be included in the SLD, as it would otherwise result
587587
# in an invalid se:rule with no symbolizer element
588588
symbol_which_is_empty_in_sld = createFillSymbol()
589-
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.NoBrush)
590-
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.NoPen)
589+
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.BrushStyle.NoBrush)
590+
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.PenStyle.NoPen)
591591
renderer.addClassRange(
592592
QgsRendererRange(25.5, 26.5, symbol_which_is_empty_in_sld, 'd', False, '2'))
593593

tests/src/python/test_qgsrulebasedrenderer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def test_to_sld(self):
5555
# this rule should NOT be included in the SLD, as it would otherwise result
5656
# in an invalid se:rule with no symbolizer element
5757
symbol_which_is_empty_in_sld = createFillSymbol()
58-
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.NoBrush)
59-
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.NoPen)
58+
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.BrushStyle.NoBrush)
59+
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.PenStyle.NoPen)
6060
root_rule.appendChild(
6161
QgsRuleBasedRenderer.Rule(symbol_which_is_empty_in_sld, filterExp='"something"=3', label="label c", description="rule c"))
6262

0 commit comments

Comments
 (0)