Skip to content

Commit

Permalink
Make Qt containers const in QgsHanaSourceSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
mrylov committed Dec 21, 2020
1 parent fb46ff3 commit 5a7b509
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/providers/hana/qgshanasourceselect.cpp
Expand Up @@ -163,7 +163,7 @@ void QgsHanaSourceSelectDelegate::setEditorData( QWidget *editor, const QModelIn
if ( index.column() == QgsHanaTableModel::DbtmPkCol &&
!index.data( Qt::UserRole + 2 ).toStringList().isEmpty() )
{
QStringList columns = index.data( Qt::UserRole + 2 ).toStringList();
const QStringList columns = index.data( Qt::UserRole + 2 ).toStringList();
for ( const QString &colName : columns )
{
QStandardItemModel *cbm = qobject_cast<QStandardItemModel *>( cb->model() );
Expand Down Expand Up @@ -500,7 +500,8 @@ void QgsHanaSourceSelect::addButtonClicked()
{
mSelectedTables.clear();

for ( const QModelIndex &idx : mTablesTreeView->selectionModel()->selection().indexes() )
const QModelIndexList indexes = mTablesTreeView->selectionModel()->selection().indexes();
for ( const QModelIndex &idx : indexes )
{
if ( idx.column() != QgsHanaTableModel::DbtmTable )
continue;
Expand Down

0 comments on commit 5a7b509

Please sign in to comment.