Skip to content
Permalink
Browse files

Rewrite some signals to new-style

  • Loading branch information
m-kuhn committed Mar 14, 2016
1 parent 90e0cb9 commit 567643005050c27c58d3074a36ec6a3035860612
Showing with 6 additions and 10 deletions.
  1. +1 −0 .gitignore
  2. +1 −2 tests/src/python/test_qgsrasterlayer.py
  3. +4 −8 tests/src/python/test_qgsvectorlayer.py
@@ -1,6 +1,7 @@
*.*~
*.autosave
*.aux
*.bak
*.diff
*.log*
*.orig
@@ -223,8 +223,7 @@ def test_setRenderer(self):
layer = QgsRasterLayer(myPath, myBaseName)

self.rendererChanged = False
QObject.connect(layer, SIGNAL("rendererChanged()"),
self.onRendererChanged)
layer.rendererChanged.connect(self.onRendererChanged)

rShader = QgsRasterShader()
r = QgsSingleBandPseudoColorRenderer(layer.dataProvider(), 1, rShader)
@@ -942,8 +942,7 @@ def test_setBlendMode(self):
layer = createLayerWithOnePoint()

self.blendModeTest = 0
QObject.connect(layer, SIGNAL("blendModeChanged( const QPainter::CompositionMode )"),
self.onBlendModeChanged)
layer.blendModeChanged.connect(self.onBlendModeChanged)
layer.setBlendMode(QPainter.CompositionMode_Screen)

assert self.blendModeTest == QPainter.CompositionMode_Screen
@@ -953,8 +952,7 @@ def test_setFeatureBlendMode(self):
layer = createLayerWithOnePoint()

self.blendModeTest = 0
QObject.connect(layer, SIGNAL("featureBlendModeChanged( const QPainter::CompositionMode )"),
self.onBlendModeChanged)
layer.featureBlendModeChanged.connect(self.onBlendModeChanged)
layer.setFeatureBlendMode(QPainter.CompositionMode_Screen)

assert self.blendModeTest == QPainter.CompositionMode_Screen
@@ -1058,8 +1056,7 @@ def test_setLayerTransparency(self):
layer = createLayerWithOnePoint()

self.transparencyTest = 0
QObject.connect(layer, SIGNAL("layerTransparencyChanged( int )"),
self.onLayerTransparencyChanged)
layer.layerTransparencyChanged.connect(self.onLayerTransparencyChanged)
layer.setLayerTransparency(50)
assert self.transparencyTest == 50
assert layer.layerTransparency() == 50
@@ -1071,8 +1068,7 @@ def test_setRendererV2(self):
layer = createLayerWithOnePoint()

self.rendererChanged = False
QObject.connect(layer, SIGNAL("rendererChanged()"),
self.onRendererChanged)
layer.rendererChanged.connect(self.onRendererChanged)

r = QgsSingleSymbolRendererV2(QgsSymbolV2.defaultSymbol(QGis.Point))
layer.setRendererV2(r)

0 comments on commit 5676430

Please sign in to comment.
You can’t perform that action at this time.