Skip to content
Permalink
Browse files
Added const and Q_FOREACH instead of plain foreach
  • Loading branch information
elpaso committed Oct 29, 2015
1 parent d24f40c commit ecaadef7eb57e9832c0dd16e3e84b365233add4b
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/gui/symbology-ng/qgsstylev2exportimportdialog.cpp
@@ -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 );
}
@@ -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 );

0 comments on commit ecaadef

Please sign in to comment.