remove not necessary ";"
if(foo) delete foo; -> delete foo;
36 files changed:
namespace Mlt
{
class Producer;
namespace Mlt
{
class Producer;
class ClipManager: public QObject
{
class ClipManager: public QObject
{
public:
/** @brief Sets up the widget. */
public:
/** @brief Sets up the widget. */
- ColorPickerWidget(QWidget *parent = 0);
+ explicit ColorPickerWidget(QWidget *parent = 0);
/** @brief Makes sure the event filter is removed. */
virtual ~ColorPickerWidget();
/** @brief Makes sure the event filter is removed. */
virtual ~ColorPickerWidget();
return a + (b - a) * t;
}
return a + (b - a) * t;
}
-CornersWidget::CornersWidget(Monitor *monitor, QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
+CornersWidget::CornersWidget(Monitor *monitor, const QDomElement& e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
KeyframeEdit(e, minFrame, maxFrame, tc, activeKeyframe, parent),
m_monitor(monitor),
m_showScene(true),
KeyframeEdit(e, minFrame, maxFrame, tc, activeKeyframe, parent),
m_monitor(monitor),
m_showScene(true),
* @param isEffect true if used in an effect, false if used in a transition
* @param factor Factor by which the parameters differ from the range 0-1
* @param parent (optional) Parent widget */
* @param isEffect true if used in an effect, false if used in a transition
* @param factor Factor by which the parameters differ from the range 0-1
* @param parent (optional) Parent widget */
- CornersWidget(Monitor *monitor, QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0);
+ explicit CornersWidget(Monitor *monitor, const QDomElement &e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0);
virtual ~CornersWidget();
virtual void addParameter(QDomElement e, int activeKeyframe = -1);
virtual ~CornersWidget();
virtual void addParameter(QDomElement e, int activeKeyframe = -1);
return GenTime(pos, m_document->fps()).frames(m_document->fps());
}
return GenTime(pos, m_document->fps()).frames(m_document->fps());
}
-void CustomTrackScene::setSnapList(QList <GenTime> snaps)
+void CustomTrackScene::setSnapList(const QList <GenTime>& snaps)
{
m_snapPoints = snaps;
}
{
m_snapPoints = snaps;
}
public:
explicit CustomTrackScene(KdenliveDoc *doc, QObject *parent = 0);
virtual ~ CustomTrackScene();
public:
explicit CustomTrackScene(KdenliveDoc *doc, QObject *parent = 0);
virtual ~ CustomTrackScene();
- void setSnapList(QList <GenTime> snaps);
+ void setSnapList(const QList <GenTime>& snaps);
GenTime previousSnapPoint(GenTime pos) const;
GenTime nextSnapPoint(GenTime pos) const;
double getSnapPointForPos(double pos, bool doSnap = true);
GenTime previousSnapPoint(GenTime pos) const;
GenTime nextSnapPoint(GenTime pos) const;
double getSnapPointForPos(double pos, bool doSnap = true);
isMute(0),
isBlind(0),
isLocked(0),
isMute(0),
isBlind(0),
isLocked(0),
};
typedef QMap<QString, QString> stringMap;
};
typedef QMap<QString, QString> stringMap;
/** cropDuration is the duration of the clip */
GenTime cropDuration;
int track;
/** cropDuration is the duration of the clip */
GenTime cropDuration;
int track;
- ItemInfo() : track(0) {};
+ ItemInfo() : track(0) {}
};
class TransitionInfo {
};
class TransitionInfo {
TransitionInfo() :
b_track(0),
a_track(0),
TransitionInfo() :
b_track(0),
a_track(0),
};
class MltVideoProfile {
};
class MltVideoProfile {
sample_aspect_den(0),
display_aspect_num(0),
display_aspect_den(0),
sample_aspect_den(0),
display_aspect_num(0),
display_aspect_den(0),
bool operator==(const MltVideoProfile& point) const
{
if (!description.isEmpty() && point.description == description) return true;
bool operator==(const MltVideoProfile& point) const
{
if (!description.isEmpty() && point.description == description) return true;
}
void setParamValue(const QString &name, const QString &value) {
bool found = false;
}
void setParamValue(const QString &name, const QString &value) {
bool found = false;
- for (int i = 0; i < size(); i++)
+ for (int i = 0; i < size(); ++i)
if (at(i).name() == name) {
// update value
replace(i, EffectParameter(name, value));
if (at(i).name() == name) {
// update value
replace(i, EffectParameter(name, value));
}
QString paramValue(const QString &name, QString defaultValue = QString()) const {
}
QString paramValue(const QString &name, QString defaultValue = QString()) const {
- for (int i = 0; i < size(); i++) {
+ for (int i = 0; i < size(); ++i) {
if (at(i).name() == name) return at(i).value();
}
return defaultValue;
if (at(i).name() == name) return at(i).value();
}
return defaultValue;
append(EffectParameter(name, value));
}
void removeParam(const QString &name) {
append(EffectParameter(name, value));
}
void removeParam(const QString &name) {
- for (int i = 0; i < size(); i++)
+ for (int i = 0; i < size(); ++i)
if (at(i).name() == name) {
removeAt(i);
break;
if (at(i).name() == name) {
removeAt(i);
break;
namespace Mlt
{
class Producer;
namespace Mlt
{
class Producer;
struct CutZoneInfo {
QPoint zone;
struct CutZoneInfo {
QPoint zone;
class DocClipBase: public QObject
{
class DocClipBase: public QObject
{
/** this enum determines the types of "feed" available within this clip. types must be non-exclusive
* - e.g. if you can have audio and video separately, it should be possible to combin the two, as is
* done here. If a new clip type is added then it should be possible to combine it with both audio
/** this enum determines the types of "feed" available within this clip. types must be non-exclusive
* - e.g. if you can have audio and video separately, it should be possible to combin the two, as is
* done here. If a new clip type is added then it should be possible to combine it with both audio
enum TITLECLIPTYPE { TITLE_IMAGE_ELEMENT = 20, TITLE_FONT_ELEMENT = 21 };
enum TITLECLIPTYPE { TITLE_IMAGE_ELEMENT = 20, TITLE_FONT_ELEMENT = 21 };
-DocumentChecker::DocumentChecker(QDomNodeList infoproducers, QDomDocument doc):
+DocumentChecker::DocumentChecker(const QDomNodeList &infoproducers, const QDomDocument &doc):
m_info(infoproducers), m_doc(doc), m_dialog(NULL)
{
m_info(infoproducers), m_doc(doc), m_dialog(NULL)
{
- explicit DocumentChecker(QDomNodeList infoproducers, QDomDocument doc);
+ explicit DocumentChecker(const QDomNodeList &infoproducers, const QDomDocument &doc);
~DocumentChecker();
bool hasErrorInClips();
~DocumentChecker();
bool hasErrorInClips();
-DocumentValidator::DocumentValidator(QDomDocument doc, KUrl documentUrl):
+DocumentValidator::DocumentValidator(const QDomDocument &doc, const KUrl &documentUrl):
m_doc(doc),
m_url(documentUrl),
m_modified(false)
m_doc(doc),
m_url(documentUrl),
m_modified(false)
-bool DocumentValidator::updateEffectParameters(QDomNodeList parameters, const QScriptValue* updateRules, const double serviceVersion, const double effectVersion)
+bool DocumentValidator::updateEffectParameters(const QDomNodeList ¶meters, const QScriptValue* updateRules, const double serviceVersion, const double effectVersion)
{
bool updated = false;
bool isDowngrade = serviceVersion < effectVersion;
{
bool updated = false;
bool isDowngrade = serviceVersion < effectVersion;
- DocumentValidator(QDomDocument doc, KUrl documentUrl);
+ DocumentValidator(const QDomDocument &doc, const KUrl &documentUrl);
bool isProject() const;
bool validate(const double currentVersion);
bool isModified() const;
bool isProject() const;
bool validate(const double currentVersion);
bool isModified() const;
void updateEffects();
/** @brief Updates the parameters according to the updateRules.
* @see the related in README in effects/update */
void updateEffects();
/** @brief Updates the parameters according to the updateRules.
* @see the related in README in effects/update */
- bool updateEffectParameters(QDomNodeList parameters, const QScriptValue *updateRules, const double serviceVersion, const double effectVersion);
+ bool updateEffectParameters(const QDomNodeList ¶meters, const QScriptValue *updateRules, const double serviceVersion, const double effectVersion);
DragValue::~DragValue()
{
DragValue::~DragValue()
{
- if (m_intEdit) delete m_intEdit;
- if (m_doubleEdit) delete m_doubleEdit;
+ delete m_intEdit;
+ delete m_doubleEdit;
delete m_menu;
//delete m_scale;
//delete m_directUpdate;
delete m_menu;
//delete m_scale;
//delete m_directUpdate;
- DvdTreeWidget(QWidget *parent);
+ explicit DvdTreeWidget(QWidget *parent);
protected:
virtual void dragEnterEvent(QDragEnterEvent * event );
protected:
virtual void dragEnterEvent(QDragEnterEvent * event );
m_metaInfo.timecode = t;
}
m_metaInfo.timecode = t;
}
-void EffectStackEdit::setFrameSize(QPoint p)
+void EffectStackEdit::setFrameSize(const QPoint &p)
{
m_metaInfo.frameSize = p;
}
{
m_metaInfo.frameSize = p;
}
*
* Used to disable the effect, by setting disabled="1" */
void updateParameter(const QString &name, const QString &value);
*
* Used to disable the effect, by setting disabled="1" */
void updateParameter(const QString &name, const QString &value);
- void setFrameSize(QPoint p);
+ void setFrameSize(const QPoint &p);
/** @brief Tells the parameters to update their timecode format according to KdenliveSettings. */
void updateTimecodeFormat();
/** @brief Returns true if this effect wants to keep track of current position in clip. */
/** @brief Tells the parameters to update their timecode format according to KdenliveSettings. */
void updateTimecodeFormat();
/** @brief Returns true if this effect wants to keep track of current position in clip. */
ParameterContainer *m_paramWidget;
public slots:
ParameterContainer *m_paramWidget;
public slots:
- /** @brief Called when an effect is selected, builds the UIÂ for this effect. */
+ /** @brief Called when an effect is selected, builds the UI for this effect. */
void transferParamDesc(const QDomElement &d, ItemInfo info, bool isEffect = true);
/** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
void transferParamDesc(const QDomElement &d, ItemInfo info, bool isEffect = true);
/** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
-Geometryval::Geometryval(const MltVideoProfile &profile, Timecode t, QPoint frame_size, int startPoint, QWidget* parent) :
+Geometryval::Geometryval(const MltVideoProfile &profile, Timecode t, const QPoint &frame_size, int startPoint, QWidget* parent) :
QWidget(parent),
m_profile(profile),
m_paramRect(NULL),
QWidget(parent),
m_profile(profile),
m_paramRect(NULL),
- explicit Geometryval(const MltVideoProfile &profile, Timecode t, QPoint frame_size, int startPoint = 0, QWidget* parent = 0);
+ explicit Geometryval(const MltVideoProfile &profile, Timecode t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
virtual ~Geometryval();
QDomElement getParamDesc();
QString getValue() const;
virtual ~Geometryval();
QDomElement getParamDesc();
QString getValue() const;
#include <QGraphicsView>
#include <QScrollBar>
#include <QGraphicsView>
#include <QScrollBar>
-Guide::Guide(CustomTrackView *view, GenTime pos, QString label, double height) :
+Guide::Guide(CustomTrackView *view, GenTime pos, const QString &label, double height) :
QGraphicsLineItem(),
m_position(pos),
m_label(label),
QGraphicsLineItem(),
m_position(pos),
m_label(label),
- Guide(CustomTrackView *view, GenTime pos, QString label, double height);
+ Guide(CustomTrackView *view, GenTime pos, const QString &label, double height);
GenTime position() const;
void updateGuide(const GenTime &newPos, const QString &comment = QString());
QString label() const;
GenTime position() const;
void updateGuide(const GenTime &newPos, const QString &comment = QString());
QString label() const;
#include <QTimer>
#include <QDomDocument>
#include <QTimer>
#include <QDomDocument>
-HeaderTrack::HeaderTrack(int index, TrackInfo info, int height, QList <QAction *> actions, QWidget *parent) :
+HeaderTrack::HeaderTrack(int index, TrackInfo info, int height, const QList <QAction *> &actions, QWidget *parent) :
QWidget(parent),
m_index(index),
m_type(info.type),
QWidget(parent),
m_index(index),
m_type(info.type),
- HeaderTrack(int index, TrackInfo info, int height, QList <QAction *> actions, QWidget *parent = 0);
+ HeaderTrack(int index, TrackInfo info, int height, const QList <QAction *>& actions, QWidget *parent = 0);
//virtual ~HeaderTrack();
void setLock(bool lock);
void adjustSize(int height);
//virtual ~HeaderTrack();
void setLock(bool lock);
void adjustSize(int height);
#define JOG_STOP 10020
#define MAX_SHUTTLE_RANGE 7
#define JOG_STOP 10020
#define MAX_SHUTTLE_RANGE 7
-void ShuttleThread::init(QObject *parent, QString device)
+void ShuttleThread::init(QObject *parent, const QString &device)
{
m_parent = parent;
m_device = device;
{
m_parent = parent;
m_device = device;
public:
virtual void run();
public:
virtual void run();
- void init(QObject *parent, QString device);
+ void init(QObject *parent, const QString &device);
QObject *m_parent;
int shuttlevalue;
int shuttlecounter;
QObject *m_parent;
int shuttlevalue;
int shuttlecounter;
const double DOCUMENTVERSION = 0.88;
const double DOCUMENTVERSION = 0.88;
-KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, QString profileName, QMap <QString, QString> properties, QMap <QString, QString> metadata, const QPoint &tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent, KProgressDialog *progressDialog) :
+KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, QMap <QString, QString> properties, QMap <QString, QString> metadata, const QPoint &tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent, KProgressDialog *progressDialog) :
QObject(parent),
m_autosave(NULL),
m_url(url),
QObject(parent),
m_autosave(NULL),
m_url(url),
- KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, QString profileName, QMap <QString, QString> properties, QMap <QString, QString> metadata, const QPoint &tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent = 0, KProgressDialog *progressDialog = 0);
+ KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup *undoGroup, const QString &profileName, QMap <QString, QString> properties, QMap <QString, QString> metadata, const QPoint &tracks, Render *render, KTextEdit *notes, bool *openBackup, MainWindow *parent = 0, KProgressDialog *progressDialog = 0);
~KdenliveDoc();
QDomNodeList producersList();
double fps() const;
~KdenliveDoc();
QDomNodeList producersList();
double fps() const;
#ifdef USE_V4L
// Video 4 Linux device detection
#ifdef USE_V4L
// Video 4 Linux device detection
- for (int i = 0; i < 10; i++) {
+ for (int i = 0; i < 10; ++i) {
QString path = "/dev/video" + QString::number(i);
if (QFile::exists(path)) {
QStringList deviceInfo = V4lCaptureHandler::getDeviceName(path);
QString path = "/dev/video" + QString::number(i);
if (QFile::exists(path)) {
QStringList deviceInfo = V4lCaptureHandler::getDeviceName(path);
-KeyframeEdit::KeyframeEdit(QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
+KeyframeEdit::KeyframeEdit(const QDomElement &e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
QWidget(parent),
m_min(minFrame),
m_max(maxFrame),
QWidget(parent),
m_min(minFrame),
m_max(maxFrame),
- explicit KeyframeEdit(QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0);
+ explicit KeyframeEdit(const QDomElement &e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent = 0);
virtual ~KeyframeEdit();
virtual void addParameter(QDomElement e, int activeKeyframe = -1);
const QString getValue(const QString &name);
virtual ~KeyframeEdit();
virtual void addParameter(QDomElement e, int activeKeyframe = -1);
const QString getValue(const QString &name);
-ManageCapturesDialog::ManageCapturesDialog(KUrl::List files, QWidget * parent) :
+ManageCapturesDialog::ManageCapturesDialog(const KUrl::List &files, QWidget * parent) :
QDialog(parent)
{
setFont(KGlobalSettings::toolBarFont());
QDialog(parent)
{
setFont(KGlobalSettings::toolBarFont());
- explicit ManageCapturesDialog(KUrl::List files, QWidget * parent = 0);
+ explicit ManageCapturesDialog(const KUrl::List &files, QWidget * parent = 0);
~ManageCapturesDialog();
KUrl::List importFiles();
~ManageCapturesDialog();
KUrl::List importFiles();
-/***************************************************************************
+ /***************************************************************************
* Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* *
* This program is free software; you can redistribute it and/or modify *
* Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
* *
* This program is free software; you can redistribute it and/or modify *
-/***************************************************************************
+ /***************************************************************************
mltdevicecapture.h - description
-------------------
begin : Sun May 21 2011
mltdevicecapture.h - description
-------------------
begin : Sun May 21 2011
bool sendFrameForAnalysis;
/** @brief Someone needs us to send again a frame. */
bool sendFrameForAnalysis;
/** @brief Someone needs us to send again a frame. */
- void sendFrameUpdate() {};
+ void sendFrameUpdate() {}
void emitFrameUpdated(Mlt::Frame&);
void emitFrameNumber(double position);
void emitFrameUpdated(Mlt::Frame&);
void emitFrameNumber(double position);
- NotesWidget(QWidget * parent = 0);
+ explicit NotesWidget(QWidget * parent = 0);
~NotesWidget();
protected:
~NotesWidget();
protected:
#include <QSlider>
#include <QHBoxLayout>
#include <QSlider>
#include <QHBoxLayout>
-PositionEdit::PositionEdit(const QString name, int pos, int min, int max, const Timecode tc, QWidget* parent) :
+PositionEdit::PositionEdit(const QString &name, int pos, int min, int max, const Timecode tc, QWidget* parent) :
QWidget(parent)
{
QHBoxLayout *layout = new QHBoxLayout(this);
QWidget(parent)
{
QHBoxLayout *layout = new QHBoxLayout(this);
- explicit PositionEdit(const QString name, int pos, int min, int max, const Timecode tc, QWidget* parent = 0);
+ explicit PositionEdit(const QString &name, int pos, int min, int max, const Timecode tc, QWidget* parent = 0);
virtual ~PositionEdit();
int getPosition() const;
void setPosition(int pos);
virtual ~PositionEdit();
int getPosition() const;
void setPosition(int pos);