Skip to content

Commit 7b739f1

Browse files
committed
Fix some clazy warnings
1 parent 27bb2c1 commit 7b739f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/layertree/qgslayertreemodel.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ QVariant QgsLayerTreeModel::data( const QModelIndex &index, int role ) const
200200
return QgsLayerItem::iconRaster();
201201
}
202202

203-
QgsVectorLayer *vlayer = dynamic_cast<QgsVectorLayer *>( layer );
203+
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
204204
QIcon icon;
205205

206206
// 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
314314
if ( !layer->abstract().isEmpty() )
315315
{
316316
parts << QString();
317-
const QStringList abstractLines = layer->abstract().split( "\n" );
317+
const QStringList abstractLines = layer->abstract().split( '\n' );
318318
for ( const auto &l : abstractLines )
319319
{
320320
parts << l.toHtmlEscaped();
@@ -1533,7 +1533,7 @@ void QgsLayerTreeModel::invalidateLegendMapBasedData()
15331533
QMap<QString, int> widthMax;
15341534
Q_FOREACH ( QgsLayerTreeModelLegendNode *legendNode, data.originalNodes )
15351535
{
1536-
QgsSymbolLegendNode *n = dynamic_cast<QgsSymbolLegendNode *>( legendNode );
1536+
QgsSymbolLegendNode *n = qobject_cast<QgsSymbolLegendNode *>( legendNode );
15371537
if ( n )
15381538
{
15391539
const QSize sz( n->minimumIconSize( context.get() ) );

0 commit comments

Comments
 (0)