Skip to content

Commit a214a9c

Browse files
committed
Revert "GDAL/OGR mutex in data items on GDALOpen/OGROpen"
This reverts commit 9ebb24e.
1 parent 9ebb24e commit a214a9c

File tree

4 files changed

+0
-26
lines changed

4 files changed

+0
-26
lines changed

src/providers/gdal/qgsgdaldataitems.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
// defined in qgsgdalprovider.cpp
2323
void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString, QStringList & theExtensions, QStringList & theWildcards );
2424

25-
#ifndef SPATIALITE_VERSION_G_4_1_1
26-
QMutex QgsGdalLayerItem::sMutex;
27-
#endif
2825

2926
QgsGdalLayerItem::QgsGdalLayerItem( QgsDataItem* parent,
3027
QString name, QString path, QString uri,
@@ -42,12 +39,6 @@ QgsGdalLayerItem::QgsGdalLayerItem( QgsDataItem* parent,
4239
else
4340
setState( Populated );
4441

45-
// If GDAL is compiled with SpatiaLite <= 4.1.1, GDALOpen results in call to spatialite_init()
46-
// which is nopt thread safe, see http://lists.osgeo.org/pipermail/qgis-developer/2015-June/038392.html
47-
#ifndef SPATIALITE_VERSION_G_4_1_1
48-
QgsDebugMsg( "lock" );
49-
QMutexLocker locker( &sMutex );
50-
#endif
5142
GDALAllRegister();
5243
GDALDatasetH hDS = GDALOpen( TO8F( mPath ), GA_Update );
5344

src/providers/gdal/qgsgdaldataitems.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ class QgsGdalLayerItem : public QgsLayerItem
2222
private:
2323

2424
QStringList sublayers;
25-
#ifndef SPATIALITE_VERSION_G_4_1_1
26-
static QMutex sMutex;
27-
#endif
2825

2926
public:
3027
QgsGdalLayerItem( QgsDataItem* parent,

src/providers/ogr/qgsogrdataitems.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
QGISEXTERN QStringList fileExtensions();
3131
QGISEXTERN QStringList wildcards();
3232

33-
#ifndef SPATIALITE_VERSION_G_4_1_1
34-
QMutex QgsOgrLayerItem::sMutex;
35-
#endif
3633

3734
QgsOgrLayerItem::QgsOgrLayerItem( QgsDataItem* parent,
3835
QString name, QString path, QString uri, LayerType layerType )
@@ -43,13 +40,6 @@ QgsOgrLayerItem::QgsOgrLayerItem( QgsDataItem* parent,
4340

4441
OGRRegisterAll();
4542
OGRSFDriverH hDriver;
46-
47-
// If GDAL is compiled with SpatiaLite <= 4.1.1, GDALOpen results in call to spatialite_init()
48-
// which is nopt thread safe, see http://lists.osgeo.org/pipermail/qgis-developer/2015-June/038392.html
49-
#ifndef SPATIALITE_VERSION_G_4_1_1
50-
QgsDebugMsg( "lock" );
51-
QMutexLocker locker( &sMutex );
52-
#endif
5343
OGRDataSourceH hDataSource = OGROpen( TO8F( mPath ), true, &hDriver );
5444

5545
if ( hDataSource )

src/providers/ogr/qgsogrdataitems.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ class QgsOgrLayerItem : public QgsLayerItem
2929
bool setCrs( QgsCoordinateReferenceSystem crs ) override;
3030
Capability capabilities() override;
3131
QString layerName() const override;
32-
private:
33-
#ifndef SPATIALITE_VERSION_G_4_1_1
34-
static QMutex sMutex;
35-
#endif
3632
};
3733

3834
class QgsOgrDataCollectionItem : public QgsDataCollectionItem

0 commit comments

Comments
 (0)