Skip to content
Permalink
Browse files
Avoid some "" literals and QString::nulls in layer API
Use QString() instead
  • Loading branch information
nyalldawson committed Apr 10, 2017
1 parent de62c4e commit 9dabb9dd2026cadde0433f1b4cba1e07fe526b3a
Showing with 6 additions and 6 deletions.
  1. +2 −2 python/core/qgsmaplayer.sip
  2. +1 −1 python/core/qgsvectorlayer.sip
  3. +2 −2 src/core/qgsmaplayer.h
  4. +1 −1 src/core/qgsvectorlayer.h
@@ -55,7 +55,7 @@ class QgsMapLayer : QObject
PluginLayer
};

QgsMapLayer( QgsMapLayer::LayerType type = VectorLayer, const QString &name = QString::null, const QString &source = QString::null );
QgsMapLayer( QgsMapLayer::LayerType type = VectorLayer, const QString &name = QString(), const QString &source = QString() );
%Docstring
Constructor for QgsMapLayer
\param type layer type
@@ -1005,7 +1005,7 @@ Set whether layer is valid or not - should be used in constructor.
%End


void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = "" );
void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = QString() );
%Docstring
Read custom properties from project file.
\param layerNode note to read from
@@ -316,7 +316,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
RemoveFromSelection,
};

QgsVectorLayer( const QString &path = QString::null, const QString &baseName = QString::null,
QgsVectorLayer( const QString &path = QString(), const QString &baseName = QString(),
const QString &providerLib = "ogr", bool loadDefaultStyleFlag = true );
%Docstring
Constructor - creates a vector layer
@@ -98,7 +98,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
* \param name display name for the layer
* \param source datasource of layer
*/
QgsMapLayer( QgsMapLayer::LayerType type = VectorLayer, const QString &name = QString::null, const QString &source = QString::null );
QgsMapLayer( QgsMapLayer::LayerType type = VectorLayer, const QString &name = QString(), const QString &source = QString() );

virtual ~QgsMapLayer();

@@ -885,7 +885,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
/** Read custom properties from project file.
\param layerNode note to read from
\param keyStartsWith reads only properties starting with the specified string (or all if the string is empty)*/
void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = "" );
void readCustomProperties( const QDomNode &layerNode, const QString &keyStartsWith = QString() );

//! Write custom properties to project file.
void writeCustomProperties( QDomNode &layerNode, QDomDocument &doc ) const;
@@ -392,7 +392,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* \param loadDefaultStyleFlag whether to load the default style
*
*/
QgsVectorLayer( const QString &path = QString::null, const QString &baseName = QString::null,
QgsVectorLayer( const QString &path = QString(), const QString &baseName = QString(),
const QString &providerLib = "ogr", bool loadDefaultStyleFlag = true );


0 comments on commit 9dabb9d

Please sign in to comment.