Skip to content

Commit

Permalink
improve deleteStyleFromDatabase signature
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrocha committed Jan 31, 2017
1 parent 8e989c1 commit e649280
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/core/qgsvectorlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
/**
* Will delete the named style corresponding to style id provided from the database
*/
virtual bool deleteStyleFromDatabase( const QString& styleId, QString &msgError /Out/ );
virtual bool deleteStyleFromDatabase( const QString& styleId, QString &msgError );

/**
* Load a named style from file/local db/datasource db
Expand Down
6 changes: 4 additions & 2 deletions tests/src/python/test_provider_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,11 +686,13 @@ def testStyle(self):
self.assertTrue(qml.startswith('<!DOCTYPE qgis'), qml)
self.assertEqual(errmsg, "")

res, errmsg = vl.deleteStyleFromDatabase("100")
errmsg = ''
res = vl.deleteStyleFromDatabase("100", errmsg)
self.assertTrue(res)
self.assertEqual(errmsg, "")

res, errmsg = vl.deleteStyleFromDatabase("1")
errmsg = ''
res = vl.deleteStyleFromDatabase("1", errmsg)
self.assertTrue(res)
self.assertEqual(errmsg, "")

Expand Down

0 comments on commit e649280

Please sign in to comment.