Skip to content
Permalink
Browse files

[gdal] Implement the data provider reloadData() function (fixes #20536)

  • Loading branch information
nirvn committed Apr 10, 2019
1 parent 61409c3 commit 581b48da91d1a9256203145d49f53f25784a4898
Showing with 11 additions and 0 deletions.
  1. +9 −0 src/providers/gdal/qgsgdalprovider.cpp
  2. +2 −0 src/providers/gdal/qgsgdalprovider.h
@@ -526,6 +526,15 @@ void QgsGdalProvider::closeDataset()
closeCachedGdalHandlesFor( this );
}

void QgsGdalProvider::reloadData()
{
QMutexLocker locker( mpMutex );
closeDataset();

mHasInit = false;
( void )initIfNeeded();
}

QString QgsGdalProvider::htmlMetadata()
{
QMutexLocker locker( mpMutex );
@@ -171,6 +171,8 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase
bool setNoDataValue( int bandNo, double noDataValue ) override;
bool remove() override;

void reloadData() override;

QString validateCreationOptions( const QStringList &createOptions, const QString &format ) override;
QString validatePyramidsConfigOptions( QgsRaster::RasterPyramidsFormat pyramidsFormat,
const QStringList &configOptions, const QString &fileFormat ) override;

0 comments on commit 581b48d

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