Skip to content
Permalink
Browse files

Fix more warnings

  • Loading branch information
nyalldawson committed Dec 21, 2015
1 parent 483ef3c commit 013d6d3331457dc517c59a06741c9d98e634c710
Showing with 377 additions and 386 deletions.
  1. +2 −8 src/analysis/CMakeLists.txt
  2. +2 −2 src/app/CMakeLists.txt
  3. +0 −2 src/app/pluginmanager/qgspluginsortfilterproxymodel.cpp
  4. +1 −1 src/app/qgsfieldcalculator.h
  5. +0 −3 src/app/qgsvectorlayerproperties.cpp
  6. +2 −0 src/astyle/CMakeLists.txt
  7. +2 −0 src/core/CMakeLists.txt
  8. +6 −6 src/core/auth/qgsauthconfig.cpp
  9. +0 −1 src/core/auth/qgsauthcrypto.cpp
  10. +6 −6 src/core/auth/qgsauthmanager.cpp
  11. +6 −6 src/core/auth/qgsauthmethodregistry.cpp
  12. +1 −1 src/core/diagram/qgshistogramdiagram.cpp
  13. +1 −1 src/core/diagram/qgspiediagram.cpp
  14. +6 −6 src/core/effects/qgsblureffect.cpp
  15. +4 −4 src/core/effects/qgscoloreffect.cpp
  16. +4 −4 src/core/effects/qgsgloweffect.cpp
  17. +14 −14 src/core/effects/qgsimageoperation.cpp
  18. +4 −4 src/core/effects/qgspainteffect.cpp
  19. +2 −2 src/core/effects/qgsshadoweffect.cpp
  20. +1 −1 src/core/effects/qgstransformeffect.cpp
  21. +4 −4 src/core/layertree/qgslayertreemodel.cpp
  22. +5 −5 src/core/layertree/qgslayertreemodellegendnode.cpp
  23. +5 −5 src/core/qgsattributeaction.cpp
  24. +3 −3 src/core/qgsbrowsermodel.cpp
  25. +3 −3 src/core/qgsclipper.cpp
  26. +27 −27 src/core/qgscoordinatereferencesystem.cpp
  27. +10 −10 src/core/qgscoordinatetransform.cpp
  28. +2 −2 src/core/qgsdataitem.cpp
  29. +2 −2 src/core/qgsdataitemproviderregistry.cpp
  30. +2 −2 src/core/qgsdiagramrendererv2.cpp
  31. +3 −3 src/core/qgsdistancearea.cpp
  32. +2 −2 src/core/qgseditformconfig.cpp
  33. +12 −13 src/core/qgsexpression.cpp
  34. +1 −1 src/core/qgsexpressionfieldbuffer.cpp
  35. +1 −1 src/core/qgsfeatureiterator.cpp
  36. +0 −5 src/core/qgsfeaturerequest.cpp
  37. +5 −5 src/core/qgsfield.cpp
  38. +1 −1 src/core/qgsfontutils.cpp
  39. +1 −1 src/core/qgsgeometrysimplifier.cpp
  40. +3 −3 src/core/qgsgeometryvalidator.cpp
  41. +19 −19 src/core/qgslabel.cpp
  42. +5 −5 src/core/qgslabelingenginev2.cpp
  43. +1 −1 src/core/qgslogger.cpp
  44. +5 −5 src/core/qgsmaprenderer.cpp
  45. +1 −1 src/core/qgsmaprenderercache.cpp
  46. +2 −2 src/core/qgsmaprendererparalleljob.cpp
  47. +1 −1 src/core/qgsmapsettings.cpp
  48. +7 −7 src/core/qgsmaptopixelgeometrysimplifier.cpp
  49. +1 −5 src/core/qgsnetworkaccessmanager.cpp
  50. +5 −5 src/core/qgsofflineediting.cpp
  51. +1 −1 src/core/qgsogcutils.cpp
  52. +142 −142 src/core/qgspallabeling.cpp
  53. +2 −2 src/core/qgspoint.cpp
  54. +0 −1 src/core/qgspointlocator.cpp
  55. +3 −3 src/core/qgsprojectfiletransform.cpp
  56. +1 −2 src/core/raster/qgsrasterblock.cpp
  57. +1 −1 src/core/symbology-ng/qgscptcityarchive.cpp
  58. +1 −1 src/gui/qgsrasterpyramidsoptionswidget.h
  59. +4 −2 src/plugins/geometry_checker/CMakeLists.txt
  60. +4 −2 src/plugins/geometry_snapper/CMakeLists.txt
  61. +2 −0 src/plugins/georeferencer/CMakeLists.txt
  62. +4 −1 src/plugins/raster_terrain_analysis/CMakeLists.txt
  63. +0 −2 src/providers/wms/qgswmsprovider.cpp
  64. +2 −0 src/python/CMakeLists.txt
  65. +5 −3 src/server/qgsaccesscontrol.h
  66. +0 −1 tests/bench/main.cpp
  67. +2 −0 tests/src/core/CMakeLists.txt
  68. +0 −1 tests/src/providers/testqgswcspublicservers.cpp
@@ -62,16 +62,10 @@ ADD_FLEX_FILES_PREFIX(QGIS_ANALYSIS_SRCS raster raster/qgsrastercalclexer.ll)

ADD_BISON_FILES_PREFIX(QGIS_ANALYSIS_SRCS raster raster/qgsrastercalcparser.yy)

IF (PEDANTIC AND MSVC)
# disable warnings
# 4065 switch with default and no case
# 4127 conditional expression is constant
# 4702 unreachable code
SET_SOURCE_FILES_PROPERTIES(
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_BINARY_DIR}/src/analysis/qgsrastercalcparser.cpp
PROPERTIES COMPILE_FLAGS "-wd4065 -wd4127 -wd4702"
PROPERTIES COMPILE_FLAGS "-w"
)
ENDIF (PEDANTIC AND MSVC)

IF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET_SOURCE_FILES_PROPERTIES(
@@ -529,11 +529,11 @@ IF(ENABLE_MODELTEST)
ENDIF(ENABLE_MODELTEST)

IF (ANDROID)
INCLUDE_DIRECTORIES(${ANDROID_NDK_TOOLCHAIN_ROOT}/sysroot/usr/include)
INCLUDE_DIRECTORIES(SYSTEM ${ANDROID_NDK_TOOLCHAIN_ROOT}/sysroot/usr/include)
ENDIF (ANDROID)

IF (POSTGRES_FOUND)
INCLUDE_DIRECTORIES(${POSTGRES_INCLUDE_DIR})
INCLUDE_DIRECTORIES(SYSTEM ${POSTGRES_INCLUDE_DIR})
ENDIF (POSTGRES_FOUND)

#############
@@ -88,14 +88,12 @@ bool QgsPluginSortFilterProxyModel::filterByPhrase( QModelIndex &index ) const
case PLUGIN_TAGS_ROLE:
// search in tags only
return sourceModel()->data( index, PLUGIN_TAGS_ROLE ).toString().contains( filterRegExp() );
break;
case 0:
// full search: name + description + tags + author
return sourceModel()->data( index, PLUGIN_DESCRIPTION_ROLE ).toString().contains( filterRegExp() )
|| sourceModel()->data( index, PLUGIN_AUTHOR_ROLE ).toString().contains( filterRegExp() )
|| sourceModel()->data( index, Qt::DisplayRole ).toString().contains( filterRegExp() )
|| sourceModel()->data( index, PLUGIN_TAGS_ROLE ).toString().contains( filterRegExp() );
break;
default:
// unknown filter mode, return nothing
return false;
@@ -62,7 +62,7 @@ class APP_EXPORT QgsFieldCalculator: public QDialog, private Ui::QgsFieldCalcula
inline QgsField fieldDefinition()
{
return QgsField( mOutputFieldNameLineEdit->text(),
( QVariant::Type ) mOutputFieldTypeComboBox->itemData( mOutputFieldTypeComboBox->currentIndex(), Qt::UserRole ).toInt(),
static_cast< QVariant::Type >( mOutputFieldTypeComboBox->itemData( mOutputFieldTypeComboBox->currentIndex(), Qt::UserRole ).toInt() ),
mOutputFieldTypeComboBox->itemData( mOutputFieldTypeComboBox->currentIndex(), Qt::UserRole + 1 ).toString(),
mOutputFieldWidthSpinBox->value(),
mOutputFieldPrecisionSpinBox->value() );
@@ -732,7 +732,6 @@ void QgsVectorLayerProperties::loadDefaultStyle_clicked()
{
case 0:
return;
break;
case 2:
msg = layer->loadNamedStyle( layer->styleURI(), defaultLoadedFlag );
if ( !defaultLoadedFlag )
@@ -751,7 +750,6 @@ void QgsVectorLayerProperties::loadDefaultStyle_clicked()
}

return;
break;
default:
break;
}
@@ -789,7 +787,6 @@ void QgsVectorLayerProperties::saveDefaultStyle_clicked()
{
case 0:
return;
break;
case 2:
layer->saveStyleToDatabase( "", "", true, "", errorMsg );
if ( errorMsg.isNull() )
@@ -1,3 +1,5 @@
SET(ASTYLE_SRCS astyle_main.cpp ASBeautifier.cpp ASFormatter.cpp ASEnhancer.cpp ASResource.cpp)
# No warnings for astyle build
SET_SOURCE_FILES_PROPERTIES( ${ASTYLE_SRCS} PROPERTIES COMPILE_FLAGS -w )
ADD_EXECUTABLE(qgisstyle ${ASTYLE_SRCS})
SET_TARGET_PROPERTIES(qgisstyle PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/scripts)
@@ -406,6 +406,8 @@ ADD_FLEX_FILES(QGIS_CORE_SRCS qgsexpressionlexer.ll)

ADD_BISON_FILES(QGIS_CORE_SRCS qgsexpressionparser.yy)

SET_SOURCE_FILES_PROPERTIES( qgsexpressionparser.cpp PROPERTIES COMPILE_FLAGS -w )

SET(QGIS_CORE_MOC_HDRS
qgsapplication.h
qgsbrowsermodel.h
@@ -405,16 +405,16 @@ const QString QgsAuthConfigSslServer::configString() const
QStringList configlist;
configlist << QString::number( mVersion ) << QString::number( mQtVersion );

configlist << QString::number(( int )mSslProtocol );
configlist << QString::number( static_cast< int >( mSslProtocol ) );

QStringList errs;
Q_FOREACH ( const QSslError::SslError& err, mSslIgnoredErrors )
{
errs << QString::number(( int )err );
errs << QString::number( static_cast< int >( err ) );
}
configlist << errs.join( "~~" );

configlist << QString( "%1~~%2" ).arg(( int )mSslPeerVerifyMode ).arg( mSslPeerVerifyDepth );
configlist << QString( "%1~~%2" ).arg( static_cast< int >( mSslPeerVerifyMode ) ).arg( mSslPeerVerifyDepth );

return configlist.join( mConfSep );
}
@@ -432,17 +432,17 @@ void QgsAuthConfigSslServer::loadConfigString( const QString &config )

// TODO: Conversion between 4.7 -> 4.8 protocol enum differences (and reverse?).
// This is necessary for users upgrading from 4.7 to 4.8
mSslProtocol = ( QSsl::SslProtocol )configlist.at( 2 ).toInt();
mSslProtocol = static_cast< QSsl::SslProtocol >( configlist.at( 2 ).toInt() );

mSslIgnoredErrors.clear();
QStringList errs( configlist.at( 3 ).split( "~~" ) );
Q_FOREACH ( const QString& err, errs )
{
mSslIgnoredErrors.append(( QSslError::SslError )err.toInt() );
mSslIgnoredErrors.append( static_cast< QSslError::SslError >( err.toInt() ) );
}

QStringList peerverify( configlist.at( 4 ).split( "~~" ) );
mSslPeerVerifyMode = ( QSslSocket::PeerVerifyMode )peerverify.at( 0 ).toInt();
mSslPeerVerifyMode = static_cast< QSslSocket::PeerVerifyMode >( peerverify.at( 0 ).toInt() );
mSslPeerVerifyDepth = peerverify.at( 1 ).toInt();
}

@@ -28,7 +28,6 @@
#define CIPHER_IV_LENGTH 32
#define CIPHER_PROVIDER "qca-ossl"
#define PASSWORD_HASH_ALGORITHM "sha256"
#define RANDOM_KEY_LENGTH 16
#define KEY_GEN_ITERATIONS 10000
#define KEY_GEN_LENGTH 16
#define KEY_GEN_IV_LENGTH 16
@@ -774,7 +774,7 @@ const QString QgsAuthManager::uniqueConfigId() const
QTimer::singleShot( 3, &loop, SLOT( quit() ) );
loop.exec();

uint seed = ( uint ) QTime::currentTime().msec();
uint seed = static_cast< uint >( QTime::currentTime().msec() );
qsrand( seed );

while ( true )
@@ -2463,7 +2463,7 @@ bool QgsAuthManager::storeCertTrustPolicy( const QSslCertificate &cert, QgsAuthC
"VALUES (:id, :policy)" ).arg( authDbTrustTable() ) );

query.bindValue( ":id", id );
query.bindValue( ":policy", ( int )policy );
query.bindValue( ":policy", static_cast< int >( policy ) );

if ( !authDbStartTransaction() )
return false;
@@ -2502,7 +2502,7 @@ QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::getCertTrustPolicy( const QSsl
{
if ( query.first() )
{
policy = ( QgsAuthCertUtils::CertTrustPolicy )query.value( 0 ).toInt();
policy = static_cast< QgsAuthCertUtils::CertTrustPolicy >( query.value( 0 ).toInt() );
QgsDebugMsg( QString( "Authentication cert trust policy retrieved for id: %1" ).arg( id ) );
}
if ( query.next() )
@@ -2591,7 +2591,7 @@ bool QgsAuthManager::setDefaultCertTrustPolicy( QgsAuthCertUtils::CertTrustPolic
// set default trust policy to Trusted by removing setting
return removeAuthSetting( "certdefaulttrust" );
}
return storeAuthSetting( "certdefaulttrust", ( int )policy );
return storeAuthSetting( "certdefaulttrust", static_cast< int >( policy ) );
}

QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::defaultCertTrustPolicy()
@@ -2601,7 +2601,7 @@ QgsAuthCertUtils::CertTrustPolicy QgsAuthManager::defaultCertTrustPolicy()
{
return QgsAuthCertUtils::Trusted;
}
return ( QgsAuthCertUtils::CertTrustPolicy )policy.toInt();
return static_cast< QgsAuthCertUtils::CertTrustPolicy >( policy.toInt() );
}

bool QgsAuthManager::rebuildCertTrustCache()
@@ -2622,7 +2622,7 @@ bool QgsAuthManager::rebuildCertTrustCache()
while ( query.next() )
{
QString id = query.value( 0 ).toString();
QgsAuthCertUtils::CertTrustPolicy policy = ( QgsAuthCertUtils::CertTrustPolicy )query.value( 1 ).toInt();
QgsAuthCertUtils::CertTrustPolicy policy = static_cast< QgsAuthCertUtils::CertTrustPolicy >( query.value( 1 ).toInt() );

QStringList ids;
if ( mCertTrustCache.contains( policy ) )
@@ -107,7 +107,7 @@ QgsAuthMethodRegistry::QgsAuthMethodRegistry( const QString& pluginPath )
}

// get the description and the key for the auth method plugin
isauthmethod_t *isAuthMethod = ( isauthmethod_t * ) cast_to_fptr( myLib.resolve( "isAuthMethod" ) );
isauthmethod_t *isAuthMethod = reinterpret_cast< isauthmethod_t * >( cast_to_fptr( myLib.resolve( "isAuthMethod" ) ) );
if ( !isAuthMethod )
{
QgsDebugMsg( QString( "Checking %1: ...invalid (no isAuthMethod method)" ).arg( myLib.fileName() ) );
@@ -122,14 +122,14 @@ QgsAuthMethodRegistry::QgsAuthMethodRegistry( const QString& pluginPath )
}

// looks like an auth method plugin. get the key and description
description_t *pDesc = ( description_t * ) cast_to_fptr( myLib.resolve( "description" ) );
description_t *pDesc = reinterpret_cast< description_t * >( cast_to_fptr( myLib.resolve( "description" ) ) );
if ( !pDesc )
{
QgsDebugMsg( QString( "Checking %1: ...invalid (no description method)" ).arg( myLib.fileName() ) );
continue;
}

methodkey_t *pKey = ( methodkey_t * ) cast_to_fptr( myLib.resolve( "authMethodKey" ) );
methodkey_t *pKey = reinterpret_cast< methodkey_t * >( cast_to_fptr( myLib.resolve( "authMethodKey" ) ) );
if ( !pKey )
{
QgsDebugMsg( QString( "Checking %1: ...invalid (no authMethodKey method)" ).arg( myLib.fileName() ) );
@@ -156,7 +156,7 @@ QgsAuthMethodRegistry::~QgsAuthMethodRegistry()
QLibrary myLib( lib );
if ( myLib.isLoaded() )
{
cleanupAuthMethod_t* cleanupFunc = ( cleanupAuthMethod_t* ) cast_to_fptr( myLib.resolve( "cleanupAuthMethod" ) );
cleanupAuthMethod_t* cleanupFunc = reinterpret_cast< cleanupAuthMethod_t* >( cast_to_fptr( myLib.resolve( "cleanupAuthMethod" ) ) );
if ( cleanupFunc )
cleanupFunc();
}
@@ -292,7 +292,7 @@ QgsAuthMethod *QgsAuthMethodRegistry::authMethod( const QString &authMethodKey )
return nullptr;
}

classFactoryFunction_t *classFactory = ( classFactoryFunction_t * ) cast_to_fptr( myLib.resolve( "classFactory" ) );
classFactoryFunction_t *classFactory = reinterpret_cast< classFactoryFunction_t * >( cast_to_fptr( myLib.resolve( "classFactory" ) ) );
if ( !classFactory )
{
QgsDebugMsg( QString( "Failed to load %1: no classFactory method" ).arg( lib ) );
@@ -316,7 +316,7 @@ typedef QWidget * editFactoryFunction_t( QWidget * parent );
QWidget *QgsAuthMethodRegistry::editWidget( const QString &authMethodKey, QWidget *parent )
{
editFactoryFunction_t * editFactory =
( editFactoryFunction_t * ) cast_to_fptr( function( authMethodKey, "editWidget" ) );
reinterpret_cast< editFactoryFunction_t * >( cast_to_fptr( function( authMethodKey, "editWidget" ) ) );

if ( !editFactory )
return nullptr;
@@ -43,7 +43,7 @@ QSizeF QgsHistogramDiagram::diagramSize( const QgsFeature& feature, const QgsRen
return size; //zero size if no attributes
}

if ( is.upperValue - is.lowerValue == 0 )
if ( qgsDoubleNear( is.upperValue, is.lowerValue ) )
return size; // invalid value range => zero size

double maxValue = 0;
@@ -90,7 +90,7 @@ QSizeF QgsPieDiagram::diagramSize( const QgsFeature& feature, const QgsRenderCon
if ( size.width() <= s.minimumSize && size.height() <= s.minimumSize )
{
bool p = false; // preserve height == width
if ( size.width() == size.height() )
if ( qgsDoubleNear( size.width(), size.height() ) )
p = true;

size.scale( s.minimumSize, s.minimumSize, Qt::KeepAspectRatio );
@@ -86,18 +86,18 @@ QgsStringMap QgsBlurEffect::properties() const
{
QgsStringMap props;
props.insert( "enabled", mEnabled ? "1" : "0" );
props.insert( "draw_mode", QString::number( int( mDrawMode ) ) );
props.insert( "blend_mode", QString::number( int( mBlendMode ) ) );
props.insert( "draw_mode", QString::number( static_cast< int >( mDrawMode ) ) );
props.insert( "blend_mode", QString::number( static_cast< int >( mBlendMode ) ) );
props.insert( "transparency", QString::number( mTransparency ) );
props.insert( "blur_level", QString::number( mBlurLevel ) );
props.insert( "blur_method", QString::number(( int )mBlurMethod ) );
props.insert( "blur_method", QString::number( static_cast< int >( mBlurMethod ) ) );
return props;
}

void QgsBlurEffect::readProperties( const QgsStringMap &props )
{
bool ok;
QPainter::CompositionMode mode = ( QPainter::CompositionMode )props.value( "blend_mode" ).toInt( &ok );
QPainter::CompositionMode mode = static_cast< QPainter::CompositionMode >( props.value( "blend_mode" ).toInt( &ok ) );
if ( ok )
{
mBlendMode = mode;
@@ -108,13 +108,13 @@ void QgsBlurEffect::readProperties( const QgsStringMap &props )
mTransparency = transparency;
}
mEnabled = props.value( "enabled", "1" ).toInt();
mDrawMode = ( QgsPaintEffect::DrawMode )props.value( "draw_mode", "2" ).toInt();
mDrawMode = static_cast< QgsPaintEffect::DrawMode >( props.value( "draw_mode", "2" ).toInt() );
int level = props.value( "blur_level" ).toInt( &ok );
if ( ok )
{
mBlurLevel = level;
}
QgsBlurEffect::BlurMethod method = ( QgsBlurEffect::BlurMethod )props.value( "blur_method" ).toInt( &ok );
QgsBlurEffect::BlurMethod method = static_cast< QgsBlurEffect::BlurMethod >( props.value( "blur_method" ).toInt( &ok ) );
if ( ok )
{
mBlurMethod = method;
@@ -59,7 +59,7 @@ void QgsColorEffect::draw( QgsRenderContext &context )
QgsImageOperation::adjustBrightnessContrast( image, mBrightness, mContrast / 100.0 + 1 );
if ( mGrayscaleMode != QgsImageOperation::GrayscaleOff )
{
QgsImageOperation::convertToGrayscale( image, ( QgsImageOperation::GrayscaleMode ) mGrayscaleMode );
QgsImageOperation::convertToGrayscale( image, static_cast< QgsImageOperation::GrayscaleMode >( mGrayscaleMode ) );
}
QgsImageOperation::adjustHueSaturation( image, mSaturation, mColorizeOn ? mColorizeColor : QColor(), mColorizeStrength / 100.0 );

@@ -92,7 +92,7 @@ QgsStringMap QgsColorEffect::properties() const
void QgsColorEffect::readProperties( const QgsStringMap &props )
{
bool ok;
QPainter::CompositionMode mode = ( QPainter::CompositionMode )props.value( "blend_mode" ).toInt( &ok );
QPainter::CompositionMode mode = static_cast< QPainter::CompositionMode >( props.value( "blend_mode" ).toInt( &ok ) );
if ( ok )
{
mBlendMode = mode;
@@ -103,12 +103,12 @@ void QgsColorEffect::readProperties( const QgsStringMap &props )
mTransparency = transparency;
}
mEnabled = props.value( "enabled", "1" ).toInt();
mDrawMode = ( QgsPaintEffect::DrawMode )props.value( "draw_mode", "2" ).toInt();
mDrawMode = static_cast< QgsPaintEffect::DrawMode >( props.value( "draw_mode", "2" ).toInt() );

mBrightness = props.value( "brightness", "0" ).toInt();
mContrast = props.value( "contrast", "0" ).toInt();
mSaturation = props.value( "saturation", "1.0" ).toDouble();
mGrayscaleMode = ( QgsImageOperation::GrayscaleMode )props.value( "grayscale_mode", "0" ).toInt();
mGrayscaleMode = static_cast< QgsImageOperation::GrayscaleMode >( props.value( "grayscale_mode", "0" ).toInt() );
mColorizeOn = props.value( "colorize", "0" ).toInt();
if ( props.contains( "colorize_color" ) )
{
@@ -125,7 +125,7 @@ QgsStringMap QgsGlowEffect::properties() const
props.insert( "spread", QString::number( mSpread ) );
props.insert( "spread_unit", QgsSymbolLayerV2Utils::encodeOutputUnit( mSpreadUnit ) );
props.insert( "spread_unit_scale", QgsSymbolLayerV2Utils::encodeMapUnitScale( mSpreadMapUnitScale ) );
props.insert( "color_type", QString::number(( int )mColorType ) );
props.insert( "color_type", QString::number( static_cast< int >( mColorType ) ) );
props.insert( "single_color", QgsSymbolLayerV2Utils::encodeColor( mColor ) );

if ( mRamp )
@@ -139,7 +139,7 @@ QgsStringMap QgsGlowEffect::properties() const
void QgsGlowEffect::readProperties( const QgsStringMap &props )
{
bool ok;
QPainter::CompositionMode mode = ( QPainter::CompositionMode )props.value( "blend_mode" ).toInt( &ok );
QPainter::CompositionMode mode = static_cast< QPainter::CompositionMode >( props.value( "blend_mode" ).toInt( &ok ) );
if ( ok )
{
mBlendMode = mode;
@@ -150,7 +150,7 @@ void QgsGlowEffect::readProperties( const QgsStringMap &props )
mTransparency = transparency;
}
mEnabled = props.value( "enabled", "1" ).toInt();
mDrawMode = ( QgsPaintEffect::DrawMode )props.value( "draw_mode", "2" ).toInt();
mDrawMode = static_cast< QgsPaintEffect::DrawMode >( props.value( "draw_mode", "2" ).toInt() );
int level = props.value( "blur_level" ).toInt( &ok );
if ( ok )
{
@@ -163,7 +163,7 @@ void QgsGlowEffect::readProperties( const QgsStringMap &props )
}
mSpreadUnit = QgsSymbolLayerV2Utils::decodeOutputUnit( props.value( "spread_unit" ) );
mSpreadMapUnitScale = QgsSymbolLayerV2Utils::decodeMapUnitScale( props.value( "spread_unit_scale" ) );
QgsGlowEffect::GlowColorType type = ( QgsGlowEffect::GlowColorType )props.value( "color_type" ).toInt( &ok );
QgsGlowEffect::GlowColorType type = static_cast< QgsGlowEffect::GlowColorType >( props.value( "color_type" ).toInt( &ok ) );
if ( ok )
{
mColorType = type;

0 comments on commit 013d6d3

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