Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix some clazy warnings
  • Loading branch information
nyalldawson committed Jan 27, 2019
1 parent 27bb2c1 commit 7b739f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/layertree/qgslayertreemodel.cpp
Expand Up @@ -200,7 +200,7 @@ QVariant QgsLayerTreeModel::data( const QModelIndex &index, int role ) const
return QgsLayerItem::iconRaster();
}

QgsVectorLayer *vlayer = dynamic_cast<QgsVectorLayer *>( layer );
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
QIcon icon;

// if there's just on legend entry that should be embedded in layer - do that!
Expand Down Expand Up @@ -314,7 +314,7 @@ QVariant QgsLayerTreeModel::data( const QModelIndex &index, int role ) const
if ( !layer->abstract().isEmpty() )
{
parts << QString();
const QStringList abstractLines = layer->abstract().split( "\n" );
const QStringList abstractLines = layer->abstract().split( '\n' );
for ( const auto &l : abstractLines )
{
parts << l.toHtmlEscaped();
Expand Down Expand Up @@ -1533,7 +1533,7 @@ void QgsLayerTreeModel::invalidateLegendMapBasedData()
QMap<QString, int> widthMax;
Q_FOREACH ( QgsLayerTreeModelLegendNode *legendNode, data.originalNodes )
{
QgsSymbolLegendNode *n = dynamic_cast<QgsSymbolLegendNode *>( legendNode );
QgsSymbolLegendNode *n = qobject_cast<QgsSymbolLegendNode *>( legendNode );
if ( n )
{
const QSize sz( n->minimumIconSize( context.get() ) );
Expand Down

0 comments on commit 7b739f1

Please sign in to comment.