Commit 206f776a authored by Laurent Montel's avatar Laurent Montel 😁

USe const'ref here too

parent 7b421d59
......@@ -356,7 +356,7 @@ void ProfileWidget::checkInterlace(const QList <MltVideoProfile> &currentStd, co
m_interlaced->setEnabled(allowInterlaced && allowProgressive);
}
ProfileWidget::VIDEOSTD ProfileWidget::getStandard(MltVideoProfile profile)
ProfileWidget::VIDEOSTD ProfileWidget::getStandard(const MltVideoProfile &profile)
{
switch(profile.height) {
case 2160:
......
......@@ -78,7 +78,7 @@ private:
StdSDWide,
StdCustom
};
VIDEOSTD getStandard(MltVideoProfile profile);
VIDEOSTD getStandard(const MltVideoProfile &profile);
void updateCombos();
QStringList getFrameSizes(const QList<MltVideoProfile> &currentStd, const QString &rate);
void checkInterlace(const QList<MltVideoProfile> &currentStd, const QString &size, const QString &rate);
......
......@@ -34,7 +34,7 @@
#include <mlt++/Mlt.h>
// static
QList <ProjectClip *> FilterJob::filterClips(QList <ProjectClip *>clips, const QStringList &params)
QList <ProjectClip *> FilterJob::filterClips(const QList <ProjectClip *> &clips, const QStringList &params)
{
QString condition;
if (params.count() > 3) {
......@@ -58,10 +58,11 @@ QList <ProjectClip *> FilterJob::filterClips(QList <ProjectClip *>clips, const Q
return result;
}
QHash <ProjectClip *, AbstractClipJob *> FilterJob::prepareJob(QList <ProjectClip*> clips, QStringList parameters)
QHash <ProjectClip *, AbstractClipJob *> FilterJob::prepareJob(const QList <ProjectClip*> &clips, const QStringList &parameters)
{
QHash <ProjectClip *, AbstractClipJob *> jobs;
QStringList sources;
sources.reserve(clips.count());
for (int i = 0; i < clips.count(); i++) {
sources << clips.at(i)->url().toLocalFile();
}
......
......@@ -32,8 +32,8 @@ class FilterJob
{
public:
static QList <ProjectClip *> filterClips(QList <ProjectClip *>clips, const QStringList &params);
static QHash <ProjectClip *, AbstractClipJob *> prepareJob(QList <ProjectClip*> clips, QStringList parameters);
static QList <ProjectClip *> filterClips(const QList<ProjectClip *> &clips, const QStringList &params);
static QHash <ProjectClip *, AbstractClipJob *> prepareJob(const QList <ProjectClip*> &clips, const QStringList &parameters);
};
#endif
......@@ -246,7 +246,7 @@ void JobManager::prepareJobFromTimeline(ProjectClip *clip, const QMap<QString,QS
launchJob(clip, job);
}
void JobManager::prepareJobs(QList <ProjectClip *>clips, double fps, AbstractClipJob::JOBTYPE jobType, const QStringList params)
void JobManager::prepareJobs(const QList<ProjectClip *> &clips, double fps, AbstractClipJob::JOBTYPE jobType, const QStringList &params)
{
//TODO filter clips
QList <ProjectClip *> matching = filterClips(clips, jobType, params);
......
......@@ -73,7 +73,7 @@ public:
* @param jobType the jobtype requested
* @param type the parameters for the job
*/
void prepareJobs(QList <ProjectClip *>clips, double fps, AbstractClipJob::JOBTYPE jobType, const QStringList params = QStringList());
void prepareJobs(const QList <ProjectClip *> &clips, double fps, AbstractClipJob::JOBTYPE jobType, const QStringList &params = QStringList());
/** @brief Filter a list of selected clips to keep only those that match the job type
* @param clips the list of selected clips
......
......@@ -720,7 +720,7 @@ void RebuildGroupCommand::redo()
m_view->rebuildGroup(m_childTrack, m_childPos);
}
RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, QList <ItemInfo> info, bool execute, bool refreshOnUndo, QUndoCommand * parent) :
RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, const QList <ItemInfo> &info, bool execute, bool refreshOnUndo, QUndoCommand * parent) :
QUndoCommand(parent),
m_view(view),
m_info(info),
......@@ -729,7 +729,7 @@ RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, QList <ItemI
{
}
RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, ItemInfo info, bool execute, bool refreshOnUndo, QUndoCommand * parent) :
RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, const ItemInfo &info, bool execute, bool refreshOnUndo, QUndoCommand * parent) :
QUndoCommand(parent),
m_view(view),
m_info(QList <ItemInfo>() << info),
......@@ -752,7 +752,7 @@ void RefreshMonitorCommand::redo()
m_exec = true;
}
void RefreshMonitorCommand::updateRange(QList <ItemInfo> info)
void RefreshMonitorCommand::updateRange(const QList <ItemInfo> &info)
{
m_info.clear();
m_info = info;
......
......@@ -399,11 +399,11 @@ private:
class RefreshMonitorCommand : public QUndoCommand
{
public:
RefreshMonitorCommand(CustomTrackView *view, QList <ItemInfo> info, bool execute, bool refreshOnUndo, QUndoCommand * parent = Q_NULLPTR);
RefreshMonitorCommand(CustomTrackView *view, ItemInfo info, bool execute, bool refreshOnUndo, QUndoCommand * parent = Q_NULLPTR);
RefreshMonitorCommand(CustomTrackView *view, const QList<ItemInfo> &info, bool execute, bool refreshOnUndo, QUndoCommand * parent = Q_NULLPTR);
RefreshMonitorCommand(CustomTrackView *view, const ItemInfo &info, bool execute, bool refreshOnUndo, QUndoCommand * parent = Q_NULLPTR);
void undo();
void redo();
void updateRange(QList <ItemInfo> info);
void updateRange(const QList <ItemInfo> &info);
private:
CustomTrackView *m_view;
QList <ItemInfo> m_info;
......
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