Commit fc1415ba authored by Laurent Montel's avatar Laurent Montel 😁

add explicit keyword when necessary. Add const ref when necessary

parent 8ba16be0
......@@ -27,7 +27,7 @@
#include <KFileDialog>
ClipTranscode::ClipTranscode(KUrl::List urls, const QString &params, const QStringList &postParams, const QString &description, bool automaticMode, QWidget * parent) :
ClipTranscode::ClipTranscode(const KUrl::List &urls, const QString &params, const QStringList &postParams, const QString &description, bool automaticMode, QWidget * parent) :
QDialog(parent), m_urls(urls), m_duration(0), m_automaticMode(automaticMode), m_postParams(postParams)
{
setFont(KGlobalSettings::toolBarFont());
......
......@@ -37,7 +37,7 @@ class ClipTranscode : public QDialog, public Ui::ClipTranscode_UI
Q_OBJECT
public:
ClipTranscode(KUrl::List urls, const QString &params, const QStringList &postParams, const QString &description, bool automaticMode = false, QWidget * parent = 0);
ClipTranscode(const KUrl::List &urls, const QString &params, const QStringList &postParams, const QString &description, bool automaticMode = false, QWidget * parent = 0);
~ClipTranscode();
public slots:
......
......@@ -131,12 +131,12 @@ void ComplexParameter::slotUpdateEffectParams(QDomElement e)
emit parameterChanged();
}
QDomElement ComplexParameter::getParamDesc()
QDomElement ComplexParameter::getParamDesc() const
{
return m_param;
}
void ComplexParameter::slotUpdateParameterList(QStringList l)
void ComplexParameter::slotUpdateParameterList(const QStringList &l)
{
kDebug() << l ;
m_ui.parameterList->clear();
......
......@@ -29,8 +29,8 @@ class ComplexParameter : public QWidget
Q_OBJECT
public:
ComplexParameter(QWidget *parent = 0);
QDomElement getParamDesc();
explicit ComplexParameter(QWidget *parent = 0);
QDomElement getParamDesc() const;
private:
Ui::KeyframeWidget_UI m_ui;
QDomElement m_param;
......@@ -47,7 +47,7 @@ public slots:
void itemSelectionChanged();
void setupParam(const QDomElement, const QString& paramName, int, int);
void slotUpdateEffectParams(QDomElement e);
void slotUpdateParameterList(QStringList);
void slotUpdateParameterList(const QStringList &);
signals:
void removeEffect(ClipItem*, QDomElement);
void updateClipEffect(ClipItem*, QDomElement);
......
......@@ -265,7 +265,7 @@ class CommentedTime
{
public:
CommentedTime(): t(GenTime(0)), type(0) {}
CommentedTime(const GenTime &time, QString comment, int markerType = 0)
CommentedTime(const GenTime &time, const QString& comment, int markerType = 0)
: t(time), c(comment), type(markerType) { }
QString comment() const {
......
......@@ -432,7 +432,7 @@ bool DocumentChecker::hasErrorInClips()
DocumentChecker::~DocumentChecker()
{
if (m_dialog) delete m_dialog;
delete m_dialog;
}
......
......@@ -45,7 +45,7 @@ class EffectsListView : public QWidget, public Ui::EffectList_UI
Q_OBJECT
public:
EffectsListView(QWidget *parent = 0);
explicit EffectsListView(QWidget *parent = 0);
/** @brief Re-initializes the list of effects. */
void reloadEffectList(QMenu *effectsMenu, KActionCategory *effectActions);
......
......@@ -1850,7 +1850,7 @@ const QMap <QString, QString> KdenliveDoc::metadata() const
return m_documentMetadata;
}
void KdenliveDoc::setMetadata(const QMap <QString, QString> meta)
void KdenliveDoc::setMetadata(const QMap<QString, QString> &meta)
{
setModified(true);
m_documentMetadata = meta;
......
......@@ -167,7 +167,7 @@ Q_OBJECT public:
/** @brief Returns the document metadata (author, copyright, ...) */
const QMap <QString, QString> metadata() const;
/** @brief Set the document metadata (author, copyright, ...) */
void setMetadata(const QMap <QString, QString> meta);
void setMetadata(const QMap <QString, QString>& meta);
private:
KUrl m_url;
......
......@@ -53,7 +53,7 @@ class KThumb: public QObject
Q_OBJECT
public:
KThumb(ClipManager *clipManager, const KUrl &url, const QString &id, const QString &hash, QObject * parent = 0);
explicit KThumb(ClipManager *clipManager, const KUrl &url, const QString &id, const QString &hash, QObject * parent = 0);
~KThumb();
void setProducer(Mlt::Producer *producer);
bool hasProducer() const;
......
......@@ -32,7 +32,7 @@ class MonitorManager : public QObject
Q_OBJECT
public:
MonitorManager(QWidget *parent = 0);
explicit MonitorManager(QWidget *parent = 0);
void initMonitors(Monitor *clipMonitor, Monitor *projectMonitor, RecMonitor *recMonitor);
void appendMonitor(AbstractMonitor *monitor);
void removeMonitor(AbstractMonitor *monitor);
......
......@@ -26,7 +26,7 @@ class ParameterPlotter : public KPlotWidget
{
Q_OBJECT
public:
ParameterPlotter(QWidget *parent = 0);
explicit ParameterPlotter(QWidget *parent = 0);
virtual ~ParameterPlotter() {}
void setMoveX(bool);
void setMoveY(bool);
......@@ -36,7 +36,7 @@ public:
bool isMoveY();
bool isMoveTimeline();
bool isNewPoints();
void replot(const QString& name = "");
void replot(const QString& name = QString());
private:
KPlotPoint* m_movepoint;
int m_activeIndexPlot;
......
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