30 qDeleteAll( mBackends );
35 auto it = std::find_if( mBackends.begin(), mBackends.end(), [ = ](
QgsExternalStorage * storage )
37 return storage->type() == type;
40 return it != mBackends.end() ? *it :
nullptr;
50 if ( !mBackends.contains( storage ) )
51 mBackends.append( storage );
56 const int index = mBackends.indexOf( storage );
59 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()
Destructor.
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...