Skip to content

Commit

Permalink
Fix clazy use QHash for container with pointer keys warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 2, 2018
1 parent 1f95864 commit 1bb0ef4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/providers/gdal/qgsgdalprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static QString PROVIDER_DESCRIPTION = QStringLiteral( "GDAL provider" );
// To avoid potential races when destroying related instances ("main" and clones)
static QMutex gGdaProviderMutex( QMutex::Recursive );

QMap< QgsGdalProvider *, QVector<QgsGdalProvider::DatasetPair> > QgsGdalProvider::mgDatasetCache;
QHash< QgsGdalProvider *, QVector<QgsGdalProvider::DatasetPair> > QgsGdalProvider::mgDatasetCache;

int QgsGdalProvider::mgDatasetCacheSize = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/providers/gdal/qgsgdalprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase
};

// Dataset cache
static QMap< QgsGdalProvider *, QVector<DatasetPair> > mgDatasetCache;
static QHash< QgsGdalProvider *, QVector<DatasetPair> > mgDatasetCache;

// Number of cached datasets in mgDatasetCache ( == sum(iter.value().size() )
static int mgDatasetCacheSize;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrdataitems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ QgsOgrLayerItem::QgsOgrLayerItem( QgsDataItem *parent,
mToolTip = uri;
setState( Populated ); // children are not expected

if ( mPath.toLower().endsWith( QLatin1String( ".shp" ) ) )
if ( mPath.endsWith( QLatin1String( ".shp" ), Qt::CaseInsensitive ) )
{
if ( OGRGetDriverCount() == 0 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ QMap< QgsOgrProviderUtils::DatasetIdentification,
QMap< QString, int > QgsOgrProviderUtils::sMapCountOpenedDS;
QMap< GDALDatasetH, bool> QgsOgrProviderUtils::sMapDSHandleToUpdateMode;
QHash< GDALDatasetH, bool> QgsOgrProviderUtils::sMapDSHandleToUpdateMode;
QMap< QString, QDateTime > QgsOgrProviderUtils::sMapDSNameToLastModifiedDate;
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class QgsOgrProviderUtils
static QMap< QString, int > sMapCountOpenedDS;

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

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

0 comments on commit 1bb0ef4

Please sign in to comment.