Commit 054ff5c4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify

parent 9b507272
......@@ -952,7 +952,7 @@ void EffectStackView2::dropEvent(QDropEvent *event)
processDroppedEffect(doc.documentElement(), event);
}
void EffectStackView2::setKeyframes(const QString data, int maximum)
void EffectStackView2::setKeyframes(const QString &data, int maximum)
{
for (int i = 0; i < m_effects.count(); i++) {
if (m_effects.at(i)->isActive()) {
......
......@@ -76,7 +76,7 @@ public:
static const QString getStyleSheet();
/** @brief Import keyframes from the clip metadata */
void setKeyframes(const QString data, int maximum);
void setKeyframes(const QString &data, int maximum);
protected:
virtual void mouseMoveEvent(QMouseEvent * event);
......
......@@ -95,7 +95,7 @@ class Fontval: public QWidget, public Ui::Fontval_UI
};
ParameterContainer::ParameterContainer(QDomElement effect, ItemInfo info, EffectMetaInfo *metaInfo, QWidget * parent) :
ParameterContainer::ParameterContainer(const QDomElement &effect, ItemInfo info, EffectMetaInfo *metaInfo, QWidget * parent) :
m_keyframeEditor(NULL),
m_geometryWidget(NULL),
m_metaInfo(metaInfo),
......
......@@ -47,7 +47,7 @@ class MySpinBox : public QSpinBox
Q_OBJECT
public:
MySpinBox(QWidget * parent = 0);
explicit MySpinBox(QWidget * parent = 0);
protected:
virtual void focusInEvent(QFocusEvent*);
......@@ -59,7 +59,7 @@ class ParameterContainer : public QObject
Q_OBJECT
public:
ParameterContainer(QDomElement effect, ItemInfo info, EffectMetaInfo *metaInfo, QWidget * parent = 0);
ParameterContainer(const QDomElement &effect, ItemInfo info, EffectMetaInfo *metaInfo, QWidget * parent = 0);
~ParameterContainer();
void updateTimecodeFormat();
void updateProjectFormat(MltVideoProfile profile, Timecode t);
......
......@@ -35,7 +35,7 @@ static void consumer_frame_render(mlt_consumer, MeltJob * self, mlt_frame frame_
self->emitFrameNumber((int) frame.get_position());
}
MeltJob::MeltJob(CLIPTYPE cType, const QString &id, QStringList parameters, QMap <QString, QString>extraParams) : AbstractClipJob(MLTJOB, cType, id, parameters),
MeltJob::MeltJob(CLIPTYPE cType, const QString &id, const QStringList &parameters, const QMap <QString, QString>&extraParams) : AbstractClipJob(MLTJOB, cType, id, parameters),
addClipToProject(0),
m_consumer(NULL),
m_producer(NULL),
......
......@@ -41,7 +41,7 @@ class MeltJob : public AbstractClipJob
Q_OBJECT
public:
MeltJob(CLIPTYPE cType, const QString &id, QStringList parameters, stringMap extraParams = stringMap());
MeltJob(CLIPTYPE cType, const QString &id, const QStringList& parameters, const stringMap& extraParams = stringMap());
virtual ~ MeltJob();
const QString destination() const;
void startJob();
......
......@@ -25,7 +25,7 @@
#include <KDebug>
#include <KLocale>
ProxyJob::ProxyJob(CLIPTYPE cType, const QString &id, QStringList parameters) : AbstractClipJob(PROXYJOB, cType, id, parameters),
ProxyJob::ProxyJob(CLIPTYPE cType, const QString &id, const QStringList& parameters) : AbstractClipJob(PROXYJOB, cType, id, parameters),
m_jobDuration(0),
m_isFfmpegJob(true)
{
......
......@@ -32,7 +32,7 @@ class ProxyJob : public AbstractClipJob
Q_OBJECT
public:
ProxyJob(CLIPTYPE cType, const QString &id, QStringList parameters);
ProxyJob(CLIPTYPE cType, const QString &id, const QStringList& parameters);
virtual ~ ProxyJob();
const QString destination() const;
void startJob();
......
......@@ -139,7 +139,7 @@ void StopmotionMonitor::slotMouseSeek(int /*eventDelta*/, bool /*fast*/)
{
}
StopmotionWidget::StopmotionWidget(MonitorManager *manager, const KUrl &projectFolder, QList< QAction* > actions, QWidget* parent) :
StopmotionWidget::StopmotionWidget(MonitorManager *manager, const KUrl &projectFolder, const QList<QAction *> &actions, QWidget* parent) :
QDialog(parent)
, Ui::Stopmotion_UI()
, m_projectFolder(projectFolder)
......
......@@ -92,7 +92,7 @@ public:
* @param projectFolder The current project folder, where captured files will be stored.
* @param actions The actions for this widget that can have a keyboard shortcut.
* @param parent (optional) parent widget */
StopmotionWidget(MonitorManager *manager, const KUrl &projectFolder, QList< QAction* > actions, QWidget* parent = 0);
StopmotionWidget(MonitorManager *manager, const KUrl &projectFolder, const QList< QAction* > &actions, QWidget* parent = 0);
virtual ~StopmotionWidget();
protected:
......
......@@ -44,7 +44,7 @@ V4lCaptureHandler::V4lCaptureHandler()
//static
QStringList V4lCaptureHandler::getDeviceName(QString input)
QStringList V4lCaptureHandler::getDeviceName(const QString &input)
{
char *src = strdup(input.toUtf8().constData());
......
......@@ -32,7 +32,7 @@ class V4lCaptureHandler
public:
V4lCaptureHandler();
static QStringList getDeviceName(QString input);
static QStringList getDeviceName(const QString &input);
};
......
......@@ -117,7 +117,7 @@ QImage MltPreview::getFrame(Mlt::Producer *producer, int framepos, int /*width*/
}
uint MltPreview::imageVariance(QImage image)
uint MltPreview::imageVariance(const QImage &image)
{
if (image.isNull()) return 0;
uint delta = 0;
......
......@@ -41,7 +41,7 @@ public:
virtual Flags flags() const;
protected:
static uint imageVariance(QImage image);
static uint imageVariance(const QImage &image);
QImage getFrame(Mlt::Producer* producer, int framepos, int width, int height);
};
......
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