File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -401,19 +401,19 @@ void QgsLayoutItemMapOverviewStack::moveOverviewDown( const QString &overviewId
401
401
QgsLayoutItemMapOverview *QgsLayoutItemMapOverviewStack::overview ( const QString &overviewId ) const
402
402
{
403
403
QgsLayoutItemMapItem *item = QgsLayoutItemMapItemStack::item ( overviewId );
404
- return dynamic_cast <QgsLayoutItemMapOverview *>( item );
404
+ return qobject_cast <QgsLayoutItemMapOverview *>( item );
405
405
}
406
406
407
407
QgsLayoutItemMapOverview *QgsLayoutItemMapOverviewStack::overview ( const int index ) const
408
408
{
409
409
QgsLayoutItemMapItem *item = QgsLayoutItemMapItemStack::item ( index );
410
- return dynamic_cast <QgsLayoutItemMapOverview *>( item );
410
+ return qobject_cast <QgsLayoutItemMapOverview *>( item );
411
411
}
412
412
413
413
QgsLayoutItemMapOverview &QgsLayoutItemMapOverviewStack::operator []( int idx )
414
414
{
415
415
QgsLayoutItemMapItem *item = mItems .at ( idx );
416
- QgsLayoutItemMapOverview *overview = dynamic_cast <QgsLayoutItemMapOverview *>( item );
416
+ QgsLayoutItemMapOverview *overview = qobject_cast <QgsLayoutItemMapOverview *>( item );
417
417
return *overview;
418
418
}
419
419
@@ -423,7 +423,7 @@ QList<QgsLayoutItemMapOverview *> QgsLayoutItemMapOverviewStack::asList() const
423
423
QList< QgsLayoutItemMapItem * >::const_iterator it = mItems .begin ();
424
424
for ( ; it != mItems .end (); ++it )
425
425
{
426
- QgsLayoutItemMapOverview *overview = dynamic_cast <QgsLayoutItemMapOverview *>( *it );
426
+ QgsLayoutItemMapOverview *overview = qobject_cast <QgsLayoutItemMapOverview *>( *it );
427
427
if ( overview )
428
428
{
429
429
list.append ( overview );
You can’t perform that action at this time.
0 commit comments