23 qDeleteAll( mBackends );
28 return mBackends.value( type,
nullptr );
33 for (
auto it = mBackends.constBegin(); it != mBackends.constEnd(); ++it )
36 const QString scheme = storage->
type() +
':';
37 if ( uri.startsWith( scheme ) )
42 for (
auto it = mBackends.constBegin(); it != mBackends.constEnd(); ++it )
53 return mBackends.values();
58 mBackends.insert( storage->
type(), storage );
63 delete mBackends.take( storage->
type() );
QgsProjectStorage * projectStorageFromUri(const QString &uri)
Returns storage implementation if the URI matches one. Returns nullptr otherwise (it is a normal file...
void unregisterProjectStorage(QgsProjectStorage *storage)
Unregisters a storage backend and destroys its instance.
void registerProjectStorage(QgsProjectStorage *storage)
Registers a storage backend and takes ownership of it.
~QgsProjectStorageRegistry()
QgsProjectStorage * projectStorageFromType(const QString &type)
Returns storage implementation if the storage type matches one. Returns nullptr otherwise (it is a no...
QList< QgsProjectStorage * > projectStorages() const
Returns a list of registered project storage implementations.
Abstract interface for project storage - to be implemented by various backends and registered in QgsP...
virtual bool isSupportedUri(const QString &uri) const
Returns true if the specified uri is supported by the storage provider.
virtual QString type()=0
Unique identifier of the project storage type.