Skip to content

Commit

Permalink
Use consistently dataSourceUri() with QgsOgrConnPool (follow up of #3057
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rouault committed May 29, 2016
1 parent 657ac10 commit 05bfd2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -384,7 +384,7 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
QgsOgrProvider::~QgsOgrProvider()
{
close();
QgsOgrConnPool::instance()->unref( mFilePath );
QgsOgrConnPool::instance()->unref( dataSourceUri() );
}

QgsAbstractFeatureSource* QgsOgrProvider::featureSource() const
Expand Down Expand Up @@ -1107,7 +1107,7 @@ bool QgsOgrProvider::addAttributes( const QList<QgsField> &attributes )
{
// adding attributes in mapinfo requires to be able to delete the .dat file
// so drop any cached connections.
QgsOgrConnPool::instance()->invalidateConnections( filePath() );
QgsOgrConnPool::instance()->invalidateConnections( dataSourceUri() );
}

bool returnvalue = true;
Expand Down Expand Up @@ -2658,7 +2658,7 @@ QString QgsOgrUtils::quotedValue( const QVariant& value )
bool QgsOgrProvider::syncToDisc()
{
//for shapefiles, remove spatial index files and create a new index
QgsOgrConnPool::instance()->unref( mFilePath );
QgsOgrConnPool::instance()->unref( dataSourceUri() );
bool shapeIndex = false;
if ( ogrDriverName == "ESRI Shapefile" )
{
Expand Down

0 comments on commit 05bfd2b

Please sign in to comment.