Commit b00e1927 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Making metaDataComputed and snapshotComputed parameter a const Media*

parent 4e7a52a9
......@@ -173,7 +173,7 @@ ImportController::clipSelection( const QUuid& uuid )
}
void
ImportController::updateMediaRequested( Media *media )
ImportController::updateMediaRequested( const Media *media )
{
if ( m_temporaryMedias.contains( media->uuid() ) == false )
return ;
......@@ -240,11 +240,11 @@ ImportController::importMedia( const QString &filePath )
return ;
Media* media = new Media( filePath );
connect( media, SIGNAL( metaDataComputed( Media* ) ),
this, SLOT( updateMediaRequested( Media* ) ) );
connect( media, SIGNAL( snapshotComputed( Media* ) ),
this, SLOT( updateMediaRequested( Media* ) ) );
connect( media, SIGNAL( snapshotComputed( Media* ) ),
connect( media, SIGNAL( metaDataComputed( const Media* ) ),
this, SLOT( updateMediaRequested( const Media* ) ) );
connect( media, SIGNAL( snapshotComputed( const Media* ) ),
this, SLOT( updateMediaRequested( const Media* ) ) );
connect( media, SIGNAL( snapshotComputed( const Media* ) ),
this, SLOT( mediaLoaded() ) );
m_temporaryMedias[media->uuid()] = media;
MetaDataManager::getInstance()->computeMediaMetadata( media );
......
......@@ -87,7 +87,7 @@ class ImportController : public QDialog
quint32 m_nbMediaLoaded;
public slots:
void updateMediaRequested( Media* media );
void updateMediaRequested( const Media* media );
void accept();
void reject();
void mediaSelection( const QUuid& uuid );
......
......@@ -53,11 +53,12 @@ ImportMediaListController::addMedia( Media* media )
m_mediaCellList->insert( media->uuid(), cell );
if ( media->baseClip() == NULL )
connect( media, SIGNAL( metaDataComputed( Media* ) ), cell, SLOT( enableCell() ) );
connect( media, SIGNAL( metaDataComputed( const Media* ) ),
cell, SLOT( enableCell() ) );
}
void
ImportMediaListController::metaDataComputed( Media* media )
ImportMediaListController::metaDataComputed( const Media* media )
{
m_mediaCellList->value( media->uuid() )->setThumbnail( media->snapshot() );
}
......
......@@ -56,7 +56,7 @@ class ImportMediaListController : public ListViewController
int m_clipDeleted;
public slots:
void metaDataComputed( Media* media );
void metaDataComputed( const Media* media );
void clipDeletion( const QUuid& uuid );
void clipAdded( Clip* clip );
......
......@@ -48,8 +48,8 @@ void MediaListViewController::newMediaLoaded( Media* media )
this, SIGNAL( mediaDeleted( QUuid ) ) );
connect( cell, SIGNAL( arrowClicked( const QUuid& ) ),
this, SLOT( showClipList( const QUuid& ) ) );
connect( media, SIGNAL( snapshotComputed( Media* ) ),
this, SLOT( updateCell( Media* ) ) );
connect( media, SIGNAL( snapshotComputed( const Media* ) ),
this, SLOT( updateCell( const Media* ) ) );
cell->setNbClips( media->clips()->size() );
cell->setThumbnail( media->snapshot() );
cell->setTitle( media->fileName() );
......@@ -88,7 +88,7 @@ void MediaListViewController::mediaRemoved( const QUuid& uuid )
m_currentUuid = QUuid();
}
void MediaListViewController::updateCell( Media* media )
void MediaListViewController::updateCell( const Media* media )
{
MediaCellView* cell = qobject_cast<MediaCellView*>( m_cells->value( media->uuid(), NULL ) );
if ( cell != NULL )
......
......@@ -29,7 +29,7 @@ public slots:
void newMediaLoaded( Media* media );
void cellSelection( const QUuid& uuid );
void mediaRemoved( const QUuid& uuid );
void updateCell( Media* media );
void updateCell( const Media* media );
void showClipList( const QUuid& uuid );
void newClipAdded( Clip* clip );
void clipSelection( const QUuid& uuid );
......
......@@ -176,8 +176,8 @@ protected:
int m_nbVideoTracks;
signals:
void metaDataComputed( Media* );
void snapshotComputed( Media* );
void metaDataComputed( const Media* );
void snapshotComputed( const Media* );
void audioSpectrumComputed( const QUuid& );
};
......
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