Skip to content
Permalink
Browse files

improve deleteStyleFromDatabase signature

  • Loading branch information
jgrocha committed Jan 31, 2017
1 parent 8e989c1 commit e64928060170927e0a8ed351fb5bc357405547ac
Showing with 5 additions and 3 deletions.
  1. +1 −1 python/core/qgsvectorlayer.sip
  2. +4 −2 tests/src/python/test_provider_postgres.py
@@ -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
@@ -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, "")

0 comments on commit e649280

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