From: Montel Laurent Date: Sun, 12 May 2013 18:11:52 +0000 (+0200) Subject: Use explicit, const/ref, remove unimplemented function X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=55b10ef4f3093b158c0dc910ac974e2bdf9ce00d;p=kdenlive Use explicit, const/ref, remove unimplemented function --- diff --git a/src/slideshowclip.cpp b/src/slideshowclip.cpp index c2a54452..b9ce196f 100644 --- a/src/slideshowclip.cpp +++ b/src/slideshowclip.cpp @@ -28,7 +28,7 @@ #include -SlideshowClip::SlideshowClip(Timecode tc, QWidget * parent) : +SlideshowClip::SlideshowClip(const Timecode &tc, QWidget * parent) : QDialog(parent), m_count(0), m_timecode(tc), diff --git a/src/slideshowclip.h b/src/slideshowclip.h index b4114f99..b90eda34 100644 --- a/src/slideshowclip.h +++ b/src/slideshowclip.h @@ -34,7 +34,7 @@ class SlideshowClip : public QDialog Q_OBJECT public: - explicit SlideshowClip(Timecode tc, QWidget * parent = 0); + explicit SlideshowClip(const Timecode& tc, QWidget * parent = 0); virtual ~ SlideshowClip(); /** return selected path for slideshow in MLT format */ QString selectedPath(); @@ -49,8 +49,6 @@ public: int softness() const; QString animation() const; - /** @brief Check if there are several files with filename pattern, like: image_001.jpg, image_002.jpg,... */ - static int sequenceCount(KUrl file); /** @brief Get the image frame number from a file path, for example image_047.jpg will return 47. */ static int getFrameNumberFromPath(KUrl path); /** @brief return the url pattern for selected slideshow. */ diff --git a/src/spacerdialog.cpp b/src/spacerdialog.cpp index a638ed07..9dad7168 100644 --- a/src/spacerdialog.cpp +++ b/src/spacerdialog.cpp @@ -26,7 +26,7 @@ #include -SpacerDialog::SpacerDialog(const GenTime duration, Timecode tc, int track, const QList &tracks, QWidget * parent) : +SpacerDialog::SpacerDialog(const GenTime &duration, Timecode tc, int track, const QList &tracks, QWidget * parent) : QDialog(parent), m_in(tc) { diff --git a/src/spacerdialog.h b/src/spacerdialog.h index 854b104d..fec3c6de 100644 --- a/src/spacerdialog.h +++ b/src/spacerdialog.h @@ -38,7 +38,7 @@ class SpacerDialog : public QDialog, public Ui::SpacerDialog_UI Q_OBJECT public: - SpacerDialog(const GenTime duration, Timecode tc, int track, const QList & tracks, QWidget * parent = 0); + SpacerDialog(const GenTime &duration, Timecode tc, int track, const QList & tracks, QWidget * parent = 0); GenTime selectedDuration(); int selectedTrack(); diff --git a/src/subprojectitem.cpp b/src/subprojectitem.cpp index 0e76b352..7b1f7450 100644 --- a/src/subprojectitem.cpp +++ b/src/subprojectitem.cpp @@ -32,7 +32,7 @@ const int DurationRole = Qt::UserRole + 1; const int itemHeight = 30; -SubProjectItem::SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, QString description) : +SubProjectItem::SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, const QString &description) : QTreeWidgetItem(parent, PROJECTSUBCLIPTYPE), m_in(in), m_out(out), m_description(description) { setSizeHint(0, QSize((int) (itemHeight * display_ratio) + 2, itemHeight + 2)); @@ -97,7 +97,7 @@ QString SubProjectItem::description() const return m_description; } -void SubProjectItem::setDescription(QString desc) +void SubProjectItem::setDescription(const QString &desc) { m_description = desc; setText(1, m_description); diff --git a/src/subprojectitem.h b/src/subprojectitem.h index 5b1d7912..6831682a 100644 --- a/src/subprojectitem.h +++ b/src/subprojectitem.h @@ -38,7 +38,7 @@ class DocClipBase; class SubProjectItem : public QTreeWidgetItem { public: - SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, QString description = QString()); + SubProjectItem(double display_ratio, QTreeWidgetItem * parent, int in, int out, const QString& description = QString()); virtual ~SubProjectItem(); QDomElement toXml() const; int numReferences() const; @@ -46,7 +46,7 @@ public: QPoint zone() const; void setZone(const QPoint &p); QString description() const; - void setDescription(QString desc); + void setDescription(const QString& desc); static int itemDefaultHeight(); /** Make sure folders appear on top of the tree widget */ diff --git a/src/timecodedisplay.cpp b/src/timecodedisplay.cpp index dae91e38..aa93a4a2 100644 --- a/src/timecodedisplay.cpp +++ b/src/timecodedisplay.cpp @@ -31,7 +31,7 @@ #include #include -TimecodeDisplay::TimecodeDisplay(Timecode t, QWidget *parent) +TimecodeDisplay::TimecodeDisplay(const Timecode& t, QWidget *parent) : QAbstractSpinBox(parent), m_timecode(t), m_frametimecode(false), @@ -184,7 +184,7 @@ void TimecodeDisplay::setValue(int value) } } -void TimecodeDisplay::setValue(GenTime value) +void TimecodeDisplay::setValue(const GenTime &value) { setValue((int) value.frames(m_timecode.fps())); } diff --git a/src/timecodedisplay.h b/src/timecodedisplay.h index 97bd353e..467882e4 100644 --- a/src/timecodedisplay.h +++ b/src/timecodedisplay.h @@ -41,7 +41,7 @@ public: /** @brief Constructor for the widget, sets value to 0. * @param t Timecode object used to setup correct input (frames or HH:MM:SS:FF) * @param parent parent Widget */ - explicit TimecodeDisplay(Timecode t, QWidget *parent = 0); + explicit TimecodeDisplay(const Timecode& t, QWidget *parent = 0); /** @brief Returns the minimum value, which can be entered. * default is 0 */ @@ -79,7 +79,7 @@ public: private: /** timecode for widget */ Timecode m_timecode; - /** Should we display the timecode in frames or in format hh:mm:ss:ff */ + /** Should we display the timecode in frames or in format hh:mm:ss:ff */ bool m_frametimecode; int m_minimum; int m_maximum; @@ -91,7 +91,7 @@ public slots: * The value actually set is forced to be within the legal range: minimum <= value <= maximum */ void setValue(int value); void setValue(const QString &value); - void setValue(GenTime value); + void setValue(const GenTime &value); /** @brief Sets value's format according to Kdenlive's settings. * @param t (optional, if already existing) Timecode object to use */