Skip to content

Commit

Permalink
fixes: HIG guidelines, sipify, initialize, doxygen warnings
Browse files Browse the repository at this point in the history
fix doxygen warning + docs

sipify

fix doxygen warning

initialize
  • Loading branch information
3nids authored and nyalldawson committed Sep 14, 2018
1 parent c776746 commit 4cdf0a2
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion python/core/auto_generated/qgsmaplayer.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ record in the users style table in their personal qgis.db)
.. seealso:: :py:func:`also`
%End

virtual QString loadNamedStyle( const QString &uri, bool &resultFlag /Out/, StyleCategories categories = QgsMapLayer::AllStyleCategories );
virtual QString loadNamedStyle( const QString &uri, bool &resultFlag /Out/, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
%Docstring
Retrieve a named style for this layer if one
exists (either as a .qml file on disk or as a
Expand All @@ -806,6 +806,7 @@ record in the users style table in their personal qgis.db)
key matches the URI.
:param resultFlag: a reference to a flag that will be set to false if
we did not manage to load the default style.
:param categories: the style categories to be loaded.

:return: a QString with any status messages

Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsvectorlayer.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ Delete a style from the database
%End

virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/, bool loadFromLocalDb,
StyleCategories categories = QgsMapLayer::AllStyleCategories );
QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
%Docstring
Load a named style from file/local db/datasource db

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayerloadstyledialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class APP_EXPORT QgsVectorLayerLoadStyleDialog : public QDialog, private Ui::Qgs
void deleteStyleFromDB();

private:
QgsVectorLayer *mLayer;
QgsVectorLayer *mLayer = nullptr;
QString mSelectedStyleId;
QString mSelectedStyleName;
int mSectionLimit = 0;
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsvectorlayersavestyledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ QgsVectorLayerSaveStyleDialog::QgsVectorLayerSaveStyleDialog( QgsVectorLayer *la
mFileWidget->setFilter( type == QgsVectorLayerProperties::QML ? tr( "QGIS Layer Style File (*.qml)" ) : tr( "SLD File (*.sld)" ) );
updateSaveButtonState();
} );
mStyleTypeComboBox->addItem( tr( "as QGIS QML style file" ), QgsVectorLayerProperties::QML );
mStyleTypeComboBox->addItem( tr( "as SLD style file" ), QgsVectorLayerProperties::SLD );
mStyleTypeComboBox->addItem( tr( "As QGIS QML style file" ), QgsVectorLayerProperties::QML );
mStyleTypeComboBox->addItem( tr( "As SLD style file" ), QgsVectorLayerProperties::SLD );
if ( mLayer->dataProvider()->isSaveAndLoadStyleToDatabaseSupported() )
mStyleTypeComboBox->addItem( tr( "in database (%1)" ).arg( providerName ), QgsVectorLayerProperties::DB );
mStyleTypeComboBox->addItem( tr( "In database (%1)" ).arg( providerName ), QgsVectorLayerProperties::DB );

// Save to DB setup
connect( mDbStyleNameEdit, &QLineEdit::textChanged, this, &QgsVectorLayerSaveStyleDialog::updateSaveButtonState );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayersavestyledialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class QgsVectorLayerSaveStyleDialog : public QDialog, private Ui::QgsVectorLayer
void readUiFileContent( const QString &filePath );

private:
QgsVectorLayer *mLayer;
QgsVectorLayer *mLayer = nullptr;;
QString mUiFileContent;
};

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ bool QgsMapLayer::loadNamedPropertyFromDatabase( const QString &db, const QStrin
}


QString QgsMapLayer::loadNamedStyle( const QString &uri, bool &resultFlag, StyleCategories categories )
QString QgsMapLayer::loadNamedStyle( const QString &uri, bool &resultFlag, QgsMapLayer::StyleCategories categories )
{
return loadNamedProperty( uri, PropertyType::Style, resultFlag, categories );
}
Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsmaplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,11 @@ class CORE_EXPORT QgsMapLayer : public QObject
* key matches the URI.
* \param resultFlag a reference to a flag that will be set to false if
* we did not manage to load the default style.
* \param categories the style categories to be loaded.
* \returns a QString with any status messages
* \see also loadDefaultStyle ();
*/
virtual QString loadNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, StyleCategories categories = QgsMapLayer::AllStyleCategories );
virtual QString loadNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );

/**
* Retrieve a named style for this layer from a sqlite database.
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* \param categories the style categories to be loaded.
*/
virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag SIP_OUT, bool loadFromLocalDb,
StyleCategories categories = QgsMapLayer::AllStyleCategories );
QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );

/**
* Calls loadNamedStyle( theURI, resultFlag, false );
Expand Down

0 comments on commit 4cdf0a2

Please sign in to comment.