Commit ba6cfa60 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

use --i

parent 4fba8981
......@@ -367,7 +367,7 @@ int CustomTrackView::getPreviousVideoTrack(int track)
{
track = m_document->tracksCount() - track - 1;
track --;
for (int i = track; i > -1; i--) {
for (int i = track; i > -1; --i) {
if (m_document->trackInfoAt(i).type == VIDEOTRACK) return i + 1;
}
return 0;
......@@ -4895,7 +4895,7 @@ void CustomTrackView::moveGroup(QList <ItemInfo> startClip, QList <ItemInfo> sta
AbstractGroupItem *group = (AbstractGroupItem*) children.at(i);
if (!groupList.contains(group)) groupList.append(group);
children.removeAll(children.at(i));
i--;
--i;
}
}
......
......@@ -1278,7 +1278,7 @@ void DocClipBase::removeCutZone(int in, int out)
for (int i = 0; i < m_cutZones.count(); ++i) {
if (m_cutZones.at(i).zone == p) {
m_cutZones.removeAt(i);
i--;
--i;
}
}
}
......
......@@ -879,7 +879,7 @@ void DocumentChecker::slotDeleteSelected()
if (deletedIds.contains(e.attribute("id"))) {
// Remove clip
kdenlivedoc.removeChild(e);
i--;
--i;
j++;
}
}
......@@ -889,7 +889,7 @@ void DocumentChecker::slotDeleteSelected()
if (deletedIds.contains(e.attribute("id").section('_', 0, 0)) || deletedIds.contains(e.attribute("id").section(':', 1, 1).section('_', 0, 0))) {
// Remove clip
mlt.removeChild(e);
i--;
--i;
}
}
......
......@@ -239,7 +239,7 @@ bool DvdWizardMenu::isComplete() const
// check that we have a "Play all" entry
if (targets.contains(0)) return true;
// ... or that each video file has a button
for (int i = m_view.target_list->count() - 1; i > 0; i--) {
for (int i = m_view.target_list->count() - 1; i > 0; --i) {
// If there is a vob file entry and it has no button assigned, don't allow to go further
if (m_view.target_list->itemIcon(i).isNull() == false && !targets.contains(i)) {
#if KDE_IS_VERSION(4,7,0)
......@@ -813,7 +813,7 @@ void DvdWizardMenu::loadXml(DVDFORMAT format, QDomElement xml)
for (int i = 0; i < list.count(); ++i) {
if (list.at(i)->type() == DvdButtonItem) {
delete list.at(i);
i--;
--i;
}
}
}
......
......@@ -318,7 +318,7 @@ void EffectsList::removeMetaProperties(QDomElement producer)
QDomElement e = params.item(i).toElement();
if (e.attribute("name").startsWith("meta")) {
producer.removeChild(params.item(i));
i--;
--i;
}
}
}
......
......@@ -101,7 +101,7 @@ void EffectsListWidget::initList(QMenu *effectsMenu, KActionCategory *effectActi
QString currentName = topLevelItem(i)->text(0);
if (currentName != i18n("Misc") && currentName != i18n("Audio") && currentName != i18nc("Folder Name", "Custom") && !folderNames.contains(currentName)) {
takeTopLevelItem(i);
i--;
--i;
}
}
......
......@@ -144,7 +144,7 @@ void CollapsibleGroup::slotDeleteGroup()
QDomDocument doc;
// delete effects from the last one to the first, otherwise each deletion would trigger an update
// in other effects's kdenlive_ix index.
for (int i = m_subWidgets.count() - 1; i >= 0; i--)
for (int i = m_subWidgets.count() - 1; i >= 0; --i)
doc.appendChild(doc.importNode(m_subWidgets.at(i)->effect(), true));
emit deleteGroup(doc);
}
......@@ -261,7 +261,7 @@ void CollapsibleGroup::removeGroup(int ix, QVBoxLayout *layout)
QMutexLocker lock(&m_mutex);
QVBoxLayout *vbox = static_cast<QVBoxLayout *>(widgetFrame->layout());
if (vbox == NULL) return;
for (int i = m_subWidgets.count() - 1; i >= 0 ; i--) {
for (int i = m_subWidgets.count() - 1; i >= 0 ; --i) {
vbox->removeWidget(m_subWidgets.at(i));
layout->insertWidget(ix, m_subWidgets.at(i));
m_subWidgets.at(i)->decoframe->setObjectName("decoframe");
......
......@@ -1797,28 +1797,28 @@ void KdenliveDoc::cleanupBackupFiles()
for (int i = 0; i < hourList.count(); i += step) {
kDebug()<<"REMOVE AT: "<<i<<", COUNT: "<<hourList.count();
hourList.removeAt(i);
i--;
--i;
}
} else hourList.clear();
if (dayList.count() > 20) {
int step = dayList.count() / 10;
for (int i = 0; i < dayList.count(); i += step) {
dayList.removeAt(i);
i--;
--i;
}
} else dayList.clear();
if (weekList.count() > 20) {
int step = weekList.count() / 10;
for (int i = 0; i < weekList.count(); i += step) {
weekList.removeAt(i);
i--;
--i;
}
} else weekList.clear();
if (oldList.count() > 20) {
int step = oldList.count() / 10;
for (int i = 0; i < oldList.count(); i += step) {
oldList.removeAt(i);
i--;
--i;
}
} else oldList.clear();
......
......@@ -94,7 +94,7 @@ public:
/
(b.last() + a.last() * alpha.last());
for (i = size - 2; i >= 0; i--)
for (i = size - 2; i >= 0; --i)
x[i] = alpha[i+1] * x[i+1] + beta[i+1];
return x;
......
......@@ -376,23 +376,23 @@ void ProjectList::setupMenu(QMenu *addMenu, QAction *defaultAction)
if (actions.at(i)->data().toString() == "clip_properties") {
m_editButton->setDefaultAction(actions.at(i));
actions.removeAt(i);
i--;
--i;
} else if (actions.at(i)->data().toString() == "delete_clip") {
m_deleteButton->setDefaultAction(actions.at(i));
actions.removeAt(i);
i--;
--i;
} else if (actions.at(i)->data().toString() == "edit_clip") {
m_openAction = actions.at(i);
actions.removeAt(i);
i--;
--i;
} else if (actions.at(i)->data().toString() == "reload_clip") {
m_reloadAction = actions.at(i);
actions.removeAt(i);
i--;
--i;
} else if (actions.at(i)->data().toString() == "proxy_clip") {
m_proxyAction = actions.at(i);
actions.removeAt(i);
i--;
--i;
}
}
......@@ -3065,7 +3065,7 @@ void ProjectList::slotCheckJobProcess()
// remove finished jobs
AbstractClipJob *job = m_jobList.takeAt(i);
job->deleteLater();
i--;
--i;
}
}
emit jobCount(count);
......
......@@ -3954,7 +3954,7 @@ void Render::mltPlantTransition(Mlt::Field *field, Mlt::Transition &tr, int a_tr
field->plant_transition(tr, a_track, b_track);
// re-add upper transitions
for (int i = trList.count() - 1; i >= 0; i--) {
for (int i = trList.count() - 1; i >= 0; --i) {
//kDebug()<< "REPLANT ON TK: "<<trList.at(i)->get_a_track()<<", "<<trList.at(i)->get_b_track();
field->plant_transition(*trList.at(i), trList.at(i)->get_a_track(), trList.at(i)->get_b_track());
}
......@@ -4478,7 +4478,7 @@ QList <TransitionInfo> Render::mltInsertTrack(int ix, bool videoTrack)
mltPlantTransition(field, transition, 1, ct);
// re-add transitions
for (int i = trList.count() - 1; i >= 0; i--) {
for (int i = trList.count() - 1; i >= 0; --i) {
field->plant_transition(*trList.at(i), trList.at(i)->get_a_track(), trList.at(i)->get_b_track());
}
qDeleteAll(trList);
......@@ -4507,7 +4507,7 @@ void Render::mltDeleteTrack(int ix)
}
if (mappedProps.value("mlt_service") == "mix" && mappedProps.value("b_track").toInt() == tracksCount) {
tractor.removeChild(transitions.at(i));
i--;
--i;
} else if (mappedProps.value("mlt_service") != "mix" && (mappedProps.value("b_track").toInt() >= ix || mappedProps.value("a_track").toInt() >= ix)) {
// Transition needs to be moved
int a_track = mappedProps.value("a_track").toInt();
......@@ -4516,7 +4516,7 @@ void Render::mltDeleteTrack(int ix)
if (b_track == ix) {
// transition was on the deleted track, so remove it
tractor.removeChild(transitions.at(i));
i--;
--i;
continue;
}
if (b_track > 0 && b_track > ix) b_track --;
......
......@@ -225,7 +225,7 @@ void TrackView::parseDocument(const QDomDocument &doc)
m_invalidProducers.append(id);
m_documentErrors.append(i18n("Invalid clip producer %1\n", id));
doc.documentElement().removeChild(producers.at(i));
i--;
--i;
}
}
......@@ -322,7 +322,7 @@ void TrackView::parseDocument(const QDomDocument &doc)
// invalid transition, remove it
m_documentErrors.append(i18n("Removed invalid transition: %1", e.attribute("id")) + '\n');
tractor.removeChild(transitions.item(i));
i--;
--i;
continue;
}
if (transitionAdd || mlt_service != "mix") {
......@@ -398,7 +398,7 @@ void TrackView::parseDocument(const QDomDocument &doc)
m_documentErrors.append(i18n("Removed invalid transition: (%1, %2, %3)", e.attribute("id"), mlt_service, transitionId) + '\n');
kDebug() << "///// REMOVED INVALID TRANSITION: " << e.attribute("id");
tractor.removeChild(transitions.item(i));
i--;
--i;
} else if (m_trackview->canBePastedTo(transitionInfo, TRANSITIONWIDGET)) {
Transition *tr = new Transition(transitionInfo, a_track, m_doc->fps(), base, isAutomatic);
if (forceTrack) tr->setForcedTrack(true, a_track);
......@@ -410,7 +410,7 @@ void TrackView::parseDocument(const QDomDocument &doc)
else {
m_documentErrors.append(i18n("Removed overlapping transition: (%1, %2, %3)", e.attribute("id"), mlt_service, transitionId) + '\n');
tractor.removeChild(transitions.item(i));
i--;
--i;
}
}
}
......
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