Dox and indentation updates

This commit is contained in:
Nyall Dawson 2018-06-11 11:56:19 +10:00
parent a3d6b9899b
commit ce6ea18280
3 changed files with 9 additions and 6 deletions

View File

@ -601,7 +601,7 @@ Make sure that this is only called when all layers are not in edit mode.
QgsTransactionGroup *transactionGroup( const QString &providerKey, const QString &connString );
%Docstring
Get a transaction group from a provider key and connection string.
Returns the matching transaction group from a provider key and connection string.
Returns None if a matching transaction group is not available.

View File

@ -585,7 +585,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
QMap< QPair< QString, QString>, QgsTransactionGroup *> transactionGroups() SIP_SKIP;
/**
* Get a transaction group from a provider key and connection string.
* Returns the matching transaction group from a provider key and connection string.
*
* Returns nullptr if a matching transaction group is not available.
*

View File

@ -40,16 +40,18 @@ class TestQgsPostgresTransaction(unittest.TestCase):
if 'QGIS_PGTEST_DB' in os.environ:
cls.dbconn = os.environ['QGIS_PGTEST_DB']
# Create test layer
cls.vl_b = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' table="qgis_test"."books" sql=', 'books', 'postgres')
cls.vl_a = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' table="qgis_test"."authors" sql=', 'authors', 'postgres')
cls.vl_b = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' table="qgis_test"."books" sql=', 'books',
'postgres')
cls.vl_a = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' table="qgis_test"."authors" sql=',
'authors', 'postgres')
QgsProject.instance().addMapLayer(cls.vl_b)
QgsProject.instance().addMapLayer(cls.vl_a)
cls.relMgr = QgsProject.instance().relationManager()
assert(cls.vl_a.isValid())
assert(cls.vl_b.isValid())
assert (cls.vl_a.isValid())
assert (cls.vl_b.isValid())
def startTransaction(self):
"""
@ -104,5 +106,6 @@ class TestQgsPostgresTransaction(unittest.TestCase):
self.assertIsNone(noTg)
self.rollbackTransaction()
if __name__ == '__main__':
unittest.main()