Skip to content

Commit 1bb0ef4

Browse files
committed
Fix clazy use QHash for container with pointer keys warnings
1 parent 1f95864 commit 1bb0ef4

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/providers/gdal/qgsgdalprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static QString PROVIDER_DESCRIPTION = QStringLiteral( "GDAL provider" );
6868
// To avoid potential races when destroying related instances ("main" and clones)
6969
static QMutex gGdaProviderMutex( QMutex::Recursive );
7070

71-
QMap< QgsGdalProvider *, QVector<QgsGdalProvider::DatasetPair> > QgsGdalProvider::mgDatasetCache;
71+
QHash< QgsGdalProvider *, QVector<QgsGdalProvider::DatasetPair> > QgsGdalProvider::mgDatasetCache;
7272

7373
int QgsGdalProvider::mgDatasetCacheSize = 0;
7474

src/providers/gdal/qgsgdalprovider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase
266266
};
267267

268268
// Dataset cache
269-
static QMap< QgsGdalProvider *, QVector<DatasetPair> > mgDatasetCache;
269+
static QHash< QgsGdalProvider *, QVector<DatasetPair> > mgDatasetCache;
270270

271271
// Number of cached datasets in mgDatasetCache ( == sum(iter.value().size() )
272272
static int mgDatasetCacheSize;

src/providers/ogr/qgsogrdataitems.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ QgsOgrLayerItem::QgsOgrLayerItem( QgsDataItem *parent,
5353
mToolTip = uri;
5454
setState( Populated ); // children are not expected
5555

56-
if ( mPath.toLower().endsWith( QLatin1String( ".shp" ) ) )
56+
if ( mPath.endsWith( QLatin1String( ".shp" ), Qt::CaseInsensitive ) )
5757
{
5858
if ( OGRGetDriverCount() == 0 )
5959
{

src/providers/ogr/qgsogrprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ QMap< QgsOgrProviderUtils::DatasetIdentification,
101101
102102
QMap< QString, int > QgsOgrProviderUtils::sMapCountOpenedDS;
103103
104-
QMap< GDALDatasetH, bool> QgsOgrProviderUtils::sMapDSHandleToUpdateMode;
104+
QHash< GDALDatasetH, bool> QgsOgrProviderUtils::sMapDSHandleToUpdateMode;
105105
106106
QMap< QString, QDateTime > QgsOgrProviderUtils::sMapDSNameToLastModifiedDate;
107107

src/providers/ogr/qgsogrprovider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class QgsOgrProviderUtils
358358
static QMap< QString, int > sMapCountOpenedDS;
359359

360360
//! Map a dataset handle to its update open mode (if opened with GDALOpenWrapper, only for GPKG)
361-
static QMap< GDALDatasetH, bool> sMapDSHandleToUpdateMode;
361+
static QHash< GDALDatasetH, bool> sMapDSHandleToUpdateMode;
362362

363363
//! Map a dataset name to its last modified data
364364
static QMap< QString, QDateTime > sMapDSNameToLastModifiedDate;

0 commit comments

Comments
 (0)