Commit 0e48c4a4 authored by Vincent PINON's avatar Vincent PINON
Browse files

krazy fix: prefix increment/decrement

git grep -l 'for *(.*\w\+\(++\|--\))' \
| xargs sed -i 's/\(for *(.*; \)\(\w\+\)\(++\|--\))/\1\3\2)/'
parent eb0894bf
......@@ -87,7 +87,7 @@ KUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
}
else {
// Countdown producer
for (int i = 0; i < view.duration->value(); i++) {
for (int i = 0; i < view.duration->value(); ++i) {
// Create the producers
args << QLatin1String("pango:") << QLatin1String("in=0") << QLatin1String("out=") + QString::number((int) fps * view.duration->value());
args << QLatin1String("text=") + QString::number(view.duration->value() - i);
......
......@@ -288,9 +288,9 @@ void ClipManager::slotGetAudioThumbs()
int h1 = arrayWidth * channels;
int h2 = (int) frame * h1;
for (int z = (int) frame; z < (int)(frame + lengthInFrames) && !m_abortAudioThumb; z++) {
for (int z = (int) frame; z < (int)(frame + lengthInFrames) && !m_abortAudioThumb; ++z) {
int h3 = 0;
for (int c = 0; c < channels; c++) {
for (int c = 0; c < channels; ++c) {
QByteArray audioArray(arrayWidth, '\x00');
for (int i = 0; i < arrayWidth; ++i) {
audioArray[i] = channelarray.at(h2 + h3 + i);
......@@ -335,7 +335,7 @@ void ClipManager::slotGetAudioThumbs()
int last_val = 0;
double framesPerSecond = mlt_producer_get_fps(producer.get_producer());
for (int z = (int) frame; z < (int)(frame + lengthInFrames) && producer.is_valid() && !m_abortAudioThumb; z++) {
for (int z = (int) frame; z < (int)(frame + lengthInFrames) && producer.is_valid() && !m_abortAudioThumb; ++z) {
int val = (int)((z - frame) / (frame + lengthInFrames) * 100.0);
if (last_val != val && val > 1) {
setThumbsProgress(i18n("Creating audio thumbnail for %1", url.fileName()), val);
......@@ -346,7 +346,7 @@ void ClipManager::slotGetAudioThumbs()
if (mlt_frame && mlt_frame->is_valid()) {
int samples = mlt_sample_calculator(framesPerSecond, frequency, mlt_frame->get_position());
qint16* pcm = static_cast<qint16*>(mlt_frame->get_audio(audioFormat, frequency, channels, samples));
for (int c = 0; c < channels; c++) {
for (int c = 0; c < channels; ++c) {
QByteArray audioArray;
audioArray.resize(arrayWidth);
for (int i = 0; i < audioArray.size(); ++i) {
......@@ -813,7 +813,7 @@ QDomElement ClipManager::groupsXml() const
QDomElement group = doc.createElement("group");
groups.appendChild(group);
QList <QGraphicsItem *> children = m_groupsList.at(i)->childItems();
for (int j = 0; j < children.count(); j++) {
for (int j = 0; j < children.count(); ++j) {
if (children.at(j)->type() == AVWidget || children.at(j)->type() == TransitionWidget) {
AbstractClipItem *item = static_cast <AbstractClipItem *>(children.at(j));
ItemInfo info = item->info();
......
......@@ -41,12 +41,12 @@ QImage ColorTools::yuvColorWheel(const QSize &size, const unsigned char &Y, cons
const float w2 = (float)w/2;
const float h2 = (float)h/2;
for (int u = 0; u < w; u++) {
for (int u = 0; u < w; ++u) {
// Transform u from {0,...,w} to [-1,1]
double du = (double) 2*u/(w-1) - 1;
du = scaling*du;
for (int v = 0; v < h; v++) {
for (int v = 0; v < h; ++v) {
dv = (double) 2*v/(h-1) - 1;
dv = scaling*dv;
......@@ -112,11 +112,11 @@ QImage ColorTools::yuvVerticalPlane(const QSize &size, const float &angle, const
const double uscaling = scaling*cos(M_PI*angle/180);
const double vscaling = scaling*sin(M_PI*angle/180);
for (int uv = 0; uv < w; uv++) {
for (int uv = 0; uv < w; ++uv) {
double du = uscaling*((double)2*uv/w - 1);//(double)?
double dv = vscaling*((double)2*uv/w - 1);
for (int y = 0; y < h; y++) {
for (int y = 0; y < h; ++y) {
Y = (double)255*y/h;
// See yuv2rgb, yuvColorWheel
......@@ -156,10 +156,10 @@ QImage ColorTools::rgbCurvePlane(const QSize &size, const ColorTools::ColorsRGB
double dcol;
double dx, dy;
for (int x = 0; x < w; x++) {
for (int x = 0; x < w; ++x) {
double dval = (double)255*x/(w-1);
for (int y = 0; y < h; y++) {
for (int y = 0; y < h; ++y) {
dy = (double)y/(h-1);
dx = (double)x/(w-1);
......@@ -205,12 +205,12 @@ QImage ColorTools::yPbPrColorWheel(const QSize &size, const unsigned char &Y, co
const float w2 = (float)w/2;
const float h2 = (float)h/2;
for (int b = 0; b < w; b++) {
for (int b = 0; b < w; ++b) {
// Transform pB from {0,...,w} to [-0.5,0.5]
double dpB = (double) b/(w-1) - .5;
dpB = scaling*dpB;
for (int r = 0; r < h; r++) {
for (int r = 0; r < h; ++r) {
dpR = (double) r/(h-1) - .5;
dpR = scaling*dpR;
......@@ -267,9 +267,9 @@ QImage ColorTools::hsvHueShiftPlane(const QSize &size, const uint &S, const uint
float huediff;
int newhue;
for (int x = 0; x < size.width(); x++) {
for (int x = 0; x < size.width(); ++x) {
float hue = x/(size.width() - 1.0) * 359;
for (int y = 0; y < size.height(); y++) {
for (int y = 0; y < size.height(); ++y) {
huediff = (1.0f - y/(size.height() - 1.0)) * hueValues + MIN;
// qDebug() << "hue: " << hue << ", huediff: " << huediff;
......@@ -323,7 +323,7 @@ QImage ColorTools::hsvCurvePlane(const QSize &size, const QColor &baseColor,
sat = baseColor.saturationF();
val = baseColor.valueF();
for (int x = 0; x < size.width(); x++) {
for (int x = 0; x < size.width(); ++x) {
switch (xVariant) {
case COM_H:
hue = x / (size.width()-1.0);
......@@ -335,7 +335,7 @@ QImage ColorTools::hsvCurvePlane(const QSize &size, const QColor &baseColor,
val = x / (size.width()-1.0);
break;
}
for (int y = 0; y < size.height(); y++) {
for (int y = 0; y < size.height(); ++y) {
switch (yVariant) {
case COM_H:
hue = 1.0 - y / (size.height()-1.0);
......
......@@ -446,7 +446,7 @@ GenTime DocClipBase::hasSnapMarkers(const GenTime & time)
GenTime DocClipBase::findPreviousSnapMarker(const GenTime & currTime)
{
int it;
for (it = 0; it < m_snapMarkers.count(); it++) {
for (it = 0; it < m_snapMarkers.count(); ++it) {
if (m_snapMarkers.at(it).time() >= currTime)
break;
}
......@@ -459,7 +459,7 @@ GenTime DocClipBase::findPreviousSnapMarker(const GenTime & currTime)
GenTime DocClipBase::findNextSnapMarker(const GenTime & currTime)
{
int it;
for (it = 0; it < m_snapMarkers.count(); it++) {
for (it = 0; it < m_snapMarkers.count(); ++it) {
if (m_snapMarkers.at(it).time() > currTime)
break;
}
......
......@@ -97,7 +97,7 @@ bool DocumentChecker::hasErrorInClips()
QString prodId;
// Check that the duration is in sync between Kdenlive's info and MLT's playlist
int prodsCount = documentProducers.count();
for (int j = 0; j < prodsCount; j++) {
for (int j = 0; j < prodsCount; ++j) {
mltProd = documentProducers.at(j).toElement();
prodId = mltProd.attribute("id");
// Don't check slowmotion clips for now... (TODO?)
......@@ -347,7 +347,7 @@ bool DocumentChecker::hasErrorInClips()
QDomElement mltProd;
QDomElement property;
int prodsCount = documentProducers.count();
for (int j = 0; j < prodsCount; j++) {
for (int j = 0; j < prodsCount; ++j) {
mltProd = documentProducers.at(j).toElement();
QString prodId = mltProd.attribute("id");
bool slowmotion = false;
......@@ -469,7 +469,7 @@ void DocumentChecker::slotSearchClips()
QDir searchDir(newpath);
while (child) {
if (child->data(0, statusRole).toInt() == SOURCEMISSING) {
for (int j = 0; j < child->childCount(); j++) {
for (int j = 0; j < child->childCount(); ++j) {
QTreeWidgetItem *subchild = child->child(j);
QString clipPath = searchFileRecursively(searchDir, subchild->data(0, sizeRole).toString(), subchild->data(0, hashRole).toString());
if (!clipPath.isEmpty()) {
......@@ -645,7 +645,7 @@ void DocumentChecker::acceptDialog()
QTreeWidgetItem *child = m_ui.treeWidget->topLevelItem(ix);
while (child) {
if (child->data(0, statusRole).toInt() == SOURCEMISSING) {
for (int j = 0; j < child->childCount(); j++) {
for (int j = 0; j < child->childCount(); ++j) {
fixClipItem(child->child(j), producers, infoproducers, trans);
}
}
......@@ -796,7 +796,7 @@ void DocumentChecker::slotFixDuration()
}
if (resetDuration) {
// something is wrong in clip durations, so remove them so mlt fetches them again
for (int j = 0; j < documentProducers.count(); j++) {
for (int j = 0; j < documentProducers.count(); ++j) {
QDomElement mltProd = documentProducers.at(j).toElement();
QString prodId = mltProd.attribute("id");
if (prodId == id || prodId.startsWith(id + '_')) {
......@@ -894,7 +894,7 @@ void DocumentChecker::slotDeleteSelected()
for (int i = 0; i < playlists.count(); ++i) {
QDomNodeList entries = playlists.at(i).toElement().elementsByTagName("entry");
for (int j = 0; j < entries.count(); j++) {
for (int j = 0; j < entries.count(); ++j) {
e = entries.item(j).toElement();
if (deletedIds.contains(e.attribute("producer").section('_', 0, 0)) || deletedIds.contains(e.attribute("producer").section(':', 1, 1).section('_', 0, 0))) {
// Replace clip with blank
......
......@@ -378,7 +378,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
} else {
// convert transition
QDomNamedNodeMap attrs = tr.attributes();
for (int j = 0; j < attrs.count(); j++) {
for (int j = 0; j < attrs.count(); ++j) {
QString attrName = attrs.item(j).nodeName();
if (attrName != "in" && attrName != "out" && attrName != "id") {
QDomElement property = m_doc.createElement("property");
......@@ -417,7 +417,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
QDomText value = m_doc.createTextNode(QString::number(effectix));
e.appendChild(value);
filt.appendChild(e);
for (int j = 0; j < attrs.count(); j++) {
for (int j = 0; j < attrs.count(); ++j) {
QDomAttr a = attrs.item(j).toAttr();
if (!a.isNull()) {
kDebug() << " FILTER; adding :" << a.name() << ':' << a.value();
......@@ -452,7 +452,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
QDomText value = m_doc.createTextNode(QString::number(1));
e.appendChild(value);
filt.appendChild(e);
for (int j = 0; j < attrs.count(); j++) {
for (int j = 0; j < attrs.count(); ++j) {
QDomAttr a = attrs.item(j).toAttr();
if (!a.isNull()) {
kDebug() << " FILTER; adding :" << a.name() << ':' << a.value();
......@@ -498,7 +498,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
if (m.toElement().tagName() == "markers") {
QDomNodeList prodchilds = m.childNodes();
int maxchild = prodchilds.count();
for (int k = 0; k < maxchild; k++) {
for (int k = 0; k < maxchild; ++k) {
QDomElement mark = prodchilds.at(0).toElement();
mark.setAttribute("id", prod.attribute("id"));
markers.insertAfter(mark, QDomNode());
......@@ -513,7 +513,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
tdoc.appendChild(title);
QDomNodeList objects = titleclip.childNodes();
int maxchild = objects.count();
for (int k = 0; k < maxchild; k++) {
for (int k = 0; k < maxchild; ++k) {
QString objectxml;
QDomElement ob = objects.at(k).toElement();
if (ob.attribute("type") == "3") {
......@@ -847,11 +847,11 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
bool foundData = false;
bool foundResource = false;
bool foundService = false;
for (int j = 0; j < mltproducers.count(); j++) {
for (int j = 0; j < mltproducers.count(); ++j) {
QDomElement wproducer = mltproducers.at(j).toElement();
if (wproducer.attribute("id") == id) {
QDomNodeList props = wproducer.childNodes();
for (int k = 0; k < props.count(); k++) {
for (int k = 0; k < props.count(); ++k) {
if (props.at(k).toElement().attribute("name") == "xmldata") {
props.at(k).firstChild().setNodeValue(data);
foundData = true;
......@@ -904,7 +904,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
EffectsList::setProperty(effect, "tag", info.at(0));
EffectsList::setProperty(effect, "mlt_service", info.at(0));
EffectsList::removeProperty(effect, "src");
for (int j = 1; j < info.size(); j++) {
for (int j = 1; j < info.size(); ++j) {
QString value = EffectsList::property(effect, info.at(j).section('=', 0, 0));
if (!value.isEmpty()) {
// update parameter name
......
......@@ -169,7 +169,7 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
int errorPos = 0;
line--;
col = col - 2;
for (int j = 0; j < line && errorPos < playlist.length(); j++) {
for (int j = 0; j < line && errorPos < playlist.length(); ++j) {
errorPos = playlist.indexOf("\n", errorPos);
errorPos++;
}
......@@ -243,7 +243,7 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
if (!tracksinfo.isNull()) {
QDomNodeList trackslist = tracksinfo.childNodes();
int maxchild = trackslist.count();
for (int k = 0; k < maxchild; k++) {
for (int k = 0; k < maxchild; ++k) {
e = trackslist.at(k).toElement();
if (e.tagName() == "trackinfo") {
TrackInfo projectTrack;
......@@ -291,7 +291,7 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
e.setTagName("producer");
// Get MLT's original producer properties
QDomElement orig;
for (int j = 0; j < max; j++) {
for (int j = 0; j < max; ++j) {
QDomNode o = producers.item(j);
QString origId = o.attributes().namedItem("id").nodeValue().section('_', 0, 0);
if (origId == prodId) {
......@@ -318,7 +318,7 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
if (!markers.isNull()) {
QDomNodeList markerslist = markers.childNodes();
int maxchild = markerslist.count();
for (int k = 0; k < maxchild; k++) {
for (int k = 0; k < maxchild; ++k) {
e = markerslist.at(k).toElement();
if (e.tagName() == "marker") {
CommentedTime marker(GenTime(e.attribute("time").toDouble()), e.attribute("comment"), e.attribute("type").toInt());
......@@ -673,7 +673,7 @@ QDomDocument KdenliveDoc::xmlSceneList(const QString &scene, const QStringList &
QDomNodeList params = m.childNodes();
QString id;
QString tag;
for (int j = 0; j < params.count(); j++) {
for (int j = 0; j < params.count(); ++j) {
QDomElement e = params.item(j).toElement();
if (e.attribute("name") == "kdenlive_id") {
id = e.firstChild().nodeValue();
......@@ -763,7 +763,7 @@ QDomDocument KdenliveDoc::xmlSceneList(const QString &scene, const QStringList &
e.setTagName("kdenlive_producer");
addedXml.appendChild(sceneList.importNode(e, true));
QList < CommentedTime > marks = list.at(i)->commentedSnapMarkers();
for (int j = 0; j < marks.count(); j++) {
for (int j = 0; j < marks.count(); ++j) {
QDomElement marker = sceneList.createElement("marker");
marker.setAttribute("time", marks.at(j).time().ms() / 1000);
marker.setAttribute("comment", marks.at(j).comment());
......@@ -1180,7 +1180,7 @@ void KdenliveDoc::setNewClipResource(const QString &id, const QString &path)
QString prodId = m.toElement().attribute("id");
if (prodId == id || prodId.startsWith(id + '_')) {
QDomNodeList params = m.childNodes();
for (int j = 0; j < params.count(); j++) {
for (int j = 0; j < params.count(); ++j) {
QDomElement e = params.item(j).toElement();
if (e.attribute("name") == "resource") {
e.firstChild().setNodeValue(path);
......
......@@ -211,7 +211,7 @@ QStringList DvdWizardChapters::selectedTitles() const
for (int i = 0; i < max; ++i) {
result.append(m_view.vob_list->itemText(i));
QStringList chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList();
for (int j = 0; j < chapters.count(); j++) {
for (int j = 0; j < chapters.count(); ++j) {
result.append(Timecode::getStringTimecode(chapters.at(j).toInt(), m_tc.fps(), true));
}
}
......@@ -222,7 +222,7 @@ QStringList DvdWizardChapters::chapters(int ix) const
{
QStringList result;
QStringList chapters = m_view.vob_list->itemData(ix, Qt::UserRole + 1).toStringList();
for (int j = 0; j < chapters.count(); j++) {
for (int j = 0; j < chapters.count(); ++j) {
result.append(Timecode::getStringTimecode(chapters.at(j).toInt(), m_tc.fps(), true));
}
return result;
......@@ -236,7 +236,7 @@ QStringList DvdWizardChapters::selectedTargets() const
// rightJustified: fill with 0s to make menus with more than 9 buttons work (now up to 99 buttons possible)
result.append("jump title " + QString::number(i + 1).rightJustified(2, '0'));
QStringList chapters = m_view.vob_list->itemData(i, Qt::UserRole + 1).toStringList();
for (int j = 0; j < chapters.count(); j++) {
for (int j = 0; j < chapters.count(); ++j) {
result.append("jump title " + QString::number(i + 1).rightJustified(2, '0') + " chapter " + QString::number(j + 1).rightJustified(2, '0'));
}
}
......
......@@ -272,7 +272,7 @@ void DvdWizardVob::slotAddVobFile(KUrl url, const QString &chapters, bool checkF
file.close();
QDomNodeList chapters = doc.elementsByTagName("chapter");
QStringList chaptersList;
for (int j = 0; j < chapters.count(); j++) {
for (int j = 0; j < chapters.count(); ++j) {
chaptersList.append(QString::number(chapters.at(j).toElement().attribute("time").toInt()));
}
item->setData(1, Qt::UserRole + 1, chaptersList.join(";"));
......
......@@ -75,7 +75,7 @@ QDomElement EffectsList::getEffectByTag(const QString & tag, const QString & id)
if (effect.tagName() == "effectgroup") {
// Effect group
QDomNodeList subeffects = effect.elementsByTagName("effect");
for (int j = 0; j < subeffects.count(); j++) {
for (int j = 0; j < subeffects.count(); ++j) {
QDomElement sub = subeffects.at(j).toElement();
initEffect(sub);
}
......
......@@ -83,7 +83,7 @@ void EffectsListView::filterList(int pos)
for (int i = 0; i < m_effectsList->topLevelItemCount(); ++i) {
QTreeWidgetItem *folder = m_effectsList->topLevelItem(i);
bool hideFolder = true;
for (int j = 0; j < folder->childCount(); j++) {
for (int j = 0; j < folder->childCount(); ++j) {
QTreeWidgetItem *item = folder->child(j);
if (pos == 0 || pos == item->data(0, Qt::UserRole).toInt()) {
item->setHidden(false);
......@@ -194,7 +194,7 @@ void EffectsListView::slotAutoExpand(const QString &text)
/*if (folder->isHidden())
continue;*/
if (!text.isEmpty()) {
for (int j = 0; j < folder->childCount(); j++) {
for (int j = 0; j < folder->childCount(); ++j) {
QTreeWidgetItem *item = folder->child(j);
if (!item->isHidden()) {
expandFolder = true;
......
......@@ -284,7 +284,7 @@ void CollapsibleGroup::updateTimecodeFormat()
{
QVBoxLayout *vbox = static_cast<QVBoxLayout *>(widgetFrame->layout());
if (vbox == NULL) return;
for (int j = vbox->count() - 1; j >= 0; j--) {
for (int j = vbox->count() - 1; j >= 0; --j) {
CollapsibleEffect *e = static_cast<CollapsibleEffect *>(vbox->itemAt(j)->widget());
if (e) e->updateTimecodeFormat();
}
......@@ -377,7 +377,7 @@ void CollapsibleGroup::slotRenameGroup()
{
m_title->setReadOnly(true);
if (m_title->text().isEmpty()) m_title->setText(i18n("Effect Group"));
for (int j = 0; j < m_subWidgets.count(); j++) {
for (int j = 0; j < m_subWidgets.count(); ++j) {
m_subWidgets.at(j)->setGroupName(m_title->text());
}
m_info.groupName = m_title->text();
......@@ -397,7 +397,7 @@ QDomDocument CollapsibleGroup::effectsData()
QDomElement list = doc.createElement("effectgroup");
list.setAttribute("name", m_title->text());
doc.appendChild(list);
for (int j = 0; j < m_subWidgets.count(); j++) {
for (int j = 0; j < m_subWidgets.count(); ++j) {
list.appendChild(doc.importNode(m_subWidgets.at(j)->effect(), true));
}
return doc;
......
......@@ -199,7 +199,7 @@ void EffectStackView2::setupListView()
effectInfo.fromString(d.attribute("kdenlive_info"));
if (effectInfo.groupIndex >= 0) {
// effect is in a group
for (int j = 0; j < vbox1->count(); j++) {
for (int j = 0; j < vbox1->count(); ++j) {
CollapsibleGroup *eff = static_cast<CollapsibleGroup *>(vbox1->itemAt(j)->widget());
if (eff->isGroup() && eff->groupIndex() == effectInfo.groupIndex) {
group = eff;
......
......@@ -131,7 +131,7 @@ void KeyframeEdit::addParameter(const QDomElement &e, int activeKeyframe)
int frame = frames.at(i).section('=', 0, 0).toInt();
bool found = false;
int j;
for (j = 0; j < keyframe_list->rowCount(); j++) {
for (j = 0; j < keyframe_list->rowCount(); ++j) {
int currentPos = getPos(j);
if (frame == currentPos) {
keyframe_list->setItem(j, columnId, new QTableWidgetItem(frames.at(i).section('=', 1, 1)));
......@@ -240,7 +240,7 @@ void KeyframeEdit::slotGenerateParams(int row, int column)
if (val != keyframe_list->verticalHeaderItem(row)->text())
keyframe_list->verticalHeaderItem(row)->setText(val);
for (int col = 0; col < keyframe_list->horizontalHeader()->count(); col++) {
for (int col = 0; col < keyframe_list->horizontalHeader()->count(); ++col) {
item = keyframe_list->item(row, col);
if (!item) continue;
int v = item->text().toInt();
......@@ -297,7 +297,7 @@ void KeyframeEdit::slotGenerateParams(int row, int column)
void KeyframeEdit::generateAllParams()
{
for (int col = 0; col < keyframe_list->columnCount(); col++) {
for (int col = 0; col < keyframe_list->columnCount(); ++col) {
QString keyframes;
for (int i = 0; i < keyframe_list->rowCount(); ++i) {
if (keyframe_list->item(i, col))
......@@ -310,7 +310,7 @@ void KeyframeEdit::generateAllParams()
const QString KeyframeEdit::getValue(const QString &name)
{
for (int col = 0; col < keyframe_list->columnCount(); col++) {
for (int col = 0; col < keyframe_list->columnCount(); ++col) {
QDomNode na = m_params.at(col).firstChildElement("name");
QString paramName = i18n(na.toElement().text().toUtf8().data());
if (paramName == name)
......@@ -338,7 +338,7 @@ void KeyframeEdit::slotAdjustKeyframeInfo(bool seek)
m_position->setPosition(getPos(item->row()));
m_position->blockSignals(false);
for (int col = 0; col < keyframe_list->columnCount(); col++) {
for (int col = 0; col < keyframe_list->columnCount(); ++col) {
DoubleParameterWidget *doubleparam = static_cast <DoubleParameterWidget*>(m_slidersLayout->itemAtPosition(col, 0)->widget());
if (!doubleparam)
continue;
......@@ -368,7 +368,7 @@ void KeyframeEdit::slotAdjustKeyframeValue(double value)
Q_UNUSED(value)
QTableWidgetItem *item = keyframe_list->currentItem();
for (int col = 0; col < keyframe_list->columnCount(); col++) {
for (int col = 0; col < keyframe_list->columnCount(); ++col) {
DoubleParameterWidget *doubleparam = static_cast <DoubleParameterWidget*>(m_slidersLayout->itemAtPosition(col, 0)->widget());
if (!doubleparam)
continue;
......@@ -438,7 +438,7 @@ void KeyframeEdit::slotUpdateVisibleParameter(int id, bool update)
for (int i = 0; i < m_params.count(); ++i) {
m_params[i].setAttribute("intimeline", (i == id ? "1" : "0"));
}
for (int col = 0; col < keyframe_list->columnCount(); col++) {
for (int col = 0; col < keyframe_list->columnCount(); ++col) {
DoubleParameterWidget *doubleparam = static_cast <DoubleParameterWidget*>(m_slidersLayout->itemAtPosition(col, 0)->widget());
if (!doubleparam)
continue;
......
......@@ -314,7 +314,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
QString inName = pa.attribute("inpoints");
QString outName = pa.attribute("outpoints");
int start = pa.attribute("min").toInt();
for (int j = start; j <= number; j++) {
for (int j = start; j <= number; ++j) {
QString in = inName;
in.replace("%i", QString::number(j));
QString out = outName;
......@@ -677,7 +677,7 @@ void ParameterContainer::slotCollectAllParameters()
} else {
EffectsList::setParameter(m_effect, number, QString::number(points.count()));
}
for (int j = 0; (j < points.count() && j + off <= end); j++) {
for (int j = 0; (j < points.count() && j + off <= end); ++j) {
QString in = inName;
in.replace("%i", QString::number(j + off));
QString out = outName;
......@@ -832,13 +832,13 @@ void ParameterContainer::slotStartFilterJobAction()
QDomNodeList params = m_effect.elementsByTagName("parameter");
CustomTrackView::adjustEffectParameters(parameters, params, m_metaInfo->profile);
QString paramData;
for (int j = 0; j < parameters.count(); j++)
for (int j = 0; j < parameters.count(); ++j)
paramData.append(parameters.at(j).name()+"="+parameters.at(j).value()+" ");
filterparams.replace("%params", paramData);
}
QMap <QString, QString> extraParams;
QDomNodeList jobparams = pa.elementsByTagName("jobparam");
for (int j = 0; j < jobparams.count(); j++) {
for (int j = 0; j < jobparams.count(); ++j) {
QDomElement e = jobparams.item(j).toElement();
extraParams.insert(e.attribute("name"), e.text().toUtf8());
}
......
......@@ -127,7 +127,7 @@ void CornersWidget::slotUpdateProperties()
QTableWidgetItem *item = keyframe_list->currentItem();
double val;
for (int col = 0; col < 8; col++) {
for (int col = 0; col < 8; ++col) {
if (col % 2 == 0)
val = pol.at(col / 2).x() / (double)m_monitor->render->frameRenderWidth();
else
......@@ -149,7 +149,7 @@ QList<QPointF> CornersWidget::getPoints(QTableWidgetItem* keyframe)
if (!keyframe)
return points;
for (int col = 0; col < 8; col++) {
for (int col = 0; col < 8; ++col) {
if (!keyframe_list->item(keyframe->row(), col))
return QList<QPointF>();
double val = (keyframe_list->item(keyframe->row(), col)->text().toInt() - 2000) / 2000.;
......
......@@ -186,7 +186,7 @@ void EffectsListWidget::initList(QMenu *effectsMenu, KActionCategory *effectActi
sub4 = new QMenu(i18nc("menu name for effects names between these 2 letters", "S - Z"), sub);
sub->addMenu(sub4);
}
for (int j = 0; j < effectsInCategory; j++) {
for (int j = 0; j < effectsInCategory; ++j) {
QTreeWidgetItem *item = topLevelItem(i)->child(j);
KAction *a = new KAction(KIcon(item->icon(0)), item->text(0), sub);
QStringList data = item->data(0, IdRole).toStringList();
......
......@@ -286,7 +286,7 @@ void KisCurveWidget::paintEvent(QPaintEvent *)
int x;
p.setPen(QPen(Qt::black, 1, Qt::SolidLine));
for (x = 0 ; x < wWidth ; x++) {
for (x = 0 ; x < wWidth ; ++x) {
double normalizedX = double(x) / wWidth;
double curY = wHeight - d->m_curve.value(normalizedX) * wHeight;
......
......@@ -387,9 +387,9 @@ void initEffects::parseEffectFile(EffectsList *customEffectList, EffectsList *au