Skip to content

Commit

Permalink
Fix qt6 compatibility in test
Browse files Browse the repository at this point in the history
(cherry picked from commit 0ead32e)
  • Loading branch information
nyalldawson committed Nov 25, 2024
1 parent c15b362 commit 2b7499f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/test_qgscategorizedsymbolrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,8 @@ def test_to_sld(self):
# this category should NOT be included in the SLD, as it would otherwise result
# in an invalid se:rule with no symbolizer element
symbol_which_is_empty_in_sld = createFillSymbol()
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.NoBrush)
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.NoPen)
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.BrushStyle.NoBrush)
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.PenStyle.NoPen)
renderer.addCategory(QgsRendererCategory(None, symbol_which_is_empty_in_sld, 'empty', True, '4'))

dom = QDomDocument()
Expand Down
4 changes: 2 additions & 2 deletions tests/src/python/test_qgsgraduatedsymbolrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ def test_to_sld(self):
# this category should NOT be included in the SLD, as it would otherwise result
# in an invalid se:rule with no symbolizer element
symbol_which_is_empty_in_sld = createFillSymbol()
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.NoBrush)
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.NoPen)
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.BrushStyle.NoBrush)
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.PenStyle.NoPen)
renderer.addClassRange(
QgsRendererRange(25.5, 26.5, symbol_which_is_empty_in_sld, 'd', False, '2'))

Expand Down
4 changes: 2 additions & 2 deletions tests/src/python/test_qgsrulebasedrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def test_to_sld(self):
# this rule should NOT be included in the SLD, as it would otherwise result
# in an invalid se:rule with no symbolizer element
symbol_which_is_empty_in_sld = createFillSymbol()
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.NoBrush)
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.NoPen)
symbol_which_is_empty_in_sld[0].setBrushStyle(Qt.BrushStyle.NoBrush)
symbol_which_is_empty_in_sld[0].setStrokeStyle(Qt.PenStyle.NoPen)
root_rule.appendChild(
QgsRuleBasedRenderer.Rule(symbol_which_is_empty_in_sld, filterExp='"something"=3', label="label c", description="rule c"))

Expand Down

0 comments on commit 2b7499f

Please sign in to comment.