Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SIP QgsVectorLayer: fix signatures for output parameter
saveStyleToDatabase() and getStyleFromDatabase() should define errMsg as
output parameter
And loadNamedStyle() also for theResultFlag.
  • Loading branch information
rouault committed Oct 25, 2016
1 parent af236c4 commit e237963
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions doc/api_break.dox
Expand Up @@ -1438,6 +1438,9 @@ displayExpression instead. For the map tip use mapTipTemplate() instead.</li>
<li>Removed fieldNameIndex(), use fields().lookupField() or fields().indexFromName() instead
<li>Renamed addAttributeAlias() to setFieldAlias()
<li>Renamed remAttributeAlias() to removeFieldAlias()
<li>saveStyleToDatabase(): msgError argument is correctly declared as output argument
<li>getStyleFromDatabase(): msgError argument is correctly declared as output argument
<li>loadNamedStyle(): theResultFlag argument is correctly declared as output argument
</ul>

\subsection qgis_api_break_3_0_QgsVectorLayerEditBuffer QgsVectorLayerEditBuffer
Expand Down
10 changes: 5 additions & 5 deletions python/core/qgsvectorlayer.sip
Expand Up @@ -662,11 +662,11 @@ class QgsVectorLayer : QgsMapLayer
* @param description
* @param useAsDefault
* @param uiFileContent
* @param msgError
* @param msgError (out)
*/
virtual void saveStyleToDatabase( const QString& name, const QString& description,
bool useAsDefault, const QString& uiFileContent,
QString &msgError );
QString &msgError /Out/ );

/**
* Lists all the style in db split into related to the layer and not related to
Expand All @@ -682,21 +682,21 @@ class QgsVectorLayer : QgsMapLayer
/**
* Will return the named style corresponding to style id provided
*/
virtual QString getStyleFromDatabase( const QString& styleId, QString &msgError );
virtual QString getStyleFromDatabase( const QString& styleId, QString &msgError /Out/ );

/**
* Load a named style from file/local db/datasource db
* @param theURI the URI of the style or the URI of the layer
* @param theResultFlag will be set to true if a named style is correctly loaded
* @param loadFromLocalDb if true forces to load from local db instead of datasource one
*/
virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag, bool loadFromLocalDb );
virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag /Out/, bool loadFromLocalDb );

/**
* Calls loadNamedStyle( theURI, theResultFlag, false );
* Retained for backward compatibility
*/
virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag );
virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag /Out/ );

/** Read the symbology for the current layer from the Dom node supplied.
* @param node node that will contain the symbology definition for this layer.
Expand Down

0 comments on commit e237963

Please sign in to comment.