Skip to content

Commit 05bfd2b

Browse files
committedMay 29, 2016
Use consistently dataSourceUri() with QgsOgrConnPool (follow up of #3057)
1 parent 657ac10 commit 05bfd2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/providers/ogr/qgsogrprovider.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
384384
QgsOgrProvider::~QgsOgrProvider()
385385
{
386386
close();
387-
QgsOgrConnPool::instance()->unref( mFilePath );
387+
QgsOgrConnPool::instance()->unref( dataSourceUri() );
388388
}
389389

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.