We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2566061 commit 0796df0Copy full SHA for 0796df0
src/app/qgsbrowserdockwidget.cpp
@@ -577,9 +577,9 @@ void QgsBrowserDockWidget::addSelectedLayers()
577
qSort( list );
578
579
// If any of the layer items are QGIS we just open and exit the loop
580
- for ( int i = 0; i <= list.size(); i++ )
+ Q_FOREACH ( const QModelIndex& index, list )
581
{
582
- QgsDataItem *item = mModel->dataItem( mProxyModel->mapToSource( list[i] ) );
+ QgsDataItem *item = mModel->dataItem( mProxyModel->mapToSource( index ) );
583
if ( item && item->type() == QgsDataItem::Project )
584
585
QgsProjectItem *projectItem = qobject_cast<QgsProjectItem*>( item );
0 commit comments