graphics/qgis: Fix on CURRENT after llvm13 intro
Right after replacing llvm12 with llvm13 in base (commits b61bce17f346d79cecfd8f195a64b10f77be43b1 to 397a8ba05313cc3815d219c9d1b2de1372fcb561) graphics/qgis was broken on 14.0-CURRENT with /usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/ogr/qgsogrproviderutils.cpp:2595:34: error: no matching constructor for initialization of 'QgsOgrDatasetSharedPtr' (aka 'shared_ptr<QgsOgrDataset>') QgsOgrDatasetSharedPtr dsRet = QgsOgrDatasetSharedPtr( new QgsOgrDataset(), QgsOgrProviderUtils::releaseDataset ); Thanks to dim@ for the analysis and solution. Much appreciated! PR: 259967
This commit is contained in:
parent
49dc1cc6ac
commit
75007752ab
|
@ -0,0 +1,19 @@
|
|||
--- src/core/providers/ogr/qgsogrproviderutils.cpp.orig 2021-11-19 12:08:37 UTC
|
||||
+++ src/core/providers/ogr/qgsogrproviderutils.cpp
|
||||
@@ -2311,7 +2311,7 @@ void QgsOgrProviderUtils::release( QgsOgrLayer *&layer
|
||||
}
|
||||
|
||||
|
||||
-void QgsOgrProviderUtils::releaseDataset( QgsOgrDataset *&ds )
|
||||
+void QgsOgrProviderUtils::releaseDataset( QgsOgrDataset *ds )
|
||||
{
|
||||
if ( !ds )
|
||||
return;
|
||||
@@ -2319,7 +2319,6 @@ void QgsOgrProviderUtils::releaseDataset( QgsOgrDatase
|
||||
QMutexLocker locker( sGlobalMutex() );
|
||||
releaseInternal( ds->mIdent, ds->mDs, true );
|
||||
delete ds;
|
||||
- ds = nullptr;
|
||||
}
|
||||
|
||||
bool QgsOgrProviderUtils::canDriverShareSameDatasetAmongLayers( const QString &driverName )
|
|
@ -0,0 +1,11 @@
|
|||
--- src/core/providers/ogr/qgsogrproviderutils.h.orig 2021-11-19 12:08:37 UTC
|
||||
+++ src/core/providers/ogr/qgsogrproviderutils.h
|
||||
@@ -216,7 +216,7 @@ class CORE_EXPORT QgsOgrProviderUtils
|
||||
static void release( QgsOgrLayer *&layer );
|
||||
|
||||
//! Release a QgsOgrDataset*
|
||||
- static void releaseDataset( QgsOgrDataset *&ds );
|
||||
+ static void releaseDataset( QgsOgrDataset *ds );
|
||||
|
||||
//! Make sure that the existing pool of opened datasets on dsName is not accessible for new getLayer() attempts
|
||||
static void invalidateCachedDatasets( const QString &dsName );
|
Loading…
Reference in New Issue