Commit 90e17b9d authored by Laurent Montel's avatar Laurent Montel

Fix some clazy warning

parent bcfc2e85
......@@ -2360,13 +2360,13 @@ void Bin::slotDeleteEffect(const QString &id, QDomElement effect)
m_doc->commandStack()->push(command);
}
void Bin::slotMoveEffect(const QString &id, const QList <int>& currentPos, int newPos)
void Bin::slotMoveEffect(const QString &id, const QList<int>& currentPos, int newPos)
{
MoveBinEffectCommand *command = new MoveBinEffectCommand(this, id, currentPos, newPos);
m_doc->commandStack()->push(command);
}
void Bin::moveEffect(const QString &id, const QList <int> &oldPos, const QList <int> &newPos)
void Bin::moveEffect(const QString &id, const QList<int> &oldPos, const QList<int> &newPos)
{
ProjectClip *clip = m_rootFolder->clip(id);
if (!clip) return;
......@@ -2418,7 +2418,7 @@ void Bin::updateEffect(const QString &id, QDomElement &effect, int ix, bool refr
m_monitor->refreshMonitorIfActive();
}
void Bin::changeEffectState(const QString &id, const QList <int>& indexes, bool disable, bool refreshStack)
void Bin::changeEffectState(const QString &id, const QList<int>& indexes, bool disable, bool refreshStack)
{
ProjectClip *currentItem = m_rootFolder->clip(id);
if (!currentItem) return;
......@@ -2757,7 +2757,7 @@ void Bin::loadSubClips(const QString&id, const QMap <QString,QString> data)
ProjectClip *clip = getBinClip(id);
if (!clip) return;
QMapIterator<QString, QString> i(data);
QList <int> missingThumbs;
QList<int> missingThumbs;
int maxFrame = clip->duration().frames(m_doc->fps()) - 1;
while (i.hasNext()) {
i.next();
......@@ -2791,7 +2791,7 @@ void Bin::addClipCut(const QString&id, int in, int out)
sub = new ProjectSubClip(clip, in, out, m_doc->timecode().getDisplayTimecodeFromFrames(in, KdenliveSettings::frametimecode()));
QStringList markersComment = clip->markersText(GenTime(in, m_doc->fps()), GenTime(out, m_doc->fps()));
sub->setDescription(markersComment.join(QStringLiteral(";")));
QList <int> missingThumbs;
QList<int> missingThumbs;
missingThumbs << in;
clip->slotExtractImage(missingThumbs);
}
......
......@@ -485,12 +485,12 @@ public:
void deleteAllClipMarkers(const QString &id);
/** @brief Remove an effect from a bin clip. */
void removeEffect(const QString &id, const QDomElement &effect);
void moveEffect(const QString &id, const QList <int> &oldPos, const QList <int> &newPos);
void moveEffect(const QString &id, const QList<int> &oldPos, const QList<int> &newPos);
/** @brief Add an effect to a bin clip. */
void addEffect(const QString &id, QDomElement &effect);
/** @brief Update a bin clip effect. */
void updateEffect(const QString &id, QDomElement &effect, int ix, bool refreshStackWidget);
void changeEffectState(const QString &id, const QList <int>& indexes, bool disable, bool refreshStack);
void changeEffectState(const QString &id, const QList<int>& indexes, bool disable, bool refreshStack);
/** @brief Edit an effect settings to a bin clip. */
void editMasterEffect(ClipController *ctl);
/** @brief An effect setting was changed, update stack if displayed. */
......
......@@ -173,7 +173,7 @@ void UpdateBinEffectCommand::redo()
m_refreshStack = true;
}
ChangeMasterEffectStateCommand::ChangeMasterEffectStateCommand(Bin *bin, const QString &clipId, const QList <int>& effectIndexes, bool disable, QUndoCommand *parent) :
ChangeMasterEffectStateCommand::ChangeMasterEffectStateCommand(Bin *bin, const QString &clipId, const QList<int>& effectIndexes, bool disable, QUndoCommand *parent) :
QUndoCommand(parent),
m_bin(bin),
m_clipId(clipId),
......@@ -199,7 +199,7 @@ void ChangeMasterEffectStateCommand::redo()
m_refreshEffectStack = true;
}
MoveBinEffectCommand::MoveBinEffectCommand(Bin *bin, const QString &clipId, const QList <int> &oldPos, int newPos, QUndoCommand *parent) :
MoveBinEffectCommand::MoveBinEffectCommand(Bin *bin, const QString &clipId, const QList<int> &oldPos, int newPos, QUndoCommand *parent) :
QUndoCommand(parent),
m_bin(bin),
m_clipId(clipId),
......
......@@ -124,13 +124,13 @@ private:
class ChangeMasterEffectStateCommand : public QUndoCommand
{
public:
ChangeMasterEffectStateCommand(Bin *bin, const QString &clipId, const QList <int>& effectIndexes, bool disable, QUndoCommand *parent = Q_NULLPTR);
ChangeMasterEffectStateCommand(Bin *bin, const QString &clipId, const QList<int>& effectIndexes, bool disable, QUndoCommand *parent = Q_NULLPTR);
void undo() Q_DECL_OVERRIDE;
void redo() Q_DECL_OVERRIDE;
private:
Bin *m_bin;
QString m_clipId;
QList <int> m_effectIndexes;
QList<int> m_effectIndexes;
bool m_disable;
bool m_refreshEffectStack;
};
......@@ -144,8 +144,8 @@ public:
private:
Bin *m_bin;
QString m_clipId;
QList <int> m_oldindex;
QList <int> m_newindex;
QList<int> m_oldindex;
QList<int> m_newindex;
};
class RenameBinSubClipCommand : public QUndoCommand
......
......@@ -826,7 +826,7 @@ QVariant ProjectClip::data(DataType type) const
return AbstractProjectItem::data(type);
}
void ProjectClip::slotQueryIntraThumbs(const QList <int> &frames)
void ProjectClip::slotQueryIntraThumbs(const QList<int> &frames)
{
QMutexLocker lock(&m_intraThumbMutex);
for (int i = 0; i < frames.count(); i++) {
......@@ -873,7 +873,7 @@ void ProjectClip::doExtractIntra()
}
void ProjectClip::slotExtractImage(const QList <int> &frames)
void ProjectClip::slotExtractImage(const QList<int> &frames)
{
QMutexLocker lock(&m_thumbMutex);
for (int i = 0; i < frames.count(); i++) {
......
......@@ -244,9 +244,9 @@ private:
QMutex m_intraThumbMutex;
QMutex m_audioMutex;
QFuture <void> m_thumbThread;
QList <int> m_requestedThumbs;
QList<int> m_requestedThumbs;
QFuture <void> m_intraThread;
QList <int> m_intraThumbs;
QList<int> m_intraThumbs;
const QString geometryWithOffset(const QString &data, int offset);
void doExtractImage();
void doExtractIntra();
......
......@@ -32,7 +32,7 @@
#include <QStandardPaths>
#include <QDebug>
ProfilesDialog::ProfilesDialog(QString profileDescription, QWidget * parent) :
ProfilesDialog::ProfilesDialog(const QString &profileDescription, QWidget * parent) :
QDialog(parent),
m_profileIsModified(false),
m_isCustomProfile(false)
......@@ -85,7 +85,7 @@ ProfilesDialog::ProfilesDialog(QString profileDescription, QWidget * parent) :
}
ProfilesDialog::ProfilesDialog(QString profilePath, bool, QWidget * parent) :
ProfilesDialog::ProfilesDialog(const QString &profilePath, bool, QWidget * parent) :
QDialog(parent),
m_profileIsModified(false),
m_isCustomProfile(true),
......@@ -269,7 +269,7 @@ bool ProfilesDialog::slotSaveProfile()
return true;
}
void ProfilesDialog::saveProfile(QString path)
void ProfilesDialog::saveProfile(const QString &path)
{
QFile file(path);
if (!file.open(QIODevice::WriteOnly)) {
......
......@@ -33,9 +33,9 @@ class ProfilesDialog : public QDialog
Q_OBJECT
public:
explicit ProfilesDialog(const QString profileDescription = QString(), QWidget * parent = Q_NULLPTR);
explicit ProfilesDialog(const QString &profileDescription = QString(), QWidget * parent = Q_NULLPTR);
/** @brief Using this constructor, the dialog only allows editing one profile. */
explicit ProfilesDialog(QString profilePath, bool, QWidget * parent = Q_NULLPTR);
explicit ProfilesDialog(const QString &profilePath, bool, QWidget * parent = Q_NULLPTR);
void fillList(const QString &selectedProfile = QString());
static QMap< QString, QString > getSettingsFromFile(const QString& path);
......@@ -105,7 +105,7 @@ private:
/** @brief If we are in single profile editing, should contain the path for this profile. */
QString m_customProfilePath;
KMessageWidget *m_infoMessage;
void saveProfile(QString path);
void saveProfile(const QString &path);
bool askForSave();
};
......
......@@ -339,6 +339,7 @@ void Wizard::checkMltComponents()
// Retrieve the list of available transitions.
Mlt::Properties *producers = repository->producers();
QStringList producersItemList;
producersItemList.reserve(producers->count());
for (int i = 0; i < producers->count(); ++i)
producersItemList << producers->get_name(i);
delete producers;
......@@ -377,6 +378,7 @@ void Wizard::checkMltComponents()
Mlt::Properties *consumers = repository->consumers();
QStringList consumersItemList;
consumersItemList.reserve(consumers->count());
for (int i = 0; i < consumers->count(); ++i)
consumersItemList << consumers->get_name(i);
delete consumers;
......
......@@ -162,7 +162,7 @@ public:
QAction *getAction(const QString &name);
/** @brief Add an action to main actioncollection. */
void doAddAction(const QString &name, QAction *a, const QKeySequence &shortcut);
void invalidatePreviews(QList <int> chunks);
void invalidatePreviews(QList<int> chunks);
void previewProgress(int p);
/** @brief Select most appropriate rendering profile for timeline preview based on fps / size. */
void selectPreviewProfile();
......@@ -201,7 +201,7 @@ private:
/** @brief The project folder, used to store project files (titles, effects...). */
QString m_projectFolder;
QList <int> m_undoChunks;
QList<int> m_undoChunks;
QMap <QString, QString> m_documentProperties;
QMap <QString, QString> m_documentMetadata;
......
......@@ -84,7 +84,7 @@ void DvdWizardChapters::slotAddChapter()
QStringList currentChaps = m_view.vob_list->itemData(m_view.vob_list->currentIndex(), Qt::UserRole + 1).toStringList();
if (currentChaps.contains(QString::number(pos))) return;
else currentChaps.append(QString::number(pos));
QList <int> chapterTimes;
QList<int> chapterTimes;
chapterTimes.reserve(currentChaps.count());
for (int i = 0; i < currentChaps.count(); ++i)
chapterTimes.append(currentChaps.at(i).toInt());
......
......@@ -282,7 +282,7 @@ void EffectsList::setProperty(QDomElement effect, const QString &name, const QSt
}
// static
void EffectsList::renameProperty(QDomElement effect, const QString &oldName, const QString &newName)
void EffectsList::renameProperty(const QDomElement &effect, const QString &oldName, const QString &newName)
{
QDomNodeList params = effect.elementsByTagName(QStringLiteral("property"));
// Update property if it already exists
......@@ -296,7 +296,7 @@ void EffectsList::renameProperty(QDomElement effect, const QString &oldName, con
}
// static
QString EffectsList::property(QDomElement effect, const QString &name)
QString EffectsList::property(const QDomElement &effect, const QString &name)
{
QDomNodeList params = effect.elementsByTagName(QStringLiteral("property"));
for (int i = 0; i < params.count(); ++i) {
......@@ -334,7 +334,7 @@ void EffectsList::removeMetaProperties(QDomElement producer)
}
}
QDomElement EffectsList::append(QDomElement e)
QDomElement EffectsList::append(const QDomElement &e)
{
QDomElement result;
if (!e.isNull()) {
......@@ -396,7 +396,7 @@ QDomElement EffectsList::insert(const QDomElement &effect)
return result;
}
void EffectsList::updateIndexes(QDomNodeList effects, int startIndex)
void EffectsList::updateIndexes(const QDomNodeList &effects, int startIndex)
{
for (int i = startIndex; i < effects.count(); ++i) {
QDomElement listeffect = effects.at(i).toElement();
......@@ -404,7 +404,7 @@ void EffectsList::updateIndexes(QDomNodeList effects, int startIndex)
}
}
bool EffectsList::enableEffects(const QList <int>& indexes, bool disable)
bool EffectsList::enableEffects(const QList<int>& indexes, bool disable)
{
bool monitorRefresh = false;
QDomNodeList effects = m_baseElement.childNodes();
......
......@@ -71,7 +71,7 @@ public:
QString getInfoFromIndex(const int ix) const;
QString getEffectInfo(const QDomElement &effect) const;
void clone(const EffectsList &original);
QDomElement append(QDomElement e);
QDomElement append(const QDomElement &e);
bool isEmpty() const;
int count() const;
const QDomElement at(int ix) const;
......@@ -85,9 +85,9 @@ public:
/** @brief Change the value of a 'property' element from the effect node. */
static void setProperty(QDomElement effect, const QString &name, const QString &value);
/** @brief Rename a 'property' element from the effect node. */
static void renameProperty(QDomElement effect, const QString &oldName, const QString &newName);
static void renameProperty(const QDomElement &effect, const QString &oldName, const QString &newName);
/** @brief Get the value of a 'property' element from the effect node. */
static QString property(QDomElement effect, const QString &name);
static QString property(const QDomElement &effect, const QString &name);
/** @brief Delete a 'property' element from the effect node. */
static void removeProperty(QDomElement effect, const QString &name);
/** @brief Remove all 'meta.*' properties from a producer, used when replacing proxy producers in xml for rendering. */
......@@ -96,7 +96,7 @@ public:
/** @brief Get am effect with effect index equal to ix. */
QDomElement effectFromIndex(const QDomNodeList &effects, int ix);
/** @brief Update all effects indexes to make sure they are 1, 2, 3, ... */
void updateIndexes(QDomNodeList effects, int startIndex);
void updateIndexes(const QDomNodeList &effects, int startIndex);
/** @brief Enable / disable a list of effects */
bool enableEffects(const QList<int> &indexes, bool disable);
......
......@@ -64,7 +64,7 @@ void EffectsListWidget::slotExpandItem(const QModelIndex & index)
setExpanded(index, !isExpanded(index));
}
void EffectsListWidget::initList(QMenu *effectsMenu, KActionCategory *effectActions, QString categoryFile, bool transitionMode)
void EffectsListWidget::initList(QMenu *effectsMenu, KActionCategory *effectActions, const QString &categoryFile, bool transitionMode)
{
QString current;
QString currentFolder;
......@@ -341,7 +341,7 @@ QIcon EffectsListWidget::generateIcon(int size, const QString &name, QDomElement
return QIcon(pix);
}
const QDomElement EffectsListWidget::itemEffect(int type, QStringList effectInfo)
const QDomElement EffectsListWidget::itemEffect(int type, const QStringList &effectInfo)
{
QDomElement effect;
if (type == (int)EffectsList::EFFECT_FOLDER) return effect;
......@@ -480,7 +480,7 @@ void EffectsListWidget::resetRoot()
{
setRootIndex(indexFromItem(invisibleRootItem()));
}
void EffectsListWidget::createTopLevelItems(QList <QTreeWidgetItem *>list, int effectType)
void EffectsListWidget::createTopLevelItems(const QList <QTreeWidgetItem *> &list, int effectType)
{
// Favorites is a pseudo-folder used to store items, not visible to end user, so don't i18n its name
QTreeWidgetItem *misc = findFolder(QStringLiteral("TemporaryFolder"));
......
......@@ -40,12 +40,12 @@ class EffectsListWidget : public QTreeWidget
virtual ~EffectsListWidget();
const QDomElement currentEffect() const;
QString currentInfo() const;
static const QDomElement itemEffect(int type, QStringList effectInfo);
void initList(QMenu *effectsMenu, KActionCategory *effectActions, QString categoryFile, bool transitionMode);
static const QDomElement itemEffect(int type, const QStringList &effectInfo);
void initList(QMenu *effectsMenu, KActionCategory *effectActions, const QString &categoryFile, bool transitionMode);
void updatePalette();
void setRootOnCustomFolder();
void resetRoot();
void createTopLevelItems(QList <QTreeWidgetItem *>list, int effectType);
void createTopLevelItems(const QList <QTreeWidgetItem *> &list, int effectType);
void resetFavorites();
protected:
......
......@@ -38,9 +38,9 @@ public:
signals:
void addEffect(const QDomElement &e);
/** @brief Move effects in the stack one step up or down. */
void changeEffectPosition(const QList <int>&, bool upwards);
void changeEffectPosition(const QList<int>&, bool upwards);
/** @brief Move effects in the stack. */
void moveEffect(const QList <int> &current_pos, int new_pos, int groupIndex, const QString &groupName);
void moveEffect(const QList<int> &current_pos, int new_pos, int groupIndex, const QString &groupName);
/** @brief An effect was saved, trigger effect list reload. */
void reloadEffects();
......
......@@ -62,7 +62,7 @@ AnimKeyframeRuler::AnimKeyframeRuler(int min, int max, QWidget *parent) :
m_keyframe = scheme.foreground(KColorScheme::LinkText).color();
}
void AnimKeyframeRuler::updateKeyframes(QVector<int> keyframes, QVector<int> types, int attachToEnd)
void AnimKeyframeRuler::updateKeyframes(const QVector<int> &keyframes, const QVector<int> &types, int attachToEnd)
{
m_keyframes = keyframes;
m_keyframeTypes = types;
......
......@@ -36,7 +36,7 @@ public:
explicit AnimKeyframeRuler(int min, int max, QWidget *parent = Q_NULLPTR);
int position() const;
int frameLength;
void updateKeyframes(QVector<int> keyframes, QVector<int> types, int attachToEnd);
void updateKeyframes(const QVector<int> &keyframes, const QVector<int> &types, int attachToEnd);
void setActiveKeyframe(int frame);
int activeKeyframe() const;
......
......@@ -363,12 +363,12 @@ void CollapsibleEffect::slotDeleteEffect()
void CollapsibleEffect::slotEffectUp()
{
emit changeEffectPosition(QList <int>() <<effectIndex(), true);
emit changeEffectPosition(QList<int>() <<effectIndex(), true);
}
void CollapsibleEffect::slotEffectDown()
{
emit changeEffectPosition(QList <int>() <<effectIndex(), false);
emit changeEffectPosition(QList<int>() <<effectIndex(), false);
}
void CollapsibleEffect::slotSaveEffect()
......@@ -598,7 +598,7 @@ void CollapsibleEffect::updateTimecodeFormat()
}
}
void CollapsibleEffect::slotUpdateRegionEffectParams(const QDomElement /*old*/, const QDomElement /*e*/, int /*ix*/)
void CollapsibleEffect::slotUpdateRegionEffectParams(const QDomElement &/*old*/, const QDomElement &/*e*/, int /*ix*/)
{
//qDebug()<<"// EMIT CHANGE SUBEFFECT.....:";
emit parameterChanged(m_original_effect, m_effect, effectIndex());
......@@ -681,7 +681,7 @@ void CollapsibleEffect::dropEvent(QDropEvent *event)
event->accept();
if (info.groupIndex >= 0) {
// Moving group
QList <int> effectsIds;
QList<int> effectsIds;
// Collect moved effects ids
for (int i = 0; i < subeffects.count(); ++i) {
QDomElement effect = subeffects.at(i).toElement();
......@@ -710,7 +710,7 @@ void CollapsibleEffect::dropEvent(QDropEvent *event)
emit addEffect(e);
return;
}
emit moveEffect(QList <int> () <<ix, currentEffectIx, m_info.groupIndex, m_info.groupName);
emit moveEffect(QList<int> () <<ix, currentEffectIx, m_info.groupIndex, m_info.groupName);
event->setDropAction(Qt::MoveAction);
event->accept();
}
......
......@@ -107,7 +107,7 @@ private slots:
void slotCreateRegion();
void slotUnGroup();
/** @brief A sub effect parameter was changed */
void slotUpdateRegionEffectParams(const QDomElement /*old*/, const QDomElement /*e*/, int /*ix*/);
void slotUpdateRegionEffectParams(const QDomElement & /*old*/, const QDomElement & /*e*/, int /*ix*/);
/** @brief Dis/enable effect before processing an operation (color picker) */
void slotDisableEffect(bool disable);
void prepareImportClipKeyframes();
......
......@@ -152,7 +152,7 @@ void CollapsibleGroup::slotDeleteGroup()
void CollapsibleGroup::slotEffectUp()
{
QList <int> indexes;
QList<int> indexes;
for (int i = 0; i < m_subWidgets.count(); ++i)
indexes << m_subWidgets.at(i)->effectIndex();
emit changeEffectPosition(indexes, true);
......@@ -160,7 +160,7 @@ void CollapsibleGroup::slotEffectUp()
void CollapsibleGroup::slotEffectDown()
{
QList <int> indexes;
QList<int> indexes;
for (int i = 0; i < m_subWidgets.count(); ++i)
indexes << m_subWidgets.at(i)->effectIndex();
emit changeEffectPosition(indexes, false);
......@@ -328,8 +328,8 @@ void CollapsibleGroup::dropEvent(QDropEvent *event)
event->ignore();
return;
}
QList <int> pastedEffectIndexes;
QList <int> currentEffectIndexes;
QList<int> pastedEffectIndexes;
QList<int> currentEffectIndexes;
EffectInfo pasteInfo;
pasteInfo.fromString(pastedEffects.at(0).toElement().attribute(QStringLiteral("kdenlive_info")));
if (pasteInfo.groupIndex == -1) {
......@@ -372,7 +372,7 @@ void CollapsibleGroup::dropEvent(QDropEvent *event)
}
if (m_subWidgets.isEmpty()) return;
int new_index = m_subWidgets.last()->effectIndex();
emit moveEffect(QList <int> () <<ix, new_index, m_info.groupIndex, m_title->text());
emit moveEffect(QList<int> () <<ix, new_index, m_info.groupIndex, m_title->text());
event->setDropAction(Qt::MoveAction);
event->accept();
}
......
......@@ -143,7 +143,7 @@ bool EffectStackEdit::eventFilter( QObject * o, QEvent * e )
return QWidget::eventFilter(o, e);
}
void EffectStackEdit::transferParamDesc(const QDomElement &d, ItemInfo info, bool /*isEffect*/)
void EffectStackEdit::transferParamDesc(const QDomElement &d, const ItemInfo &info, bool /*isEffect*/)
{
if (m_paramWidget) delete m_paramWidget;
m_paramWidget = new ParameterContainer(d, info, &m_metaInfo, m_baseWidget);
......
......@@ -66,7 +66,7 @@ private:
public slots:
/** @brief Called when an effect is selected, builds the UI for this effect. */
void transferParamDesc(const QDomElement &d, ItemInfo info, bool isEffect = true);
void transferParamDesc(const QDomElement &d, const ItemInfo &info, bool isEffect = true);
/** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
void slotSyncEffectsPos(int pos);
......
......@@ -606,14 +606,14 @@ void EffectStackView2::slotUpdateEffectState(bool disable, int index, MonitorSce
}
switch (m_status) {
case TIMELINE_TRACK:
emit changeEffectState(Q_NULLPTR, m_trackindex, QList <int>() << index, disable);
emit changeEffectState(Q_NULLPTR, m_trackindex, QList<int>() << index, disable);
break;
case MASTER_CLIP:
emit changeMasterEffectState(m_masterclipref->clipId(), QList <int>() <<index, disable);
emit changeMasterEffectState(m_masterclipref->clipId(), QList<int>() <<index, disable);
break;
default:
// timeline clip effect
emit changeEffectState(m_clipref, -1, QList <int>() <<index, disable);
emit changeEffectState(m_clipref, -1, QList<int>() <<index, disable);
}
slotUpdateCheckAllButton();
}
......@@ -694,7 +694,7 @@ void EffectStackView2::slotCheckAll(int state)
bool disabled = state == Qt::Unchecked;
// Disable all effects
QList <int> indexes;
QList<int> indexes;
for (int i = 0; i < m_effects.count(); ++i) {
m_effects.at(i)->slotDisable(disabled, false);
indexes << m_effects.at(i)->effectIndex();
......@@ -802,7 +802,7 @@ void EffectStackView2::setActiveKeyframe(int frame)
}
}
void EffectStackView2::slotDeleteGroup(QDomDocument doc)
void EffectStackView2::slotDeleteGroup(const QDomDocument &doc)
{
ClipItem * clip = Q_NULLPTR;
int ix = -1;
......@@ -820,7 +820,7 @@ void EffectStackView2::slotDeleteGroup(QDomDocument doc)
emit removeEffectGroup(clip, ix, doc);
}
void EffectStackView2::slotDeleteEffect(const QDomElement effect)
void EffectStackView2::slotDeleteEffect(const QDomElement &effect)
{
if (m_status == TIMELINE_TRACK)
emit removeEffect(Q_NULLPTR, m_trackindex, effect);
......@@ -937,7 +937,7 @@ void EffectStackView2::slotResetEffect(int ix)
//m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
}
void EffectStackView2::slotCreateRegion(int ix, QUrl url)
void EffectStackView2::slotCreateRegion(int ix, const QUrl &url)
{
QDomElement oldeffect = m_currentEffectList.itemFromIndex(ix);
QDomElement neweffect = oldeffect.cloneNode().toElement();
......@@ -1062,7 +1062,7 @@ void EffectStackView2::connectGroup(CollapsibleGroup *group)
connect(group, SIGNAL(changeEffectPosition(QList<int>,bool)), this , SLOT(slotMoveEffectUp(QList<int>,bool)));
}
void EffectStackView2::slotMoveEffect(QList <int> currentIndexes, int newIndex, int groupIndex, QString groupName)
void EffectStackView2::slotMoveEffect(const QList<int> &currentIndexes, int newIndex, int groupIndex, const QString &groupName)
{
if (currentIndexes.count() == 1) {
CollapsibleEffect *effectToMove = getEffectByIndex(currentIndexes.at(0));
......@@ -1162,7 +1162,7 @@ void EffectStackView2::processDroppedEffect(QDomElement e, QDropEvent *event)
return;
}
// Moving group: delete all effects and re-add them
QList <int> indexes;
QList<int> indexes;
for (int i = 0; i < effects.count(); ++i) {
QDomElement effect = effects.at(i).cloneNode().toElement();
indexes << effect.attribute(QStringLiteral("kdenlive_ix")).toInt();
......
......@@ -204,13 +204,13 @@ private slots:
/** @brief Move an effect in the stack.
* @param indexes The list of effect index in the stack
* @param up true if we want to move effect up, false for down */
void slotMoveEffectUp(const QList <int> &indexes, bool up);
void slotMoveEffectUp(const QList<int> &indexes, bool up);
/** @brief Delete an effect in the stack. */
void slotDeleteEffect(const QDomElement effect);
void slotDeleteEffect(const QDomElement &effect);
/** @brief Delete all effect in a group. */
void slotDeleteGroup(QDomDocument doc);
void slotDeleteGroup(const QDomDocument &doc);
/** @brief Pass position changes of the timeline cursor to the effects to keep their local timelines in sync. */
void slotRenderPos(int pos);
......@@ -230,7 +230,7 @@ private slots:
void slotCreateGroup(int ix);
/** @brief Create a region effect with ix index. */
void slotCreateRegion(int ix, QUrl url);
void slotCreateRegion(int ix, const QUrl &url);
/** @brief Move an effect.
** @param currentIndexes the list of effect indexes to move in stack layout
......@@ -238,7 +238,7 @@ private slots:
** @param groupIndex the index of the group if any (-1 if none)
** @param groupName the name of the group to paste the effect
*/
void slotMoveEffect(QList <int> currentIndexes, int newIndex, int groupIndex, QString groupName = QString());
void slotMoveEffect(const QList<int> &currentIndexes, int newIndex, int groupIndex, const QString &groupName = QString());
/** @brief Remove effects from a group */
void slotUnGroup(CollapsibleGroup* group);
......@@ -271,12 +271,12 @@ signals:
all effects for this clip in the playlist */
void refreshEffectStack(ClipItem *);
/** Enable or disable an effect */
void changeEffectState(ClipItem*, int, const QList <int>&, bool);
void changeMasterEffectState(QString id, const QList <int>&, bool);
void changeEffectState(ClipItem*, int, const QList<int>&, bool);
void changeMasterEffectState(QString id, const QList<int>&, bool);
/** An effect in stack was moved */
void changeEffectPosition(ClipItem*, int, const QList <int>&, int);
void changeEffectPosition(ClipItem*, int, const QList<int>&, int);
/** An effect in stack was moved for a Bin clip */
void changeEffectPosition(const QString &, const QList <int>&, int);
void changeEffectPosition(const QString &, const QList<int>&, int);
/** an effect was saved, reload list */
void reloadEffects();
/** An effect with position parameter was changed, seek */
......
......@@ -367,7 +367,7 @@ QString Geometryval::getValue() const
return m_geom->serialise();
}
void Geometryval::setupParam(const QDomElement par, int minFrame, int maxFrame)
void Geometryval::setupParam(const QDomElement &par, int minFrame, int maxFrame)
{
QString val = par.attribute(QStringLiteral("value"));
if (par.attribute(QStringLiteral("fixed")) == QLatin1String("1")) {
......
......@@ -74,7 +74,7 @@ private:
bool keyframeSelected();
public slots:
void setupParam(const QDomElement, int minframe, int maxframe);
void setupParam(const QDomElement &, int minframe, int maxframe);
/** @brief Updates position of the local timeline to @param relTimelinePos. */
void slotSyncPosition(int relTimelinePos);
......
......@@ -43,7 +43,7 @@ MyQGraphicsEffect::MyQGraphicsEffect(QObject *parent) :
{
}
void MyQGraphicsEffect::setShadow(QImage image)
void MyQGraphicsEffect::setShadow(const QImage &image)
{
m_shadow = image;
}
......@@ -104,7 +104,7 @@ QStringList MyTextItem::shadowInfo() const
return info;
}
void MyTextItem::loadShadow(QStringList info)
void MyTextItem::loadShadow(const QStringList &info)
{
if (info.count() < 5) return;
updateShadow((info.at(0).toInt() == true), info.at(2).toInt(), info.at(3).toInt(),info.at(4).toInt(), QColor(info.at(1)));
......@@ -931,7 +931,7 @@ void GraphicsSceneRectMove::setZoom(double s)
////qDebug()<<"////////// ZOOM: "<<zoom;
}
void GraphicsSceneRectMove::setCursor(QCursor c)
void GraphicsSceneRectMove::setCursor(const QCursor &c)
{
const QList<QGraphicsView*> l = views();
foreach(QGraphicsView* v, l) {
......
......@@ -34,7 +34,7 @@ class MyQGraphicsEffect: public QGraphicsEffect
public:
explicit MyQGraphicsEffect(QObject *parent = Q_NULLPTR);
void setOffset(int xOffset, int yOffset, int blur);
void setShadow(QImage image);
void setShadow(const QImage &image);
protected:
void draw(QPainter *painter) Q_DECL_OVERRIDE;
private:
......@@ -57,7 +57,7 @@ public:
Qt::Alignment alignment() const;
void updateShadow(bool enabled, int blur, int xoffset, int yoffset, QColor color);
QStringList shadowInfo() const;
void loadShadow(QStringList info);
void loadShadow(const QStringList &info);
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *evt) Q_DECL_OVERRIDE;
protected:
......@@ -135,7 +135,7 @@ protected: