Commit 9b507272 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use const'ref

parent 9958f4a6
......@@ -32,7 +32,7 @@
#include <QInputDialog>
#include <QProcess>
QStringList SamplePlugin::generators(const QStringList producers) const
QStringList SamplePlugin::generators(const QStringList &producers) const
{
QStringList result;
if (producers.contains("pango")) result << i18n("Countdown");
......
......@@ -34,7 +34,7 @@ class SamplePlugin : public QObject, public ClipGenerator
Q_INTERFACES(ClipGenerator)
public:
QStringList generators(const QStringList producers = QStringList()) const;
QStringList generators(const QStringList &producers = QStringList()) const;
KUrl generatedClip(const QString &renderer, const QString &generator, const KUrl &projectFolder, const QStringList &lumaNames, const QStringList &lumaFiles, const double fps, const int width, const int height);
};
......
......@@ -32,7 +32,7 @@
class SleepThread : QThread
{
public:
virtual void run() {};
virtual void run() {}
static void msleep(unsigned long msecs) {
QThread::msleep(msecs);
}
......@@ -118,7 +118,7 @@ RenderJob::RenderJob(bool erase, bool usekuiserver, int pid, const QString& rend
RenderJob::~RenderJob()
{
if (m_renderProcess) delete m_renderProcess;
delete m_renderProcess;
if (m_enablelog) {
m_logfile.close();
}
......
......@@ -45,11 +45,10 @@ BezierSplineEditor::BezierSplineEditor(QWidget* parent) :
BezierSplineEditor::~BezierSplineEditor()
{
if (m_pixmapCache)
delete m_pixmapCache;
delete m_pixmapCache;
}
CubicBezierSpline BezierSplineEditor::spline()
CubicBezierSpline BezierSplineEditor::spline() const
{
return m_spline;
}
......
......@@ -32,7 +32,7 @@ public:
BezierSplineEditor(QWidget* parent = 0);
virtual ~BezierSplineEditor();
CubicBezierSpline spline();
CubicBezierSpline spline() const;
void setSpline(const CubicBezierSpline &spline);
/** @brief Returns the selected point or else BPoint. */
......
......@@ -97,7 +97,7 @@ BezierSplineWidget::BezierSplineWidget(const QString& spline, QWidget* parent) :
m_ui.buttonShowAllHandles->setChecked(KdenliveSettings::bezier_showallhandles());
}
QString BezierSplineWidget::spline()
QString BezierSplineWidget::spline() const
{
return m_edit.spline().toString();
}
......
......@@ -37,7 +37,7 @@ public:
explicit BezierSplineWidget(const QString &spline, QWidget* parent = 0);
/** @brief Returns the current spline. */
QString spline();
QString spline() const;
/** The curvemodes refer to the usage of the spline.
* As this widget is currently only used for frei0r.curves the modes are the channels this filter accepts. */
......
......@@ -22,7 +22,7 @@
#include <KLocale>
AddClipCutCommand::AddClipCutCommand(ProjectList *list, const QString &id, int in, int out, const QString desc, bool newItem, bool remove, QUndoCommand * parent) :
AddClipCutCommand::AddClipCutCommand(ProjectList *list, const QString &id, int in, int out, const QString& desc, bool newItem, bool remove, QUndoCommand * parent) :
QUndoCommand(parent),
m_list(list),
m_id(id),
......
......@@ -29,7 +29,7 @@ class ProjectList;
class AddClipCutCommand : public QUndoCommand
{
public:
AddClipCutCommand(ProjectList *list, const QString &id, int in, int out, const QString desc, bool newItem, bool remove, QUndoCommand * parent = 0);
AddClipCutCommand(ProjectList *list, const QString &id, int in, int out, const QString &desc, bool newItem, bool remove, QUndoCommand * parent = 0);
virtual void undo();
virtual void redo();
......
......@@ -23,7 +23,7 @@
#include <KLocale>
AddEffectCommand::AddEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement effect, bool doIt, QUndoCommand * parent) :
AddEffectCommand::AddEffectCommand(CustomTrackView *view, const int track, GenTime pos, const QDomElement &effect, bool doIt, QUndoCommand * parent) :
QUndoCommand(parent),
m_view(view),
m_track(track),
......
......@@ -31,7 +31,7 @@ class CustomTrackView;
class AddEffectCommand : public QUndoCommand
{
public:
AddEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement effect, bool doIt, QUndoCommand * parent = 0);
AddEffectCommand(CustomTrackView *view, const int track, GenTime pos, const QDomElement &effect, bool doIt, QUndoCommand * parent = 0);
virtual void undo();
virtual void redo();
......
......@@ -23,7 +23,7 @@
#include <KLocale>
AddFolderCommand::AddFolderCommand(ProjectList *view, const QString folderName, const QString &clipId, bool doIt, QUndoCommand *parent) :
AddFolderCommand::AddFolderCommand(ProjectList *view, const QString &folderName, const QString &clipId, bool doIt, QUndoCommand *parent) :
QUndoCommand(parent),
m_view(view),
m_name(folderName),
......
......@@ -28,7 +28,7 @@ class ProjectList;
class AddFolderCommand : public QUndoCommand
{
public:
AddFolderCommand(ProjectList *view, const QString folderName, const QString &clipId, bool doIt, QUndoCommand *parent = 0);
AddFolderCommand(ProjectList *view, const QString &folderName, const QString &clipId, bool doIt, QUndoCommand *parent = 0);
virtual void undo();
virtual void redo();
......
......@@ -23,7 +23,7 @@
#include <KLocale>
AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects, bool overwrite, bool push, bool doIt, bool doRemove, QUndoCommand * parent) :
AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, const QDomElement &xml, const QString &clipId, ItemInfo info, EffectsList effects, bool overwrite, bool push, bool doIt, bool doRemove, QUndoCommand * parent) :
QUndoCommand(parent),
m_view(view),
m_clipInfo(info),
......
......@@ -34,7 +34,7 @@ class CustomTrackView;
class AddTimelineClipCommand : public QUndoCommand
{
public:
AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects, bool overwrite, bool push, bool doIt, bool doRemove, QUndoCommand * parent = 0);
AddTimelineClipCommand(CustomTrackView *view, const QDomElement &xml, const QString &clipId, ItemInfo info, EffectsList effects, bool overwrite, bool push, bool doIt, bool doRemove, QUndoCommand * parent = 0);
virtual void undo();
virtual void redo();
......
......@@ -21,7 +21,7 @@
#include <KLocale>
AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, QDomElement params, bool remove, bool doIt, QUndoCommand * parent) :
AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, const QDomElement &params, bool remove, bool doIt, QUndoCommand * parent) :
QUndoCommand(parent),
m_view(view),
m_info(info),
......
......@@ -32,7 +32,7 @@ class CustomTrackView;
class AddTransitionCommand : public QUndoCommand
{
public:
AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, QDomElement params, bool remove, bool doIt, QUndoCommand * parent = 0);
AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, const QDomElement &params, bool remove, bool doIt, QUndoCommand * parent = 0);
virtual void undo();
virtual void redo();
......
......@@ -23,7 +23,7 @@
#include <KLocale>
ChangeEffectStateCommand::ChangeEffectStateCommand(CustomTrackView *view, const int track, GenTime pos, QList <int> effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent) :
ChangeEffectStateCommand::ChangeEffectStateCommand(CustomTrackView *view, const int track, GenTime pos, const QList <int>& effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent) :
QUndoCommand(parent),
m_view(view),
m_track(track),
......
......@@ -31,7 +31,7 @@ class CustomTrackView;
class ChangeEffectStateCommand : public QUndoCommand
{
public:
ChangeEffectStateCommand(CustomTrackView *view, const int track, GenTime pos, QList <int> effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent = 0);
ChangeEffectStateCommand(CustomTrackView *view, const int track, GenTime pos, const QList <int>& effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent = 0);
virtual void undo();
virtual void redo();
......
......@@ -22,7 +22,7 @@
#include "customtrackview.h"
ConfigTracksCommand::ConfigTracksCommand(CustomTrackView* view, QList< TrackInfo > oldInfos, QList< TrackInfo > newInfos, QUndoCommand* parent) :
ConfigTracksCommand::ConfigTracksCommand(CustomTrackView* view, const QList<TrackInfo> &oldInfos, const QList<TrackInfo> &newInfos, QUndoCommand* parent) :
QUndoCommand(parent),
m_view(view),
m_oldInfos(oldInfos),
......
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