Skip to content
Permalink
Browse files

Fix clazy use QHash for container with pointer keys warnings

  • Loading branch information
nyalldawson committed Feb 2, 2018
1 parent 1f95864 commit 1bb0ef43e4d8b36760626bd38d7370f5289e73ae
@@ -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;

@@ -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;
@@ -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 )
{
@@ -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;
@@ -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;

0 comments on commit 1bb0ef4

Please sign in to comment.
You can’t perform that action at this time.