Commit e9d52b31 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Library: Grammar

parent a63f0e5d
...@@ -58,7 +58,7 @@ void ...@@ -58,7 +58,7 @@ void
Library::preSave() Library::preSave()
{ {
QVariantList l; QVariantList l;
for ( auto val : m_medias ) for ( auto val : m_media )
l << val->toVariant(); l << val->toVariant();
m_settings->value( "medias" )->set( l ); m_settings->value( "medias" )->set( l );
l.clear(); l.clear();
...@@ -94,9 +94,9 @@ void ...@@ -94,9 +94,9 @@ void
Library::addMedia( Media* media ) Library::addMedia( Media* media )
{ {
setCleanState( false ); setCleanState( false );
if ( m_medias.contains( media->fileInfo()->absoluteFilePath() ) ) if ( m_media.contains( media->fileInfo()->absoluteFilePath() ) )
return; return;
m_medias[media->fileInfo()->absoluteFilePath()] = media; m_media[media->fileInfo()->absoluteFilePath()] = media;
} }
bool bool
...@@ -113,7 +113,7 @@ Library::addClip( Clip *clip ) ...@@ -113,7 +113,7 @@ Library::addClip( Clip *clip )
} }
} }
setCleanState( false ); setCleanState( false );
m_medias[clip->media()->fileInfo()->absoluteFilePath()] = clip->media(); m_media[clip->media()->fileInfo()->absoluteFilePath()] = clip->media();
return true; return true;
} }
...@@ -126,7 +126,7 @@ Library::isInCleanState() const ...@@ -126,7 +126,7 @@ Library::isInCleanState() const
Media* Media*
Library::media(const QString& mrl) Library::media(const QString& mrl)
{ {
return m_medias.value( mrl ); return m_media.value( mrl );
} }
Clip* Clip*
...@@ -144,7 +144,7 @@ Library::clip( const QUuid& uuid ) ...@@ -144,7 +144,7 @@ Library::clip( const QUuid& uuid )
void void
Library::clear() Library::clear()
{ {
m_medias.clear(); m_media.clear();
m_clips.clear(); m_clips.clear();
setCleanState( true ); setCleanState( true );
} }
......
...@@ -71,7 +71,7 @@ private: ...@@ -71,7 +71,7 @@ private:
bool m_cleanState; bool m_cleanState;
Settings* m_settings; Settings* m_settings;
QHash<QString, Media*> m_medias; QHash<QString, Media*> m_media;
/** /**
* @brief m_clips contains all the clips loaded in the library, without any * @brief m_clips contains all the clips loaded in the library, without any
* subclip hierarchy * subclip hierarchy
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment