Skip to content
Permalink
Browse files

use default QString() constructor instead of ""

improve doxygen docs
  • Loading branch information
alexbruy committed Nov 2, 2016
1 parent 75b23cb commit dac03d5ce88ac24859823c93267354f312b5c0c8
@@ -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;

@@ -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 );

@@ -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 );
}
@@ -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;}

@@ -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 );

@@ -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" ) );

0 comments on commit dac03d5

Please sign in to comment.
You can’t perform that action at this time.