Commit 5b5e286a authored by Laurent Montel's avatar Laurent Montel

Fix other clazy warning

parent 40ec3b22
......@@ -62,7 +62,7 @@ public:
* @brief Constructor.
* @param parent parent this item should be added to
*/
AbstractProjectItem(PROJECTITEMTYPE type, const QString &id, AbstractProjectItem *parent = 0);
AbstractProjectItem(PROJECTITEMTYPE type, const QString &id, AbstractProjectItem *parent = Q_NULLPTR);
/**
* @brief Creates a project item upon project load.
* @param description element for this item.
......@@ -70,7 +70,7 @@ public:
*
* We try to read the attributes "name" and "description"
*/
AbstractProjectItem(PROJECTITEMTYPE type, const QDomElement &description, AbstractProjectItem* parent = 0);
AbstractProjectItem(PROJECTITEMTYPE type, const QDomElement &description, AbstractProjectItem* parent = Q_NULLPTR);
virtual ~AbstractProjectItem();
bool operator==(const AbstractProjectItem *projectItem) const;
......
......@@ -362,7 +362,7 @@ class Bin : public QWidget
enum BinViewType {BinTreeView, BinIconView };
public:
explicit Bin(QWidget* parent = 0);
explicit Bin(QWidget* parent = Q_NULLPTR);
~Bin();
bool isLoading;
......
......@@ -57,7 +57,7 @@ class DvdButtonUnderline : public QGraphicsRectItem
{
public:
explicit DvdButtonUnderline( const QRectF & rect, QGraphicsItem * parent = 0 ) : QGraphicsRectItem(rect, parent) {}
explicit DvdButtonUnderline( const QRectF & rect, QGraphicsItem * parent = Q_NULLPTR ) : QGraphicsRectItem(rect, parent) {}
int type() const {
// Enable the use of qgraphicsitem_cast with this item.
......
......@@ -270,7 +270,7 @@ void DvdWizardVob::slotAddVobList(QList<QUrl> list)
slotCheckProfiles();
}
void DvdWizardVob::slotAddVobFile(QUrl url, const QString &chapters, bool checkFormats)
void DvdWizardVob::slotAddVobFile(const QUrl &url, const QString &chapters, bool checkFormats)
{
if (!url.isValid()) return;
QFile f(url.path());
......
......@@ -140,7 +140,7 @@ private:
void processTranscoding();
public slots:
void slotAddVobFile(QUrl url = QUrl(), const QString &chapters = QString(), bool checkFormats = true);
void slotAddVobFile(const QUrl &url = QUrl(), const QString &chapters = QString(), bool checkFormats = true);
void slotAddVobList(QList<QUrl> list = QList <QUrl>());
void slotCheckProfiles();
......
......@@ -205,7 +205,7 @@ void EffectsListView::refreshIcons()
}
}
void EffectsListView::slotAddFavorite(QString id)
void EffectsListView::slotAddFavorite(const QString &id)
{
QStringList favs = KdenliveSettings::favorite_effects();
if (!favs.contains(id)) {
......
......@@ -177,7 +177,7 @@ private slots:
void slotAutoExpand(const QString &text);
/** @brief Add an effect to the favorites
* @param id id of the effect we want */
void slotAddFavorite(QString id);
void slotAddFavorite(const QString &id);
/** @brief Add currently selected effect to the favorites */
void slotAddToFavorites();
void slotDisplayMenu(QTreeWidgetItem *item, const QPoint &pos);
......
......@@ -46,7 +46,6 @@ void initEffects::refreshLumas()
// Check for Kdenlive installed luma files, add empty string at start for no luma
QStringList imagefiles;
QStringList fileFilters;
QString defaultWipeLuma;
MainWindow::m_lumaFiles.clear();
fileFilters << QStringLiteral("*.png") << QStringLiteral("*.pgm");
QStringList customLumas = QStandardPaths::locateAll(QStandardPaths::DataLocation, QStringLiteral("lumas"), QStandardPaths::LocateDirectory);
......@@ -160,6 +159,7 @@ bool initEffects::parseEffectFiles(Mlt::Repository* repository, const QString &l
Mlt::Properties *filters = repository->filters();
QStringList filtersList;
int max = filters->count();
filtersList.reserve(max);
for (int i = 0; i < max; ++i)
filtersList << filters->get_name(i);
delete filters;
......@@ -168,6 +168,7 @@ bool initEffects::parseEffectFiles(Mlt::Repository* repository, const QString &l
Mlt::Properties *producers = repository->producers();
QStringList producersList;
max = producers->count();
producersList.reserve(max);
for (int i = 0; i < max; ++i)
producersList << producers->get_name(i);
KdenliveSettings::setProducerslist(producersList);
......@@ -862,7 +863,7 @@ QDomElement initEffects::quickParameterFill(QDomDocument & doc, const QString &n
}
// static
void initEffects::parseTransitionFile(EffectsList *transitionList, const QString &name, Mlt::Repository *repository, QStringList installedTransitions, QMap <QString, QString> effectDescriptions)
void initEffects::parseTransitionFile(EffectsList *transitionList, const QString &name, Mlt::Repository *repository, const QStringList &installedTransitions, const QMap <QString, QString> &effectDescriptions)
{
QDomDocument doc;
QFile file(name);
......
......@@ -89,7 +89,7 @@ public:
const QString &name, QStringList filtersList,
QStringList producersList,
Mlt::Repository *repository, QMap <QString, QString> effectDescriptions);
static void parseTransitionFile(EffectsList *transitionList, const QString &name, Mlt::Repository *repository, QStringList installedTransitions, QMap <QString, QString> effectDescriptions);
static void parseTransitionFile(EffectsList *transitionList, const QString &name, Mlt::Repository *repository, const QStringList &installedTransitions, const QMap<QString, QString> &effectDescriptions);
/** @brief Reloads information about custom effects. */
static void parseCustomEffectsFile();
......
......@@ -84,7 +84,7 @@ public:
* @param suffix The suffix that will be displayed in the spinbox (for example '%')
* @param showSlider If disabled, user can still drag on the label but no progress bar is shown
*/
explicit DragValue(const QString &label, double defaultValue, int decimals, double min = 0, double max = 100, int id = -1, const QString &suffix = QString(), bool showSlider = true, QWidget* parent = 0);
explicit DragValue(const QString &label, double defaultValue, int decimals, double min = 0, double max = 100, int id = -1, const QString &suffix = QString(), bool showSlider = true, QWidget* parent = Q_NULLPTR);
virtual ~DragValue();
/** @brief Returns the precision = number of decimals */
......
......@@ -43,7 +43,7 @@ class Geometryval : public QWidget, public Ui::Geometryval
{
Q_OBJECT
public:
explicit Geometryval(const Mlt::Profile *profile, const Timecode &t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = 0);
explicit Geometryval(const Mlt::Profile *profile, const Timecode &t, const QPoint &frame_size, int startPoint = 0, QWidget* parent = Q_NULLPTR);
virtual ~Geometryval();
QDomElement getParamDesc();
QString getValue() const;
......
......@@ -81,7 +81,7 @@ class KeyframeEdit : public QWidget, public Ui::KeyframeEditor_UI
{
Q_OBJECT
public:
explicit KeyframeEdit(const QDomElement &e, int minFrame, int maxFrame, const Timecode &tc, int activeKeyframe, QWidget* parent = 0);
explicit KeyframeEdit(const QDomElement &e, int minFrame, int maxFrame, const Timecode &tc, int activeKeyframe, QWidget* parent = Q_NULLPTR);
virtual ~KeyframeEdit();
virtual void addParameter(const QDomElement &e, int activeKeyframe = -1);
const QString getValue(const QString &name);
......
......@@ -30,7 +30,7 @@ class PositionEdit : public QWidget
{
Q_OBJECT
public:
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 = Q_NULLPTR);
~PositionEdit();
int getPosition() const;
void setPosition(int pos);
......
......@@ -28,7 +28,7 @@ class BezierSplineEditor : public QWidget
Q_OBJECT
public:
explicit BezierSplineEditor(QWidget* parent = 0);
explicit BezierSplineEditor(QWidget* parent = Q_NULLPTR);
~BezierSplineEditor();
CubicBezierSpline spline() const;
......
......@@ -33,7 +33,7 @@ class BezierSplineWidget : public QWidget
public:
/** @brief Sets up the UI and sets the spline to @param spline. */
explicit BezierSplineWidget(const QString &spline, QWidget* parent = 0);
explicit BezierSplineWidget(const QString &spline, QWidget* parent = Q_NULLPTR);
/** @brief Returns the current spline. */
QString spline() const;
......
......@@ -39,7 +39,7 @@ public:
* @param text (optional) What the color will be used for
* @param color (optional) initial color
* @param alphaEnabled (optional) Should transparent colors be enabled */
explicit ChooseColorWidget(const QString &text = QString(), const QString &color = QStringLiteral("0xffffffff"), bool alphaEnabled = false, QWidget* parent = 0);
explicit ChooseColorWidget(const QString &text = QString(), const QString &color = QStringLiteral("0xffffffff"), bool alphaEnabled = false, QWidget* parent = Q_NULLPTR);
/** @brief Gets the chosen color. */
QString getColor() const;
......
......@@ -34,7 +34,7 @@ class MyFrame : public QFrame
{
Q_OBJECT
public:
explicit MyFrame(QWidget* parent = 0);
explicit MyFrame(QWidget* parent = Q_NULLPTR);
protected:
void hideEvent ( QHideEvent * event );
......
......@@ -40,7 +40,7 @@ public:
* @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 */
explicit CornersWidget(Monitor *monitor, const QDomElement &e, int minFrame, int maxFrame, int pos, const Timecode &tc, int activeKeyframe, QWidget* parent = 0);
explicit CornersWidget(Monitor *monitor, const QDomElement &e, int minFrame, int maxFrame, int pos, const Timecode &tc, int activeKeyframe, QWidget* parent = Q_NULLPTR);
virtual ~CornersWidget();
virtual void addParameter(const QDomElement &e, int activeKeyframe = -1);
......
......@@ -48,7 +48,7 @@ public:
* @param comment A comment explaining the parameter. Will be shown for the tooltip.
* @param suffix (optional) Suffix to display in spinbox
* @param parent (optional) Parent Widget */
explicit DoubleParameterWidget(const QString &name, double value, double min, double max, double defaultValue, const QString &comment, int id, const QString &suffix = QString(), int decimals = 0, bool showRadiobutton = false, QWidget* parent = 0);
explicit DoubleParameterWidget(const QString &name, double value, double min, double max, double defaultValue, const QString &comment, int id, const QString &suffix = QString(), int decimals = 0, bool showRadiobutton = false, QWidget* parent = Q_NULLPTR);
~DoubleParameterWidget();
/** @brief The factor by which real param value is multiplicated to give the slider value. */
......
......@@ -44,7 +44,7 @@ public:
* @param timecode Timecode needed by timecode display widget
* @param clipPos Position of the clip in timeline
* @param parent (optional) Parent widget */
explicit GeometryWidget(EffectMetaInfo *info, int clipPos, bool showRotation, bool useOffset, QWidget* parent = 0);
explicit GeometryWidget(EffectMetaInfo *info, int clipPos, bool showRotation, bool useOffset, QWidget* parent = Q_NULLPTR);
virtual ~GeometryWidget();
/** @brief Gets the geometry as a serialized string. */
QString getValue() const;
......
......@@ -41,7 +41,7 @@ public:
* @param text (optional) What the color will be used for
* @param color (optional) initial color
* @param alphaEnabled (optional) Should transparent colors be enabled */
explicit LumaLiftGain(const QDomNodeList &nodes, QWidget* parent = 0);
explicit LumaLiftGain(const QDomNodeList &nodes, QWidget* parent = Q_NULLPTR);
void updateEffect(QDomElement &effect);
private:
......
......@@ -43,7 +43,7 @@ public:
* @param text (optional) What the color will be used for
* @param color (optional) initial color
* @param alphaEnabled (optional) Should transparent colors be enabled */
explicit SelectiveColor(const QDomElement effect, QWidget* parent = 0);
explicit SelectiveColor(const QDomElement effect, QWidget* parent = Q_NULLPTR);
~SelectiveColor();
void addParam(QDomElement &effect, QString name);
void updateEffect(QDomElement &effect);
......
......@@ -111,7 +111,7 @@ const QVector<float> FFTTools::window(const WindowType windowType, const int siz
return QVector<float>();
}
void FFTTools::fftNormalized(const audioShortVector audioFrame, const uint channel, const uint numChannels, float *freqSpectrum,
void FFTTools::fftNormalized(const audioShortVector &audioFrame, const uint channel, const uint numChannels, float *freqSpectrum,
const WindowType windowType, const uint windowSize, const float param)
{
#ifdef DEBUG_FFTTOOLS
......@@ -228,7 +228,7 @@ void FFTTools::fftNormalized(const audioShortVector audioFrame, const uint chann
#endif
}
const QVector<float> FFTTools::interpolatePeakPreserving(const QVector<float> in, const uint targetSize, uint left, uint right, float fill)
const QVector<float> FFTTools::interpolatePeakPreserving(const QVector<float> &in, const uint targetSize, uint left, uint right, float fill)
{
#ifdef DEBUG_FFTTOOLS
QTime start = QTime::currentTime();
......
......@@ -54,7 +54,7 @@ public:
* freqSpectrum has to be of size windowSize/2
For windowType and param see the FFTTools::window() function above.
*/
void fftNormalized(const audioShortVector audioFrame, const uint channel, const uint numChannels, float *freqSpectrum,
void fftNormalized(const audioShortVector &audioFrame, const uint channel, const uint numChannels, float *freqSpectrum,
const WindowType windowType, const uint windowSize, const float param = 0);
......@@ -72,7 +72,7 @@ public:
@param fill If right lies outside of the array bounds (which is perfectly fine here) then this value
will be used for filling the missing information.
*/
static const QVector<float> interpolatePeakPreserving(const QVector<float> in, const uint targetSize, uint left = 0, uint right = 0, float fill = 0.0);
static const QVector<float> interpolatePeakPreserving(const QVector<float> &in, const uint targetSize, uint left = 0, uint right = 0, float fill = 0.0);
private:
QHash<QString, kiss_fftr_cfg> m_fftCfgs; // FFT cfg cache
......
......@@ -841,7 +841,7 @@ void GLWidget::stopCapture()
}
}
int GLWidget::reconfigureMulti(QString params, QString path, Mlt::Profile *profile)
int GLWidget::reconfigureMulti(const QString &params, const QString &path, Mlt::Profile *profile)
{
QString serviceName = property("mlt_service").toString();
if (!m_consumer || !m_consumer->is_valid() || strcmp(m_consumer->get("mlt_service"), "multi") != 0) {
......
......@@ -64,7 +64,7 @@ public:
void clear();
/** @brief Update producer, should ONLY be called from renderer.cpp */
int setProducer(Mlt::Producer* producer);
int reconfigureMulti(QString params, QString path, Mlt::Profile *profile);
int reconfigureMulti(const QString &params, const QString &path, Mlt::Profile *profile);
void stopCapture();
int reconfigure(Mlt::Profile *profile = NULL);
......
......@@ -576,7 +576,7 @@ void Monitor::updateMarkers()
}
}
void Monitor::setGuides(QMap <double, QString> guides)
void Monitor::setGuides(const QMap<double, QString> &guides)
{
m_markerMenu->clear();
QMapIterator<double, QString> i(guides);
......
......@@ -104,7 +104,7 @@ public:
/** @brief Add clip markers to the ruler and context menu */
void setMarkers(const QList <CommentedTime> &markers);
/** @brief Add timeline guides to the ruler and context menu */
void setGuides(QMap <double, QString> guides);
void setGuides(const QMap<double, QString> &guides);
void reloadProducer(const QString &id);
/** @brief Reimplemented from QWidget, updates the palette colors. */
void setPalette ( const QPalette & p);
......
......@@ -249,7 +249,7 @@ void MonitorManager::slotEnd()
else if (m_activeMonitor == m_projectMonitor) m_projectMonitor->slotEnd();
}
void MonitorManager::resetProfiles(MltVideoProfile profile, const Timecode &tc)
void MonitorManager::resetProfiles(const MltVideoProfile &profile, const Timecode &tc)
{
m_timecode = tc;
m_clipMonitor->resetProfile(profile);
......
......@@ -44,7 +44,7 @@ public:
void appendMonitor(AbstractMonitor *monitor);
void removeMonitor(AbstractMonitor *monitor);
Timecode timecode() const;
void resetProfiles(MltVideoProfile profile, const Timecode &tc);
void resetProfiles(const MltVideoProfile &profile, const Timecode &tc);
void stopActiveMonitor();
void pauseActiveMonitor();
AbstractRender *activeRenderer();
......
......@@ -137,6 +137,7 @@ void QmlManager::effectRotoChanged()
QVariantList controlPoints = m_view->rootObject()->property("centerPointsTypes").toList();
// rotoscoping effect needs a list of
QVariantList mix;
mix.reserve(points.count());
for (int i = 0; i < points.count(); i++) {
mix << controlPoints.at(2 * i);
mix << points.at(i);
......
......@@ -41,7 +41,7 @@ class RotoWidget : public QWidget
Q_OBJECT
public:
RotoWidget(const QByteArray &data, Monitor *monitor, const ItemInfo &info, const Timecode &t, QWidget* parent = 0);
RotoWidget(const QByteArray &data, Monitor *monitor, const ItemInfo &info, const Timecode &t, QWidget* parent = Q_NULLPTR);
~RotoWidget();
/** @brief Returns the spline(s) in the JSON format used by filter_rotoscoping (MLT). */
......
......@@ -39,7 +39,7 @@ class ProfileWidget : public QWidget
{
Q_OBJECT
public:
explicit ProfileWidget(QWidget* parent = 0);
explicit ProfileWidget(QWidget* parent = Q_NULLPTR);
~ProfileWidget();
void loadProfile(QString profile);
const QString selectedProfile() const;
......
......@@ -35,7 +35,7 @@ class ElidedCheckBox : public QCheckBox
Q_OBJECT
public:
explicit ElidedCheckBox(QWidget* parent = 0);
explicit ElidedCheckBox(QWidget* parent = Q_NULLPTR);
void setBoxText(const QString &text);
void updateText(int width);
int currentWidth() const;
......@@ -52,7 +52,7 @@ class EffectSettings : public QWidget
Q_OBJECT
public:
explicit EffectSettings(QWidget* parent = 0);
explicit EffectSettings(QWidget* parent = Q_NULLPTR);
ElidedCheckBox *checkAll;
QScrollArea *container;
......
......@@ -32,7 +32,7 @@ class TransitionSettings : public QWidget, public Ui::TransitionSettings_UI
Q_OBJECT
public:
explicit TransitionSettings(Monitor *monitor, QWidget* parent = 0);
explicit TransitionSettings(Monitor *monitor, QWidget* parent = Q_NULLPTR);
void raiseWindow(QWidget*);
void updateProjectFormat();
void updateTimecodeFormat();
......
......@@ -59,7 +59,7 @@ class OAuth2 : public QObject
Q_OBJECT
public:
explicit OAuth2(QWidget* parent = 0);
explicit OAuth2(QWidget* parent = Q_NULLPTR);
void obtainAccessToken();
void obtainNewAccessToken();
......
......@@ -319,7 +319,7 @@ void ScopeManager::createScopes()
// createScopeDock(new AudioSpectrum(pCore->window()), i18n("AudioSpectrum"));
}
template <class T> void ScopeManager::createScopeDock(T* scopeWidget, const QString& title, const QString name)
template <class T> void ScopeManager::createScopeDock(T* scopeWidget, const QString& title, const QString &name)
{
QDockWidget *dock = pCore->window()->addDock(title, name, scopeWidget);
addScope(scopeWidget, dock);
......
......@@ -93,7 +93,7 @@ private:
adds it to the manager.
@param scopeWidget has to be of type AbstractAudioScopeWidget or AbstractGfxScopeWidget (@see addScope).
*/
template <class T> void createScopeDock(T *scopeWidget, const QString &title, const QString name);
template <class T> void createScopeDock(T *scopeWidget, const QString &title, const QString &name);
public slots:
void slotCheckActiveScopes();
......
......@@ -33,7 +33,7 @@ class SimpleKeyframeWidget : public QWidget
Q_OBJECT
public:
explicit SimpleKeyframeWidget(const Timecode &t, int duration, QWidget* parent = 0);
explicit SimpleKeyframeWidget(const Timecode &t, int duration, QWidget* parent = Q_NULLPTR);
~SimpleKeyframeWidget();
int getPosition() const;
......
......@@ -26,7 +26,7 @@ class SimpleTimelineWidget : public QWidget
Q_OBJECT
public:
explicit SimpleTimelineWidget(QWidget* parent = 0);
explicit SimpleTimelineWidget(QWidget* parent = Q_NULLPTR);
void setKeyframes(const QList <int>& keyframes);
void setDuration(int dur);
......
......@@ -35,7 +35,7 @@ class MyLabel : public QLabel
{
Q_OBJECT
public:
explicit MyLabel(QWidget* parent = 0);
explicit MyLabel(QWidget* parent = Q_NULLPTR);
void setImage(const QImage &img);
protected:
......@@ -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 QUrl &projectFolder, const QList< QAction* > &actions, QWidget* parent = 0);
StopmotionWidget(MonitorManager *manager, const QUrl &projectFolder, const QList< QAction* > &actions, QWidget* parent = Q_NULLPTR);
virtual ~StopmotionWidget();
protected:
......
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