Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Use consistently dataSourceUri() with QgsOgrConnPool (follow up of #3057
- Loading branch information
Showing
with
3 additions
and
3 deletions.
-
+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" ) |
|
|
{ |
|
|