Skip to content

Commit ecaadef

Browse files
committedOct 29, 2015
Added const and Q_FOREACH instead of plain foreach
1 parent d24f40c commit ecaadef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,10 @@ void QgsStyleV2ExportImportDialog::clearSelection()
394394

395395
void QgsStyleV2ExportImportDialog::selectSymbols( const QStringList symbolNames )
396396
{
397-
foreach ( QString symbolName, symbolNames )
397+
Q_FOREACH( const QString &symbolName, symbolNames )
398398
{
399399
QModelIndexList indexes = listItems->model()->match( listItems->model()->index( 0, 0 ), Qt::DisplayRole, symbolName , 1, Qt::MatchFixedString | Qt::MatchCaseSensitive );
400-
foreach ( QModelIndex index, indexes )
400+
Q_FOREACH ( const QModelIndex &index, indexes )
401401
{
402402
listItems->selectionModel()->select( index, QItemSelectionModel::Select );
403403
}
@@ -406,10 +406,10 @@ void QgsStyleV2ExportImportDialog::selectSymbols( const QStringList symbolNames
406406

407407
void QgsStyleV2ExportImportDialog::deselectSymbols( const QStringList symbolNames )
408408
{
409-
foreach ( QString symbolName, symbolNames )
409+
Q_FOREACH ( const QString &symbolName, symbolNames )
410410
{
411411
QModelIndexList indexes = listItems->model()->match( listItems->model()->index( 0, 0 ), Qt::DisplayRole, symbolName , 1, Qt::MatchFixedString | Qt::MatchCaseSensitive );
412-
foreach ( QModelIndex index, indexes )
412+
Q_FOREACH ( const QModelIndex &index, indexes )
413413
{
414414
QItemSelection deselection( index, index );
415415
listItems->selectionModel()->select( deselection, QItemSelectionModel::Deselect );

0 commit comments

Comments
 (0)
Please sign in to comment.