@@ -137,8 +137,8 @@ QgsGeoPackageConnectionItem::QgsGeoPackageConnectionItem( QgsDataItem *parent, Q
137
137
QVector<QgsDataItem *> QgsGeoPackageConnectionItem::createChildren ()
138
138
{
139
139
QVector<QgsDataItem *> children;
140
- QList<QgsOgrDbLayerInfo *> layers = QgsOgrLayerItem::subLayers ( mPath , QStringLiteral ( " GPKG" ) );
141
- for ( const QgsOgrDbLayerInfo *info : qgsAsConst ( layers ) )
140
+ const auto layers = QgsOgrLayerItem::subLayers ( mPath , QStringLiteral ( " GPKG" ) );
141
+ for ( const QgsOgrDbLayerInfo *info : layers )
142
142
{
143
143
if ( info->layerType () == QgsLayerItem::LayerType::Raster )
144
144
{
@@ -197,7 +197,7 @@ bool QgsGeoPackageConnectionItem::handleDrop( const QMimeData *data, Qt::DropAct
197
197
QStringList importResults;
198
198
bool hasError = false ;
199
199
200
- const QgsMimeDataUtils::UriList lst = QgsMimeDataUtils::decodeUriList ( data );
200
+ const auto lst = QgsMimeDataUtils::decodeUriList ( data );
201
201
for ( const QgsMimeDataUtils::Uri &dropUri : lst )
202
202
{
203
203
// Check that we are not copying over self
@@ -239,8 +239,8 @@ bool QgsGeoPackageConnectionItem::handleDrop( const QMimeData *data, Qt::DropAct
239
239
240
240
// check if the destination layer already exists
241
241
bool exists = false ;
242
- const QVector< QgsDataItem *> c ( children () );
243
- for ( const auto child : c )
242
+ const auto c ( children () );
243
+ for ( const QgsDataItem * child : c )
244
244
{
245
245
if ( child->name () == dropUri.name )
246
246
{
@@ -495,7 +495,7 @@ void QgsGeoPackageAbstractLayerItem::deleteLayer()
495
495
{
496
496
// Check if the layer is in the registry
497
497
const QgsMapLayer *projectLayer = nullptr ;
498
- const QMap<QString, QgsMapLayer *> mapLayers ( QgsProject::instance ()->mapLayers () );
498
+ const auto mapLayers ( QgsProject::instance ()->mapLayers () );
499
499
for ( const QgsMapLayer *layer : mapLayers )
500
500
{
501
501
if ( layer->publicSource () == mUri )
0 commit comments