Skip to content

Commit

Permalink
Added const and Q_FOREACH instead of plain foreach
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 29, 2015
1 parent d24f40c commit ecaadef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,10 @@ void QgsStyleV2ExportImportDialog::clearSelection()

void QgsStyleV2ExportImportDialog::selectSymbols( const QStringList symbolNames )
{
foreach ( QString symbolName, symbolNames )
Q_FOREACH( const QString &symbolName, symbolNames )
{
QModelIndexList indexes = listItems->model()->match( listItems->model()->index( 0, 0 ), Qt::DisplayRole, symbolName , 1, Qt::MatchFixedString | Qt::MatchCaseSensitive );
foreach ( QModelIndex index, indexes )
Q_FOREACH ( const QModelIndex &index, indexes )
{
listItems->selectionModel()->select( index, QItemSelectionModel::Select );
}
Expand All @@ -406,10 +406,10 @@ void QgsStyleV2ExportImportDialog::selectSymbols( const QStringList symbolNames

void QgsStyleV2ExportImportDialog::deselectSymbols( const QStringList symbolNames )
{
foreach ( QString symbolName, symbolNames )
Q_FOREACH ( const QString &symbolName, symbolNames )
{
QModelIndexList indexes = listItems->model()->match( listItems->model()->index( 0, 0 ), Qt::DisplayRole, symbolName , 1, Qt::MatchFixedString | Qt::MatchCaseSensitive );
foreach ( QModelIndex index, indexes )
Q_FOREACH ( const QModelIndex &index, indexes )
{
QItemSelection deselection( index, index );
listItems->selectionModel()->select( deselection, QItemSelectionModel::Deselect );
Expand Down

0 comments on commit ecaadef

Please sign in to comment.