Skip to content

Commit

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

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 @@ -315,7 +315,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 @@ -1534,7 +1534,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 2b04248

Please sign in to comment.