mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Move static variable to function scope
This commit is contained in:
parent
08443c20d8
commit
e59f1d5d48
@ -45,14 +45,14 @@ typedef QString protocolDrivers_t();
|
||||
//typedef int dataCapabilities_t();
|
||||
//typedef QgsDataItem * dataItem_t(QString);
|
||||
|
||||
static QMutex mutex;
|
||||
static QgsProviderRegistry *sInstance = nullptr;
|
||||
|
||||
QgsProviderRegistry *QgsProviderRegistry::instance( const QString &pluginPath )
|
||||
{
|
||||
if ( !sInstance )
|
||||
{
|
||||
QMutexLocker locker( &mutex );
|
||||
static QMutex sMutex;
|
||||
QMutexLocker locker( &sMutex );
|
||||
if ( !sInstance )
|
||||
{
|
||||
sInstance = new QgsProviderRegistry( pluginPath );
|
||||
|
Loading…
x
Reference in New Issue
Block a user