Skip to content
Permalink
Browse files

Use consistently dataSourceUri() with QgsOgrConnPool (follow up of #3057

)
  • Loading branch information
rouault committed May 4, 2016
1 parent 657ac10 commit 05bfd2bcb1183977a58aa0af3b9586bf89c822ca
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/providers/ogr/qgsogrprovider.cpp
@@ -384,7 +384,7 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
QgsOgrProvider::~QgsOgrProvider()
{
close();
QgsOgrConnPool::instance()->unref( mFilePath );
QgsOgrConnPool::instance()->unref( dataSourceUri() );
}

QgsAbstractFeatureSource* QgsOgrProvider::featureSource() const
@@ -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;
@@ -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" )
{

0 comments on commit 05bfd2b

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