Skip to content
Permalink
Browse files

Fix some clazy warnings

  • Loading branch information
nyalldawson committed Jan 27, 2019
1 parent 27bb2c1 commit 7b739f196d757213abfff7df9259669010c130e9
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/layertree/qgslayertreemodel.cpp
@@ -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!
@@ -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();
@@ -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() ) );

0 comments on commit 7b739f1

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