Skip to content

Commit

Permalink
Fix failing TestQgsJsonUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 2, 2019
1 parent 3c6c0ac commit 6248bb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions python/core/auto_generated/qgsjsonutils.sip.in
Expand Up @@ -114,6 +114,7 @@ defined.
.. versionadded:: 3.6
%End


bool attributeDisplayName() const;
%Docstring
Returns whether original names of attributes or aliases are printed.
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsjsonutils.h
Expand Up @@ -108,7 +108,7 @@ class CORE_EXPORT QgsJsonExporter
* defined.
* \since QGIS 3.6
*/
void setAttributeDisplayName( bool displayName ) { mAttributeDisplayName = displayName; };
void setAttributeDisplayName( bool displayName ) { mAttributeDisplayName = displayName; }

/**
* Returns whether original names of attributes or aliases are printed.
Expand Down
1 change: 1 addition & 0 deletions tests/src/python/test_qgsjsonutils.py
Expand Up @@ -745,6 +745,7 @@ def testExportFieldAlias(self):
source.setFieldAlias(1, "alias_fldint")

exporter = QgsJsonExporter()
exporter.setAttributeDisplayName(True)
exporter.setVectorLayer(source)

expected = """{
Expand Down

0 comments on commit 6248bb8

Please sign in to comment.