Commit d780c9f1 authored by Laurent Montel's avatar Laurent Montel 😁

Fix other clazy warning

parent ef46d1c5
......@@ -701,7 +701,7 @@ void ProjectClip::updateParentInfo(const QString &folderid, const QString &folde
m_controller->setProperty(QStringLiteral("kdenlive:folderid"), folderid);
}
bool ProjectClip::matches(QString condition)
bool ProjectClip::matches(const QString &condition)
{
//TODO
Q_UNUSED(condition)
......
......@@ -183,7 +183,7 @@ public:
void updateParentInfo(const QString &folderid, const QString &foldername);
void setWaitingStatus(const QString &id);
/** @brief Returns true if the clip matched a condition, for example vcodec=mpeg1video. */
bool matches(QString condition);
bool matches(const QString &condition);
/** @brief Returns true if the clip's video codec is equal to @param codec.
* @param audioCodec set to true if you want to check audio codec. When false, this will check the video codec
*/
......
......@@ -340,6 +340,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(int videotracks, int audiotracks)
// Tracks are added «backwards», so we need to reverse the track numbering
// mbt 331: http://www.kdenlive.org/mantis/view.php?id=331
// Better default names for tracks: Audio 1 etc. instead of blank numbers
tracks.reserve(audiotracks + videotracks);
for (int i = 0; i < audiotracks; ++i) {
TrackInfo audioTrack;
audioTrack.type = AudioTrack;
......
......@@ -85,6 +85,7 @@ void DvdWizardChapters::slotAddChapter()
if (currentChaps.contains(QString::number(pos))) return;
else currentChaps.append(QString::number(pos));
QList <int> chapterTimes;
chapterTimes.reserve(currentChaps.count());
for (int i = 0; i < currentChaps.count(); ++i)
chapterTimes.append(currentChaps.at(i).toInt());
qSort(chapterTimes);
......
......@@ -413,7 +413,7 @@ const QString EffectsController::adjustKeyframes(const QString &keyframes, int o
return result.join(QStringLiteral(";"));
}
EffectsParameterList EffectsController::addEffect(const ProfileInfo &info, QDomElement effect)
EffectsParameterList EffectsController::addEffect(const ProfileInfo &info, const QDomElement &effect)
{
QLocale locale;
locale.setNumberOptions(QLocale::OmitGroupSeparator);
......@@ -472,7 +472,7 @@ EffectsParameterList EffectsController::addEffect(const ProfileInfo &info, QDomE
return parameters;
}
void EffectsController::offsetKeyframes(int in, QDomElement effect)
void EffectsController::offsetKeyframes(int in, const QDomElement &effect)
{
QDomNodeList params = effect.elementsByTagName(QStringLiteral("parameter"));
for (int i = 0; i < params.count(); ++i) {
......
......@@ -112,10 +112,10 @@ namespace EffectsController
/** @brief Adjust keyframes to the new clip. */
const QString adjustKeyframes(const QString &keyframes, int oldIn, int newIn, int newEnd, ProfileInfo pInfo);
EffectsParameterList addEffect(const ProfileInfo &info, QDomElement effect);
EffectsParameterList addEffect(const ProfileInfo &info, const QDomElement &effect);
/** @brief Keyframe frame numbers are relative to clip's crop start. So when saving an effect, remove clip cropstart from keyframe numbers so that when we apply effect on another clip, frame numbers are applied relative to the new clip's crop start. */
void offsetKeyframes(int in, QDomElement effect);
void offsetKeyframes(int in, const QDomElement &effect);
};
#endif
......@@ -619,6 +619,7 @@ GenTime Monitor::getSnapForPos(bool previous)
{
QList <GenTime> snaps;
QList < GenTime > markers = m_controller->snapMarkers();
snaps.reserve(markers.size());
for (int i = 0; i < markers.size(); ++i) {
GenTime t = markers.at(i);
snaps.append(t);
......
......@@ -325,7 +325,6 @@ QHash <ProjectClip *, AbstractClipJob *> CutClipJob::prepareTranscodeJob(double
if (parameters.count() > 1)
desc = parameters.at(1);
//const QString &condition, QString params, QString desc
QStringList existingFiles;
QStringList sources;
QStringList destinations;
......
......@@ -112,6 +112,7 @@ const QList <TrackInfo> TracksConfigDialog::tracksList()
{
QList <TrackInfo> tracks;
TrackInfo info;
tracks.reserve(table->rowCount());
for (int i = 0; i < table->rowCount(); i++) {
info.trackName = table->item(i, 0)->text();
QTableWidgetItem *item = table->item(i, 1);
......
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