Skip to content

Commit

Permalink
use default QString() constructor instead of ""
Browse files Browse the repository at this point in the history
improve doxygen docs
  • Loading branch information
alexbruy committed Nov 2, 2016
1 parent 75b23cb commit dac03d5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions python/core/raster/qgscolorrampshader.sip
Expand Up @@ -42,6 +42,7 @@ class QgsColorRampShader : QgsRasterShaderFunction

/** \brief Get the original color ramp name
* @note added in QGIS 3.0
* @see setColorRampName()
*/
QString colorRampName() const;

Expand All @@ -53,6 +54,7 @@ class QgsColorRampShader : QgsRasterShaderFunction

/** \brief Set the source color ramp name
* @note added in QGIS 3.0
* @see colorRampName()
*/
void setColorRampName( const QString& theName );

Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgscolorrampshader.cpp
Expand Up @@ -34,8 +34,8 @@ QgsColorRampShader::QgsColorRampShader( double theMinimumValue, double theMaximu
, mLUTOffset( 0.0 )
, mLUTFactor( 1.0 )
, mLUTInitialized( false )
, mColorRampName( QString() )
, mClip( false )
, mColorRampName( "" )
{
QgsDebugMsgLevel( "called.", 4 );
}
Expand Down
2 changes: 2 additions & 0 deletions src/core/raster/qgscolorrampshader.h
Expand Up @@ -77,6 +77,7 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction

/** \brief Get the original color ramp name
* @note added in QGIS 3.0
* @see setColorRampName()
*/
QString colorRampName() const {return mColorRampName;}

Expand All @@ -88,6 +89,7 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction

/** \brief Set the source color ramp name
* @note added in QGIS 3.0
* @see colorRampName()
*/
void setColorRampName( const QString& theName );

Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrastershader.cpp
Expand Up @@ -170,7 +170,7 @@ void QgsRasterShader::readXml( const QDomElement& elem )
if ( !colorRampShaderElem.isNull() )
{
QgsColorRampShader* colorRampShader = new QgsColorRampShader();
colorRampShader->setColorRampName( colorRampShaderElem.attribute( "colorRampName", "" ) );
colorRampShader->setColorRampName( colorRampShaderElem.attribute( "colorRampName", QString() ) );
colorRampShader->setColorRampType( colorRampShaderElem.attribute( QStringLiteral( "colorRampType" ), QStringLiteral( "INTERPOLATED" ) ) );
colorRampShader->setClip( colorRampShaderElem.attribute( QStringLiteral( "clip" ), QStringLiteral( "0" ) ) == QLatin1String( "1" ) );

Expand Down

0 comments on commit dac03d5

Please sign in to comment.