Commit 7ac877ea authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ref.

parent 7ee8b6e0
......@@ -339,7 +339,6 @@ bool DocumentChecker::hasErrorInClips()
for (int i = 0; i < max; i++) {
e = missingProxies.at(i).toElement();
QString clipType;
QString realPath = e.attribute("resource");
QString id = e.attribute("id");
// Tell Kdenlive to recreate proxy
......@@ -448,7 +447,7 @@ QString DocumentChecker::getProperty(QDomElement effect, const QString &name)
return QString();
}
void DocumentChecker::setProperty(QDomElement effect, const QString &name, const QString value)
void DocumentChecker::setProperty(QDomElement effect, const QString &name, const QString &value)
{
QDomNodeList params = effect.elementsByTagName("property");
for (int i = 0; i < params.count(); i++) {
......@@ -916,7 +915,7 @@ void DocumentChecker::slotDeleteSelected()
}
}
void DocumentChecker::checkMissingImagesAndFonts(QStringList images, QStringList fonts, const QString &id, const QString &baseClip)
void DocumentChecker::checkMissingImagesAndFonts(const QStringList &images, const QStringList &fonts, const QString &id, const QString &baseClip)
{
QDomDocument doc;
foreach(const QString &img, images) {
......
......@@ -45,10 +45,10 @@ private slots:
void slotPlaceholders();
void slotDeleteSelected();
QString getProperty(QDomElement effect, const QString &name);
void setProperty(QDomElement effect, const QString &name, const QString value);
void setProperty(QDomElement effect, const QString &name, const QString &value);
QString searchLuma(const QDir &dir, const QString &file) const;
/** @brief Check if images and fonts in this clip exists, returns a list of images that do exist so we don't check twice. */
void checkMissingImagesAndFonts(QStringList images, QStringList fonts, const QString &id, const QString &baseClip);
void checkMissingImagesAndFonts(const QStringList &images, const QStringList &fonts, const QString &id, const QString &baseClip);
void slotCheckButtons();
/** @brief Fix duration mismatch issues. */
void slotFixDuration();
......
......@@ -184,7 +184,7 @@ void EffectsListView::slotUpdateSearch(QTreeWidgetItem *item, bool hidden)
}
}
void EffectsListView::slotAutoExpand(QString text)
void EffectsListView::slotAutoExpand(const QString &text)
{
search_effect->updateSearch();
bool selected = false;
......
......@@ -87,7 +87,7 @@ private slots:
/** @brief Expands folders that match our search.
* @param text Current search string */
void slotAutoExpand(QString text);
void slotAutoExpand(const QString &text);
signals:
void addEffect(const QDomElement);
......
......@@ -300,7 +300,7 @@ const QDomElement EffectsListWidget::itemEffect(QTreeWidgetItem *item) const
}
QString EffectsListWidget::currentInfo()
QString EffectsListWidget::currentInfo() const
{
QTreeWidgetItem *item = currentItem();
if (!item || item->data(0, TypeRole).toInt() == (int)EFFECT_FOLDER) return QString();
......
......@@ -37,7 +37,7 @@ public:
explicit EffectsListWidget(QMenu *contextMenu, QWidget *parent = 0);
virtual ~EffectsListWidget();
const QDomElement currentEffect() const;
QString currentInfo();
QString currentInfo() const;
const QDomElement itemEffect(QTreeWidgetItem *item) const;
void initList(QMenu *effectsMenu, KActionCategory *effectActions);
......
......@@ -69,7 +69,7 @@ Monitor *EffectStackEdit::monitor()
return m_metaInfo.monitor;
}
void EffectStackEdit::updateProjectFormat(MltVideoProfile profile, Timecode t)
void EffectStackEdit::updateProjectFormat(const MltVideoProfile &profile, const Timecode &t)
{
m_metaInfo.profile = profile;
m_metaInfo.timecode = t;
......
......@@ -38,7 +38,7 @@ class EffectStackEdit : public QScrollArea
public:
explicit EffectStackEdit(Monitor *monitor, QWidget *parent = 0);
~EffectStackEdit();
void updateProjectFormat(MltVideoProfile profile, Timecode t);
void updateProjectFormat(const MltVideoProfile &profile, const Timecode &t);
static QMap<QString, QImage> iconCache;
/** @brief Sets attribute @param name to @param value.
*
......
......@@ -29,7 +29,7 @@
#include <QTimer>
Geometryval::Geometryval(const MltVideoProfile &profile, Timecode t, const QPoint &frame_size, int startPoint, QWidget* parent) :
Geometryval::Geometryval(const MltVideoProfile &profile, const Timecode &t, const QPoint &frame_size, int startPoint, QWidget* parent) :
QWidget(parent),
m_profile(profile),
m_paramRect(NULL),
......
......@@ -40,7 +40,7 @@ class Geometryval : public QWidget, public Ui::Geometryval
{
Q_OBJECT
public:
explicit Geometryval(const MltVideoProfile &profile, Timecode t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
explicit Geometryval(const MltVideoProfile &profile, const Timecode &t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
virtual ~Geometryval();
QDomElement getParamDesc();
QString getValue() const;
......
......@@ -38,7 +38,7 @@
GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, bool isEffect, bool showRotation, QWidget* parent):
GeometryWidget::GeometryWidget(Monitor* monitor, const Timecode &timecode, int clipPos, bool isEffect, bool showRotation, QWidget* parent):
QWidget(parent),
m_monitor(monitor),
m_timePos(new TimecodeDisplay(timecode)),
......@@ -378,7 +378,7 @@ void GeometryWidget::setupParam(const QDomElement elem, int minframe, int maxfra
slotPositionChanged(0, false);
}
void GeometryWidget::addParameter(const QDomElement elem)
void GeometryWidget::addParameter(const QDomElement &elem)
{
Mlt::Geometry *geometry = new Mlt::Geometry(elem.attribute("value").toUtf8().data(), m_outPoint - m_inPoint, m_monitor->render->frameRenderWidth(), m_monitor->render->renderHeight());
m_extraGeometries.append(geometry);
......
......@@ -48,7 +48,7 @@ public:
* @param isEffect true if used in an effect, false if used in a transition
* @param showRotation Should we show or hide the rotation sliders
* @param parent (optional) Parent widget */
GeometryWidget(Monitor *monitor, Timecode timecode, int clipPos, bool isEffect, bool showRotation, QWidget* parent = 0);
GeometryWidget(Monitor *monitor, const Timecode &timecode, int clipPos, bool isEffect, bool showRotation, QWidget* parent = 0);
virtual ~GeometryWidget();
/** @brief Gets the geometry as a serialized string. */
QString getValue() const;
......@@ -57,7 +57,7 @@ public:
void updateTimecodeFormat();
/** @brief Sets the size of the original clip. */
void setFrameSize(QPoint size);
void addParameter(const QDomElement elem);
void addParameter(const QDomElement &elem);
void importKeyframes(const QString &data, int maximum);
int currentPosition() const;
......
......@@ -29,7 +29,7 @@
#include <QGraphicsView>
#include <QScrollBar>
Guide::Guide(CustomTrackView *view, GenTime pos, const QString &label, double height) :
Guide::Guide(CustomTrackView *view, const GenTime &pos, const QString &label, double height) :
QGraphicsLineItem(),
m_position(pos),
m_label(label),
......
......@@ -34,7 +34,7 @@ class Guide : public QGraphicsLineItem
{
public:
Guide(CustomTrackView *view, GenTime pos, const QString &label, double height);
Guide(CustomTrackView *view, const GenTime &pos, const QString &label, double height);
GenTime position() const;
void updateGuide(const GenTime &newPos, const QString &comment = QString());
QString label() const;
......
......@@ -96,7 +96,7 @@ HeaderTrack::HeaderTrack(int index, TrackInfo info, int height, const QList <QAc
{
}*/
void HeaderTrack::updateEffectLabel(QStringList effects)
void HeaderTrack::updateEffectLabel(const QStringList &effects)
{
if (!effects.isEmpty()) {
effect_label->setHidden(false);
......
......@@ -38,7 +38,7 @@ public:
void adjustSize(int height);
void setSelectedIndex(int ix);
/** @brief Update the track label to show if current track has effects or not.*/
void updateEffectLabel(QStringList effects);
void updateEffectLabel(const QStringList &effects);
protected:
virtual void mousePressEvent(QMouseEvent * event);
......
......@@ -265,7 +265,7 @@ void ShuttleThread::jog(unsigned int value)
}
JogShuttle::JogShuttle(QString device, QObject *parent) :
JogShuttle::JogShuttle(const QString &device, QObject *parent) :
QObject(parent)
{
initDevice(device);
......@@ -276,7 +276,7 @@ JogShuttle::~JogShuttle()
stopDevice();
}
void JogShuttle::initDevice(QString device)
void JogShuttle::initDevice(const QString &device)
{
if (m_shuttleProcess.isRunning()) {
if (device == m_shuttleProcess.m_device) return;
......
......@@ -55,10 +55,10 @@ private:
class JogShuttle: public QObject
{
Q_OBJECT public:
explicit JogShuttle(QString device, QObject * parent = 0);
explicit JogShuttle(const QString &device, QObject * parent = 0);
~JogShuttle();
void stopDevice();
void initDevice(QString device);
void initDevice(const QString &device);
protected:
virtual void customEvent(QEvent * e);
......
......@@ -31,7 +31,7 @@ class KeyframeHelper : public QWidget
{
Q_OBJECT
public:
KeyframeHelper(QWidget *parent = 0);
explicit KeyframeHelper(QWidget *parent = 0);
int value() const;
int frameLength;
......
......@@ -26,7 +26,7 @@
#include <KDebug>
MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, const QString &caption, QWidget * parent) :
MarkerDialog::MarkerDialog(DocClipBase *clip, const CommentedTime &t, const Timecode &tc, const QString &caption, QWidget * parent) :
QDialog(parent)
, m_producer(NULL)
, m_profile(NULL)
......
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