Commit f0867739 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const ref

parent 7d4849cc
......@@ -35,7 +35,7 @@ const int JobTypeRole = Qt::UserRole + 6;
const int JobStatusMessage = Qt::UserRole + 7;
const int itemHeight = 38;
ProjectItem::ProjectItem(QTreeWidget * parent, DocClipBase *clip, QSize pixmapSize) :
ProjectItem::ProjectItem(QTreeWidget * parent, DocClipBase *clip, const QSize &pixmapSize) :
QTreeWidgetItem(parent, PROJECTCLIPTYPE),
m_clip(clip),
m_clipId(clip->getId()),
......@@ -44,7 +44,7 @@ ProjectItem::ProjectItem(QTreeWidget * parent, DocClipBase *clip, QSize pixmapSi
buildItem(pixmapSize);
}
ProjectItem::ProjectItem(QTreeWidgetItem * parent, DocClipBase *clip, QSize pixmapSize) :
ProjectItem::ProjectItem(QTreeWidgetItem * parent, DocClipBase *clip, const QSize &pixmapSize) :
QTreeWidgetItem(parent, PROJECTCLIPTYPE),
m_clip(clip),
m_clipId(clip->getId()),
......@@ -101,7 +101,7 @@ bool ProjectItem::hasPixmap() const
return m_pixmapSet;
}
void ProjectItem::setPixmap(const QPixmap p)
void ProjectItem::setPixmap(const QPixmap& p)
{
m_pixmapSet = true;
setData(0, Qt::DecorationRole, p);
......@@ -295,7 +295,7 @@ bool ProjectItem::isProxyRunning() const
return false;
}
bool ProjectItem::playlistHasProxies(const QString path)
bool ProjectItem::playlistHasProxies(const QString& path)
{
kDebug()<<"// CHECKING FOR PROXIES";
QFile file(path);
......
......@@ -41,8 +41,8 @@ class DocClipBase;
class ProjectItem : public QTreeWidgetItem
{
public:
ProjectItem(QTreeWidget * parent, DocClipBase *clip, QSize pixmapSize);
ProjectItem(QTreeWidgetItem * parent, DocClipBase *clip, QSize pixmapSize);
ProjectItem(QTreeWidget * parent, DocClipBase *clip, const QSize &pixmapSize);
ProjectItem(QTreeWidgetItem * parent, DocClipBase *clip, const QSize &pixmapSize);
virtual ~ProjectItem();
QDomElement toXml() const;
int numReferences() const;
......@@ -79,7 +79,7 @@ public:
/** \brief Returns true if the thumbnail for this clip has been loaded. */
bool hasPixmap() const;
/** \brief Sets the thumbnail for this clip. */
void setPixmap(const QPixmap p);
void setPixmap(const QPixmap& p);
virtual bool operator<(const QTreeWidgetItem &other)const {
int column = treeWidget()->sortColumn();
......@@ -96,7 +96,7 @@ private:
/** @brief Setup basic properties */
void buildItem(QSize pixmapSize);
/** @brief Check if an xml project file has proxies */
bool playlistHasProxies(const QString path);
bool playlistHasProxies(const QString& path);
};
#endif
......@@ -1496,7 +1496,7 @@ void ProjectList::getCachedThumbnail(ProjectItem *item)
}
}
QPixmap ProjectList::roundedPixmap(QImage img)
QPixmap ProjectList::roundedPixmap(const QImage &img)
{
QPixmap pix(img.width(), img.height());
pix.fill(Qt::transparent);
......@@ -1510,7 +1510,7 @@ QPixmap ProjectList::roundedPixmap(QImage img)
return pix;
}
QPixmap ProjectList::roundedPixmap(QPixmap source)
QPixmap ProjectList::roundedPixmap(const QPixmap &source)
{
QPixmap pix(source.width(), source.height());
pix.fill(Qt::transparent);
......
......@@ -87,7 +87,7 @@ signals:
namespace Mlt
{
class Producer;
};
}
class ProjectItem;
class ProjectListView;
......@@ -426,8 +426,8 @@ private:
/** @brief Start an MLT process job. */
void processClipJob(QStringList ids, const QString&destination, bool autoAdd, QStringList jobParams, const QString &description, stringMap extraParams = stringMap());
/** @brief Create rounded shape pixmap for project tree thumb. */
QPixmap roundedPixmap(QImage img);
QPixmap roundedPixmap(QPixmap source);
QPixmap roundedPixmap(const QImage &img);
QPixmap roundedPixmap(const QPixmap &source);
/** @brief Extract a clip's metadata with the exiftool program. */
void extractMetadata(DocClipBase *clip);
/** @brief Add a special FFmpeg tag if clip matches some properties (for example set full_luma for Sony NEX camcorders. */
......
......@@ -35,7 +35,7 @@
#include <QDir>
#include <kmessagebox.h>
ProjectSettings::ProjectSettings(ProjectList *projectlist, QMap <QString, QString> metadata, QStringList lumas, int videotracks, int audiotracks, const QString projectPath, bool readOnlyTracks, bool savedProject, QWidget * parent) :
ProjectSettings::ProjectSettings(ProjectList *projectlist, QMap <QString, QString> metadata, QStringList lumas, int videotracks, int audiotracks, const QString &projectPath, bool readOnlyTracks, bool savedProject, QWidget * parent) :
QDialog(parent), m_savedProject(savedProject), m_projectList(projectlist), m_lumas(lumas)
{
setupUi(this);
......
......@@ -32,7 +32,7 @@ class ProjectSettings : public QDialog, public Ui::ProjectSettings_UI
Q_OBJECT
public:
ProjectSettings(ProjectList *projectlist, QMap <QString, QString> metadata, QStringList lumas, int videotracks, int audiotracks, const QString projectPath, bool readOnlyTracks, bool unsavedProject, QWidget * parent = 0);
ProjectSettings(ProjectList *projectlist, QMap <QString, QString> metadata, QStringList lumas, int videotracks, int audiotracks, const QString& projectPath, bool readOnlyTracks, bool unsavedProject, QWidget * parent = 0);
QString selectedProfile() const;
KUrl selectedFolder() const;
QPoint tracks();
......
......@@ -1391,7 +1391,7 @@ void RenderWidget::refreshView(const QString &profile)
}
}
KUrl RenderWidget::filenameWithExtension(KUrl url, QString extension)
KUrl RenderWidget::filenameWithExtension(KUrl url, const QString &extension)
{
if (url.isEmpty()) url = KUrl(m_projectFolder);
QString directory = url.directory(KUrl::AppendTrailingSlash | KUrl::ObeyTrailingSlash);
......
......@@ -198,7 +198,7 @@ private:
void parseProfiles(const QString &meta = QString(), const QString &group = QString(), const QString &profile = QString());
void parseFile(const QString &exportFile, bool editable);
void updateButtons();
KUrl filenameWithExtension(KUrl url, QString extension);
KUrl filenameWithExtension(KUrl url, const QString &extension);
/** @brief Check if a job needs to be started. */
void checkRenderStatus();
void startRendering(RenderJobItem *item);
......
......@@ -108,7 +108,7 @@ void SmallRuler::setZone(int start, int end)
updatePixmap();
}
void SmallRuler::setMarkers(QList < CommentedTime > list)
void SmallRuler::setMarkers(const QList<CommentedTime> &list)
{
m_markers = list;
updatePixmap();
......
......@@ -41,7 +41,7 @@ public:
void setZoneStart();
void setZoneEnd();
QPoint zone();
void setMarkers(QList < CommentedTime > list);
void setMarkers(const QList < CommentedTime >& list);
void updatePalette();
void refreshRuler();
......
......@@ -77,7 +77,7 @@ QPoint SubProjectItem::zone() const
return z;
}
void SubProjectItem::setZone(QPoint p)
void SubProjectItem::setZone(const QPoint& p)
{
m_in = p.x();
m_out = p.y();
......
......@@ -44,7 +44,7 @@ public:
int numReferences() const;
DocClipBase *referencedClip();
QPoint zone() const;
void setZone(QPoint p);
void setZone(const QPoint &p);
QString description() const;
void setDescription(QString desc);
static int itemDefaultHeight();
......
......@@ -39,7 +39,7 @@
#include <QScrollBar>
#include <QInputDialog>
TrackView::TrackView(KdenliveDoc *doc, QList <QAction*> actions, bool *ok, QWidget *parent) :
TrackView::TrackView(KdenliveDoc *doc, const QList<QAction *> &actions, bool *ok, QWidget *parent) :
QWidget(parent),
m_scale(1.0),
m_projectTracks(0),
......
......@@ -50,7 +50,7 @@ class TrackView : public QWidget, public Ui::TimeLine_UI
Q_OBJECT
public:
explicit TrackView(KdenliveDoc *doc, QList <QAction *> actions, bool *ok, QWidget *parent = 0);
explicit TrackView(KdenliveDoc *doc, const QList <QAction *>& actions, bool *ok, QWidget *parent = 0);
virtual ~ TrackView();
void setEditMode(const QString & editMode);
const QString & editMode() const;
......
......@@ -33,7 +33,7 @@
#include <QPropertyAnimation>
#endif
Transition::Transition(const ItemInfo &info, int transitiontrack, double fps, QDomElement params, bool automaticTransition) :
Transition::Transition(const ItemInfo &info, int transitiontrack, double fps, const QDomElement &params, bool automaticTransition) :
AbstractClipItem(info, QRectF(), fps),
m_forceTransitionTrack(false),
m_automaticTransition(automaticTransition),
......
......@@ -41,7 +41,7 @@ class Transition : public AbstractClipItem
Q_OBJECT
public:
Transition(const ItemInfo &info, int transitiontrack, double fps, QDomElement params = QDomElement(), bool automaticTransition = false);
Transition(const ItemInfo &info, int transitiontrack, double fps, const QDomElement &params = QDomElement(), bool automaticTransition = false);
virtual ~Transition();
virtual void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
......
......@@ -69,7 +69,7 @@ TransitionSettings::TransitionSettings(Monitor *monitor, QWidget* parent) :
connect(m_effectEdit, SIGNAL(parameterChanged(QDomElement,QDomElement,int)), this , SLOT(slotUpdateEffectParams(QDomElement,QDomElement)));
}
void TransitionSettings::updateProjectFormat(MltVideoProfile profile, Timecode t, const QList <TrackInfo> info)
void TransitionSettings::updateProjectFormat(MltVideoProfile profile, Timecode t, const QList<TrackInfo> &info)
{
m_effectEdit->updateProjectFormat(profile, t);
m_tracks = info;
......
......@@ -34,7 +34,7 @@ class TransitionSettings : public QWidget, public Ui::TransitionSettings_UI
public:
explicit TransitionSettings(Monitor *monitor, QWidget* parent = 0);
void raiseWindow(QWidget*);
void updateProjectFormat(MltVideoProfile profile, Timecode t, const QList <TrackInfo> info);
void updateProjectFormat(MltVideoProfile profile, Timecode t, const QList <TrackInfo>& info);
void updateTimecodeFormat();
void setKeyframes(const QString &data, int maximum);
......
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