Skip to content

Commit

Permalink
Fix a bunch of warnings emitted by gcc11
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 27, 2021
1 parent 8f98880 commit e2bf57e
Show file tree
Hide file tree
Showing 18 changed files with 195 additions and 192 deletions.
2 changes: 1 addition & 1 deletion external/untwine/epf/Epf.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ PointCount Epf::createFileInfo(const StringList& input, StringList dimNames,
{ {
for (std::string& d : dimNames) for (std::string& d : dimNames)
d = Utils::toupper(d); d = Utils::toupper(d);
for (const std::string& xyz : { "X", "Y", "Z" }) for (const std::string xyz : { "X", "Y", "Z" })
if (!Utils::contains(dimNames, xyz)) if (!Utils::contains(dimNames, xyz))
dimNames.push_back(xyz); dimNames.push_back(xyz);
} }
Expand Down
16 changes: 8 additions & 8 deletions src/app/3d/qgs3dapputils.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@


void Qgs3DAppUtils::initialize() void Qgs3DAppUtils::initialize()
{ {
dynamic_cast< Qgs3DSymbolMetadata * >( QgsApplication::symbol3DRegistry()->symbolMetadata( QStringLiteral( "point" ) ) )->setWidgetFunction( QgsPoint3DSymbolWidget::create ); static_cast< Qgs3DSymbolMetadata * >( QgsApplication::symbol3DRegistry()->symbolMetadata( QStringLiteral( "point" ) ) )->setWidgetFunction( QgsPoint3DSymbolWidget::create );
dynamic_cast< Qgs3DSymbolMetadata * >( QgsApplication::symbol3DRegistry()->symbolMetadata( QStringLiteral( "line" ) ) )->setWidgetFunction( QgsLine3DSymbolWidget::create ); static_cast< Qgs3DSymbolMetadata * >( QgsApplication::symbol3DRegistry()->symbolMetadata( QStringLiteral( "line" ) ) )->setWidgetFunction( QgsLine3DSymbolWidget::create );
dynamic_cast< Qgs3DSymbolMetadata * >( QgsApplication::symbol3DRegistry()->symbolMetadata( QStringLiteral( "polygon" ) ) )->setWidgetFunction( QgsPolygon3DSymbolWidget::create ); static_cast< Qgs3DSymbolMetadata * >( QgsApplication::symbol3DRegistry()->symbolMetadata( QStringLiteral( "polygon" ) ) )->setWidgetFunction( QgsPolygon3DSymbolWidget::create );


dynamic_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "null" ) ) )->setWidgetFunction( QgsNullMaterialWidget::create ); static_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "null" ) ) )->setWidgetFunction( QgsNullMaterialWidget::create );
dynamic_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "phong" ) ) )->setWidgetFunction( QgsPhongMaterialWidget::create ); static_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "phong" ) ) )->setWidgetFunction( QgsPhongMaterialWidget::create );
dynamic_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "phongtextured" ) ) )->setWidgetFunction( QgsPhongTexturedMaterialWidget::create ); static_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "phongtextured" ) ) )->setWidgetFunction( QgsPhongTexturedMaterialWidget::create );
dynamic_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "gooch" ) ) )->setWidgetFunction( QgsGoochMaterialWidget::create ); static_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "gooch" ) ) )->setWidgetFunction( QgsGoochMaterialWidget::create );
dynamic_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "simpleline" ) ) )->setWidgetFunction( QgsSimpleLineMaterialWidget::create ); static_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "simpleline" ) ) )->setWidgetFunction( QgsSimpleLineMaterialWidget::create );


QgsStyleModel::setIconGenerator( new Qgs3DIconGenerator( QgsApplication::defaultStyleModel() ) ); QgsStyleModel::setIconGenerator( new Qgs3DIconGenerator( QgsApplication::defaultStyleModel() ) );
} }
Expand Down
2 changes: 1 addition & 1 deletion src/gui/labeling/qgslabelinggui.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ bool QgsLabelingGui::eventFilter( QObject *object, QEvent *event )
{ {
if ( object == mLblNoObstacle1 ) if ( object == mLblNoObstacle1 )
{ {
if ( event->type() == QEvent::MouseButtonPress && dynamic_cast< QMouseEvent * >( event )->button() == Qt::LeftButton ) if ( event->type() == QEvent::MouseButtonPress && static_cast< QMouseEvent * >( event )->button() == Qt::LeftButton )
{ {
// clicking the obstacle label toggles the checkbox, just like a "normal" checkbox label... // clicking the obstacle label toggles the checkbox, just like a "normal" checkbox label...
mChkNoObstacle->setChecked( !mChkNoObstacle->isChecked() ); mChkNoObstacle->setChecked( !mChkNoObstacle->isChecked() );
Expand Down
4 changes: 2 additions & 2 deletions src/gui/layout/qgslayoutmousehandles.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ QPointF QgsLayoutMouseHandles::snapPoint( QPointF originalPoint, QgsLayoutMouseH


void QgsLayoutMouseHandles::createItemCommand( QGraphicsItem *item ) void QgsLayoutMouseHandles::createItemCommand( QGraphicsItem *item )
{ {
mItemCommand.reset( dynamic_cast< QgsLayoutItem * >( item )->createCommand( QString(), 0 ) ); mItemCommand.reset( static_cast< QgsLayoutItem * >( item )->createCommand( QString(), 0 ) );
mItemCommand->saveBeforeState(); mItemCommand->saveBeforeState();
} }


Expand Down Expand Up @@ -222,7 +222,7 @@ void QgsLayoutMouseHandles::expandItemList( const QList<QGraphicsItem *> &items,


void QgsLayoutMouseHandles::moveItem( QGraphicsItem *item, double deltaX, double deltaY ) void QgsLayoutMouseHandles::moveItem( QGraphicsItem *item, double deltaX, double deltaY )
{ {
dynamic_cast< QgsLayoutItem * >( item )->attemptMoveBy( deltaX, deltaY ); static_cast< QgsLayoutItem * >( item )->attemptMoveBy( deltaX, deltaY );
} }


void QgsLayoutMouseHandles::setItemRect( QGraphicsItem *item, QRectF rect ) void QgsLayoutMouseHandles::setItemRect( QGraphicsItem *item, QRectF rect )
Expand Down
2 changes: 1 addition & 1 deletion src/gui/processing/models/qgsmodelcomponentgraphicitem.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ QColor QgsModelChildAlgorithmGraphicItem::strokeColor( QgsModelComponentGraphicI


QColor QgsModelChildAlgorithmGraphicItem::textColor( QgsModelComponentGraphicItem::State ) const QColor QgsModelChildAlgorithmGraphicItem::textColor( QgsModelComponentGraphicItem::State ) const
{ {
return mIsValid ? ( dynamic_cast< const QgsProcessingModelChildAlgorithm * >( component() )->isActive() ? Qt::black : Qt::gray ) : QColor( 255, 255, 255 ); return mIsValid ? ( static_cast< const QgsProcessingModelChildAlgorithm * >( component() )->isActive() ? Qt::black : Qt::gray ) : QColor( 255, 255, 255 );
} }


QPixmap QgsModelChildAlgorithmGraphicItem::iconPixmap() const QPixmap QgsModelChildAlgorithmGraphicItem::iconPixmap() const
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ void QgsProcessingLayerOutputDestinationWidget::menuAboutToShow()
connect( actionSaveToDatabase, &QAction::triggered, this, &QgsProcessingLayerOutputDestinationWidget::saveToDatabase ); connect( actionSaveToDatabase, &QAction::triggered, this, &QgsProcessingLayerOutputDestinationWidget::saveToDatabase );
mMenu->addAction( actionSaveToDatabase ); mMenu->addAction( actionSaveToDatabase );


if ( mParameter->algorithm() && dynamic_cast< const QgsProcessingParameterFeatureSink * >( mParameter )->supportsAppend() ) if ( mParameter->algorithm() && static_cast< const QgsProcessingParameterFeatureSink * >( mParameter )->supportsAppend() )
{ {
mMenu->addSeparator(); mMenu->addSeparator();
QAction *actionAppendToLayer = new QAction( tr( "Append to Layer…" ), this ); QAction *actionAppendToLayer = new QAction( tr( "Append to Layer…" ), this );
Expand Down
4 changes: 2 additions & 2 deletions src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4966,7 +4966,7 @@ void QgsProcessingDatabaseSchemaWidgetWrapper::setParentConnectionWrapperValue(
const QString connection = value.isValid() ? QgsProcessingParameters::parameterAsConnectionName( parentWrapper->parameterDefinition(), value, *context ) : QString(); const QString connection = value.isValid() ? QgsProcessingParameters::parameterAsConnectionName( parentWrapper->parameterDefinition(), value, *context ) : QString();


if ( mSchemaComboBox ) if ( mSchemaComboBox )
mSchemaComboBox->setConnectionName( connection, dynamic_cast< const QgsProcessingParameterProviderConnection * >( parentWrapper->parameterDefinition() )->providerId() ); mSchemaComboBox->setConnectionName( connection, static_cast< const QgsProcessingParameterProviderConnection * >( parentWrapper->parameterDefinition() )->providerId() );


const QgsProcessingParameterDatabaseSchema *schemaParam = static_cast< const QgsProcessingParameterDatabaseSchema * >( parameterDefinition() ); const QgsProcessingParameterDatabaseSchema *schemaParam = static_cast< const QgsProcessingParameterDatabaseSchema * >( parameterDefinition() );
if ( schemaParam->defaultValueForGui().isValid() ) if ( schemaParam->defaultValueForGui().isValid() )
Expand Down Expand Up @@ -5215,7 +5215,7 @@ void QgsProcessingDatabaseTableWidgetWrapper::setParentConnectionWrapperValue( c


QVariant value = parentWrapper->parameterValue(); QVariant value = parentWrapper->parameterValue();
mConnection = value.isValid() ? QgsProcessingParameters::parameterAsConnectionName( parentWrapper->parameterDefinition(), value, *context ) : QString(); mConnection = value.isValid() ? QgsProcessingParameters::parameterAsConnectionName( parentWrapper->parameterDefinition(), value, *context ) : QString();
mProvider = dynamic_cast< const QgsProcessingParameterProviderConnection * >( parentWrapper->parameterDefinition() )->providerId(); mProvider = static_cast< const QgsProcessingParameterProviderConnection * >( parentWrapper->parameterDefinition() )->providerId();
if ( mTableComboBox && !mSchema.isEmpty() ) if ( mTableComboBox && !mSchema.isEmpty() )
{ {
mTableComboBox->setSchema( mSchema ); mTableComboBox->setSchema( mSchema );
Expand Down
4 changes: 2 additions & 2 deletions src/providers/ows/qgsowsdataitems.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ QVector<QgsDataItem *> QgsOWSConnectionItem::createChildren()


int layerCount = 0; int layerCount = 0;
// Try to open with WMS,WFS,WCS // Try to open with WMS,WFS,WCS
for ( const QString &key : { "wms", "WFS", "wcs" } ) for ( const QString key : { "wms", "WFS", "wcs" } )
{ {
QgsDebugMsg( "Add connection for provider " + key ); QgsDebugMsg( "Add connection for provider " + key );
const QList<QgsDataItemProvider *> providerList = QgsProviderRegistry::instance()->dataItemProviders( key ); const QList<QgsDataItemProvider *> providerList = QgsProviderRegistry::instance()->dataItemProviders( key );
Expand Down Expand Up @@ -153,7 +153,7 @@ QVector<QgsDataItem *> QgsOWSRootItem::createChildren()
QVector<QgsDataItem *> connections; QVector<QgsDataItem *> connections;
// Combine all WMS,WFS,WCS connections // Combine all WMS,WFS,WCS connections
QStringList connNames; QStringList connNames;
for ( const QString &service : { "WMS", "WFS", "WCS"} ) for ( const QString service : { "WMS", "WFS", "WCS"} )
{ {
const QStringList list = QgsOwsConnection::connectionList( service ); const QStringList list = QgsOwsConnection::connectionList( service );
for ( const QString &connName : list ) for ( const QString &connName : list )
Expand Down
1 change: 1 addition & 0 deletions src/server/qgsserverapiutils.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "nlohmann/json.hpp" #include "nlohmann/json.hpp"


#include <QUrl> #include <QUrl>
#include <QUrlQuery>


QgsRectangle QgsServerApiUtils::parseBbox( const QString &bbox ) QgsRectangle QgsServerApiUtils::parseBbox( const QString &bbox )
{ {
Expand Down
2 changes: 2 additions & 0 deletions src/server/services/wfs3/qgswfs3handlers.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ QgsFields QgsWfs3AbstractItemsHandler::publishedFields( const QgsVectorLayer *vL
{ {
publishedAttributes = accessControl->layerAttributes( vLayer, publishedAttributes ); publishedAttributes = accessControl->layerAttributes( vLayer, publishedAttributes );
} }
#else
( void )context;
#endif #endif


QgsFields publishedFields; QgsFields publishedFields;
Expand Down
8 changes: 4 additions & 4 deletions tests/src/core/testqgscentroidfillsymbol.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ void TestQgsCentroidFillSymbol::opacityWithDataDefinedColor()


mCentroidFill->subSymbol()->symbolLayer( 0 )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty::fromExpression( QStringLiteral( "if(Name='Dam', 'red', 'green')" ) ) ); mCentroidFill->subSymbol()->symbolLayer( 0 )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty::fromExpression( QStringLiteral( "if(Name='Dam', 'red', 'green')" ) ) );
mCentroidFill->subSymbol()->symbolLayer( 0 )->setDataDefinedProperty( QgsSymbolLayer::PropertyStrokeColor, QgsProperty::fromExpression( QStringLiteral( "if(Name='Dam', 'blue', 'magenta')" ) ) ); mCentroidFill->subSymbol()->symbolLayer( 0 )->setDataDefinedProperty( QgsSymbolLayer::PropertyStrokeColor, QgsProperty::fromExpression( QStringLiteral( "if(Name='Dam', 'blue', 'magenta')" ) ) );
dynamic_cast< QgsSimpleMarkerSymbolLayer * >( mCentroidFill->subSymbol()->symbolLayer( 0 ) )->setStrokeWidth( 0.5 ); static_cast< QgsSimpleMarkerSymbolLayer * >( mCentroidFill->subSymbol()->symbolLayer( 0 ) )->setStrokeWidth( 0.5 );
dynamic_cast< QgsSimpleMarkerSymbolLayer * >( mCentroidFill->subSymbol()->symbolLayer( 0 ) )->setSize( 5 ); static_cast< QgsSimpleMarkerSymbolLayer * >( mCentroidFill->subSymbol()->symbolLayer( 0 ) )->setSize( 5 );
mCentroidFill->subSymbol()->setOpacity( 0.5 ); mCentroidFill->subSymbol()->setOpacity( 0.5 );
mFillSymbol->setOpacity( 0.5 ); mFillSymbol->setOpacity( 0.5 );


Expand All @@ -222,8 +222,8 @@ void TestQgsCentroidFillSymbol::dataDefinedOpacity()


mCentroidFill->subSymbol()->symbolLayer( 0 )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty::fromExpression( QStringLiteral( "if(Name='Dam', 'red', 'green')" ) ) ); mCentroidFill->subSymbol()->symbolLayer( 0 )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty::fromExpression( QStringLiteral( "if(Name='Dam', 'red', 'green')" ) ) );
mCentroidFill->subSymbol()->symbolLayer( 0 )->setDataDefinedProperty( QgsSymbolLayer::PropertyStrokeColor, QgsProperty::fromExpression( QStringLiteral( "if(Name='Dam', 'blue', 'magenta')" ) ) ); mCentroidFill->subSymbol()->symbolLayer( 0 )->setDataDefinedProperty( QgsSymbolLayer::PropertyStrokeColor, QgsProperty::fromExpression( QStringLiteral( "if(Name='Dam', 'blue', 'magenta')" ) ) );
dynamic_cast< QgsSimpleMarkerSymbolLayer * >( mCentroidFill->subSymbol()->symbolLayer( 0 ) )->setStrokeWidth( 0.5 ); static_cast< QgsSimpleMarkerSymbolLayer * >( mCentroidFill->subSymbol()->symbolLayer( 0 ) )->setStrokeWidth( 0.5 );
dynamic_cast< QgsSimpleMarkerSymbolLayer * >( mCentroidFill->subSymbol()->symbolLayer( 0 ) )->setSize( 5 ); static_cast< QgsSimpleMarkerSymbolLayer * >( mCentroidFill->subSymbol()->symbolLayer( 0 ) )->setSize( 5 );
mCentroidFill->subSymbol()->setOpacity( 0.5 ); mCentroidFill->subSymbol()->setOpacity( 0.5 );
mFillSymbol->setOpacity( 1.0 ); mFillSymbol->setOpacity( 1.0 );
mFillSymbol->setDataDefinedProperty( QgsSymbol::PropertyOpacity, QgsProperty::fromExpression( QStringLiteral( "if(\"Value\" >10, 25, 50)" ) ) ); mFillSymbol->setDataDefinedProperty( QgsSymbol::PropertyOpacity, QgsProperty::fromExpression( QStringLiteral( "if(\"Value\" >10, 25, 50)" ) ) );
Expand Down
20 changes: 10 additions & 10 deletions tests/src/core/testqgsfilledmarker.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ void TestQgsFilledMarkerSymbol::bounds()


void TestQgsFilledMarkerSymbol::opacityWithDataDefinedColor() void TestQgsFilledMarkerSymbol::opacityWithDataDefinedColor()
{ {
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setColor( QColor( 200, 200, 200 ) ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setColor( QColor( 200, 200, 200 ) );
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setColor2( QColor( 0, 0, 0 ) ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setColor2( QColor( 0, 0, 0 ) );
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty::fromExpression( QStringLiteral( "if(importance > 2, 'red', 'green')" ) ) ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty::fromExpression( QStringLiteral( "if(importance > 2, 'red', 'green')" ) ) );
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertySecondaryColor, QgsProperty::fromExpression( QStringLiteral( "if(importance > 2, 'blue', 'magenta')" ) ) ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertySecondaryColor, QgsProperty::fromExpression( QStringLiteral( "if(importance > 2, 'blue', 'magenta')" ) ) );
mMarkerSymbol->setOpacity( 0.8 ); mMarkerSymbol->setOpacity( 0.8 );
// set opacity on both the symbol AND sub symbol to test that both are applied // set opacity on both the symbol AND sub symbol to test that both are applied
mFilledMarkerLayer->subSymbol()->setOpacity( 0.6 ); mFilledMarkerLayer->subSymbol()->setOpacity( 0.6 );
Expand All @@ -188,15 +188,15 @@ void TestQgsFilledMarkerSymbol::opacityWithDataDefinedColor()


void TestQgsFilledMarkerSymbol::dataDefinedOpacity() void TestQgsFilledMarkerSymbol::dataDefinedOpacity()
{ {
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setColor( QColor( 200, 200, 200 ) ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setColor( QColor( 200, 200, 200 ) );
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setColor2( QColor( 0, 0, 0 ) ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setColor2( QColor( 0, 0, 0 ) );
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty::fromExpression( QStringLiteral( "if(importance > 2, 'red', 'green')" ) ) ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty::fromExpression( QStringLiteral( "if(importance > 2, 'red', 'green')" ) ) );
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertySecondaryColor, QgsProperty::fromExpression( QStringLiteral( "if(importance > 2, 'blue', 'magenta')" ) ) ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertySecondaryColor, QgsProperty::fromExpression( QStringLiteral( "if(importance > 2, 'blue', 'magenta')" ) ) );
mMarkerSymbol->setDataDefinedProperty( QgsSymbol::PropertyOpacity, QgsProperty::fromExpression( QStringLiteral( "if(\"Heading\" > 100, 25, 50)" ) ) ); mMarkerSymbol->setDataDefinedProperty( QgsSymbol::PropertyOpacity, QgsProperty::fromExpression( QStringLiteral( "if(\"Heading\" > 100, 25, 50)" ) ) );


bool result = imageCheck( QStringLiteral( "filledmarker_ddopacity" ) ); bool result = imageCheck( QStringLiteral( "filledmarker_ddopacity" ) );
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty() ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertyFillColor, QgsProperty() );
dynamic_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertyStrokeColor, QgsProperty() ); static_cast< QgsGradientFillSymbolLayer * >( mFilledMarkerLayer->subSymbol()->symbolLayer( 0 ) )->setDataDefinedProperty( QgsSymbolLayer::PropertyStrokeColor, QgsProperty() );
mMarkerSymbol->setDataDefinedProperty( QgsSymbol::PropertyOpacity, QgsProperty() ); mMarkerSymbol->setDataDefinedProperty( QgsSymbol::PropertyOpacity, QgsProperty() );
QVERIFY( result ); QVERIFY( result );
} }
Expand Down
Loading

0 comments on commit e2bf57e

Please sign in to comment.