31 qDeleteAll( mBackends );
36 auto it = std::find_if( mBackends.begin(), mBackends.end(), [ = ](
QgsExternalStorage * storage )
38 return storage->type() == type;
41 return it != mBackends.end() ? *it :
nullptr;
51 if ( !mBackends.contains( storage ) )
52 mBackends.append( storage );
57 const int index = mBackends.indexOf( storage );
60 delete mBackends.takeAt( index );
QgsExternalStorage * externalStorageFromType(const QString &type) const
Returns external storage implementation if the storage type matches one.
void registerExternalStorage(QgsExternalStorage *storage)
Registers a storage backend and takes ownership of it.
QList< QgsExternalStorage * > externalStorages() const
Returns a list of registered project storage implementations.
QgsExternalStorageRegistry()
Constructor - creates a registry of external storage backends.
~QgsExternalStorageRegistry()
void unregisterExternalStorage(QgsExternalStorage *storage)
Unregisters a storage backend and destroys its instance.
Abstract interface for external storage - to be implemented by various backends and registered in Qgs...