From: Ed R. <ed....@go...> - 2013-05-20 09:36:17
|
Git commit 603b5a85429226e55a2204ba567898854fe620f6 by Ed Rogalsky, on behalf of Montel Laurent. Committed on 14/05/2013 at 22:48. Pushed by rogalsky into branch 'v0.9'. Better to use ++i than i++ (minor optimization) M +14 -14 src/abstractgroupitem.cpp M +15 -15 src/archivewidget.cpp M +21 -21 src/clipitem.cpp M +15 -15 src/clipmanager.cpp M +2 -2 src/clipproperties.cpp M +1 -1 src/clipstabilize.cpp M +2 -2 src/cliptranscode.cpp M +4 -4 src/colorcorrection/rgbparadegenerator.cpp M +5 -5 src/colorcorrection/waveformgenerator.cpp M +1 -1 src/commands/moveeffectcommand.cpp M +1 -1 src/cornerswidget.cpp M +165 -165 src/customtrackview.cpp M +1 -1 src/databackup/backupwidget.cpp M +1 -1 src/definitions.h M +25 -25 src/docclipbase.cpp M +23 -23 src/documentchecker.cpp M +16 -16 src/documentvalidator.cpp M +6 -6 src/dvdwizard.cpp M +9 -9 src/dvdwizardchapters.cpp M +16 -16 src/dvdwizardmenu.cpp M +1 -1 src/dvdwizardmenu.h M +8 -8 src/dvdwizardvob.cpp M +17 -17 src/effectslist.cpp M +2 -2 src/effectslistview.cpp M +6 -6 src/effectslistwidget.cpp M +3 -3 src/effectstack/collapsibleeffect.cpp M +8 -8 src/effectstack/collapsiblegroup.cpp M +19 -19 src/effectstack/effectstackview2.cpp M +8 -8 src/effectstack/parametercontainer.cpp M +7 -7 src/geometrywidget.cpp M +1 -1 src/headertrack.cpp M +3 -3 src/initeffects.cpp M +1 -1 src/jogaction.cpp M +1 -1 src/jogshuttleconfig.cpp M +24 -24 src/kdenlivedoc.cpp M +8 -8 src/kdenlivesettingsdialog.cpp M +5 -5 src/keyframeedit.cpp M +4 -4 src/keyframehelper.cpp M +7 -7 src/kis_cubic_curve.cpp M +2 -2 src/kthumb.cpp M +1 -1 src/lib/audio/audioCorrelation.cpp M +2 -2 src/lib/audio/audioCorrelationInfo.cpp M +3 -3 src/lib/audio/audioEnvelope.cpp M +1 -1 src/lib/audio/audioInfo.cpp M +6 -6 src/lib/audio/fftCorrelation.cpp M +8 -8 src/lib/audio/fftTools.cpp M +16 -16 src/mainwindow.cpp M +3 -3 src/managecapturesdialog.cpp M +1 -1 src/mltdevicecapture.cpp M +2 -2 src/monitor.cpp M +2 -2 src/monitormanager.cpp M +3 -3 src/onmonitoritems/onmonitorpathitem.cpp M +10 -10 src/onmonitoritems/rotoscoping/nearestpoint.cpp M +6 -6 src/parameterplotter.cpp M +3 -3 src/profilesdialog.cpp M +1 -1 src/projectitem.cpp M +36 -36 src/projectlist.cpp M +1 -1 src/projectlistview.cpp M +9 -9 src/projectsettings.cpp M +1 -1 src/recmonitor.cpp M +33 -33 src/renderer.cpp M +13 -13 src/renderwidget.cpp M +3 -3 src/scopes/audioscopes/audiosignal.cpp M +4 -4 src/scopes/audioscopes/audiospectrum.cpp M +1 -1 src/scopes/audioscopes/spectrogram.cpp M +8 -8 src/scopes/scopemanager.cpp M +4 -4 src/slideshowclip.cpp M +2 -2 src/smallruler.cpp M +2 -2 src/stopmotion/stopmotion.cpp M +3 -3 src/titledocument.cpp M +20 -20 src/titlewidget.cpp M +1 -1 src/tracksconfigdialog.cpp M +19 -19 src/trackview.cpp M +7 -7 src/transition.cpp M +1 -1 src/transitionsettings.cpp M +2 -2 src/unicodedialog.cpp M +2 -2 src/utils/archiveorg.cpp M +1 -1 src/utils/openclipart.cpp M +11 -11 src/wizard.cpp http://commits.kde.org/kdenlive/603b5a85429226e55a2204ba567898854fe620f6 diff --git a/src/abstractgroupitem.cpp b/src/abstractgroupitem.cpp index 83f5e59..588c58e 100644 --- a/src/abstractgroupitem.cpp +++ b/src/abstractgroupitem.cpp @@ -111,7 +111,7 @@ QPainterPath AbstractGroupItem::groupShape(GRAPHICSRECTITEM type, QPointF offset { QPainterPath path; QList<QGraphicsItem *> children = childItems(); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == (int)type) { QRectF r(children.at(i)->sceneBoundingRect()); r.translate(offset); @@ -134,7 +134,7 @@ QPainterPath AbstractGroupItem::spacerGroupShape(GRAPHICSRECTITEM type, QPointF { QPainterPath path; QList<QGraphicsItem *> children = childItems(); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == (int)type) { QRectF r(children.at(i)->sceneBoundingRect()); r.translate(offset); @@ -221,7 +221,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant int topTrack = -1; QList<int> groupTracks; QList<QGraphicsItem *> children = childItems(); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { int currentTrack = 0; if (children.at(i)->type() == AVWIDGET || children.at(i)->type() == TRANSITIONWIDGET) { currentTrack = static_cast <AbstractClipItem*> (children.at(i))->track(); @@ -267,7 +267,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant // Check no clip in the group goes outside of existing tracks int maximumTrack = projectScene()->tracksCount() - 1; int groupHeight = 0; - for (int i = 0; i < groupTracks.count(); i++) { + for (int i = 0; i < groupTracks.count(); ++i) { int offset = groupTracks.at(i) - topTrack; if (offset > groupHeight) groupHeight = offset; } @@ -276,7 +276,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant proposedTrack = qMax(proposedTrack, 0); int groupOffset = proposedTrack - topTrack; if (!lockedTracks.isEmpty()) { - for (int i = 0; i < groupTracks.count(); i++) { + for (int i = 0; i < groupTracks.count(); ++i) { if (lockedTracks.contains(QString::number(groupTracks.at(i) + groupOffset))) { return pos(); } @@ -296,7 +296,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant shape = clipGroupShape(newPos - pos()); collidingItems = scene()->items(shape, Qt::IntersectsItemShape); collidingItems.removeAll(this); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == GROUPWIDGET) { QList<QGraphicsItem *> subchildren = children.at(i)->childItems(); for (int j = 0; j < subchildren.count(); j++) { @@ -309,7 +309,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant if (!collidingItems.isEmpty()) { bool forwardMove = xpos > start.x(); int offset = 0; - for (int i = 0; i < collidingItems.count(); i++) { + for (int i = 0; i < collidingItems.count(); ++i) { QGraphicsItem *collision = collidingItems.at(i); if (collision->type() == AVWIDGET) { // Collision @@ -342,7 +342,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant // If there is still a collision after our position adjust, restore original pos collidingItems = scene()->items(clipGroupShape(newPos - pos()), Qt::IntersectsItemShape); collidingItems.removeAll(this); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == GROUPWIDGET) { QList<QGraphicsItem *> subchildren = children.at(i)->childItems(); for (int j = 0; j < subchildren.count(); j++) { @@ -351,7 +351,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant } collidingItems.removeAll(children.at(i)); } - for (int i = 0; i < collidingItems.count(); i++) + for (int i = 0; i < collidingItems.count(); ++i) if (collidingItems.at(i)->type() == AVWIDGET) return pos(); } } @@ -360,7 +360,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant shape = transitionGroupShape(newPos - pos()); collidingItems = scene()->items(shape, Qt::IntersectsItemShape); collidingItems.removeAll(this); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == GROUPWIDGET) { QList<QGraphicsItem *> subchildren = children.at(i)->childItems(); for (int j = 0; j < subchildren.count(); j++) { @@ -374,7 +374,7 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant else { bool forwardMove = xpos > start.x(); int offset = 0; - for (int i = 0; i < collidingItems.count(); i++) { + for (int i = 0; i < collidingItems.count(); ++i) { QGraphicsItem *collision = collidingItems.at(i); if (collision->type() == TRANSITIONWIDGET) { // Collision @@ -406,10 +406,10 @@ QVariant AbstractGroupItem::itemChange(GraphicsItemChange change, const QVariant } // If there is still a collision after our position adjust, restore original pos collidingItems = scene()->items(transitionGroupShape(newPos - pos()), Qt::IntersectsItemShape); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { collidingItems.removeAll(children.at(i)); } - for (int i = 0; i < collidingItems.count(); i++) + for (int i = 0; i < collidingItems.count(); ++i) if (collidingItems.at(i)->type() == TRANSITIONWIDGET) return pos(); } } @@ -430,7 +430,7 @@ void AbstractGroupItem::dropEvent(QGraphicsSceneDragDropEvent * event) QPointF dropPos = event->scenePos(); QList<QGraphicsItem *> selection = scene()->items(dropPos); AbstractClipItem *dropChild = NULL; - for (int i = 0; i < selection.count(); i++) { + for (int i = 0; i < selection.count(); ++i) { if (selection.at(i)->type() == AVWIDGET) { dropChild = (AbstractClipItem *) selection.at(i); break; diff --git a/src/archivewidget.cpp b/src/archivewidget.cpp index e942b15..7bc3ed4 100644 --- a/src/archivewidget.cpp +++ b/src/archivewidget.cpp @@ -281,7 +281,7 @@ void ArchiveWidget::openArchiveForExtraction() // Check that it is a kdenlive project archive bool isProjectArchive = false; QStringList files = m_extractArchive->directory()->entries(); - for (int i = 0; i < files.count(); i++) { + for (int i = 0; i < files.count(); ++i) { if (files.at(i).endsWith(".kdenlive")) { m_projectName = files.at(i); isProjectArchive = true; @@ -349,7 +349,7 @@ void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, const QStringList QFileInfoList resultList = dir.entryInfoList(QDir::Files); QStringList slideImages; qint64 totalSize = 0; - for (int i = 0; i < resultList.count(); i++) { + for (int i = 0; i < resultList.count(); ++i) { totalSize += resultList.at(i).size(); slideImages << resultList.at(i).absoluteFilePath(); } @@ -434,7 +434,7 @@ void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, const QMap <QStri QFileInfoList resultList = dir.entryInfoList(QDir::Files); QStringList slideImages; qint64 totalSize = 0; - for (int i = 0; i < resultList.count(); i++) { + for (int i = 0; i < resultList.count(); ++i) { totalSize += resultList.at(i).size(); slideImages << resultList.at(i).absoluteFilePath(); } @@ -538,7 +538,7 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass) int items = 0; // We parse all files going into one folder, then start the copy job - for (int i = 0; i < files_list->topLevelItemCount(); i++) { + for (int i = 0; i < files_list->topLevelItemCount(); ++i) { parentItem = files_list->topLevelItem(i); if (parentItem->isDisabled()) { parentItem->setExpanded(false); @@ -616,7 +616,7 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass) if (isArchive) { m_foldersList.append(destPath); - for (int i = 0; i < files.count(); i++) { + for (int i = 0; i < files.count(); ++i) { m_filesList.insert(files.at(i).path(), destPath + files.at(i).fileName()); } slotArchivingFinished(); @@ -664,7 +664,7 @@ void ArchiveWidget::slotArchivingFinished(KJob *job, bool finished) archive_url->setEnabled(true); proxy_only->setEnabled(true); compressed_archive->setEnabled(true); - for (int i = 0; i < files_list->topLevelItemCount(); i++) { + for (int i = 0; i < files_list->topLevelItemCount(); ++i) { files_list->topLevelItem(i)->setDisabled(false); for (int j = 0; j < files_list->topLevelItem(i)->childCount(); j++) files_list->topLevelItem(i)->child(j)->setDisabled(false); @@ -684,7 +684,7 @@ bool ArchiveWidget::processProjectFile() QTreeWidgetItem *item; bool isArchive = compressed_archive->isChecked(); - for (int i = 0; i < files_list->topLevelItemCount(); i++) { + for (int i = 0; i < files_list->topLevelItemCount(); ++i) { QTreeWidgetItem *parentItem = files_list->topLevelItem(i); if (parentItem->childCount() > 0) { destUrl = KUrl(archive_url->url().path(KUrl::AddTrailingSlash) + parentItem->data(0, Qt::UserRole).toString()); @@ -720,7 +720,7 @@ bool ArchiveWidget::processProjectFile() // process kdenlive producers QDomNodeList prods = mlt.elementsByTagName("kdenlive_producer"); - for (int i = 0; i < prods.count(); i++) { + for (int i = 0; i < prods.count(); ++i) { QDomElement e = prods.item(i).toElement(); if (e.isNull()) continue; if (e.hasAttribute("resource")) { @@ -737,7 +737,7 @@ bool ArchiveWidget::processProjectFile() // process mlt producers prods = mlt.elementsByTagName("producer"); - for (int i = 0; i < prods.count(); i++) { + for (int i = 0; i < prods.count(); ++i) { QDomElement e = prods.item(i).toElement(); if (e.isNull()) continue; QString src = EffectsList::property(e, "resource"); @@ -752,7 +752,7 @@ bool ArchiveWidget::processProjectFile() // process mlt transitions (for luma files) prods = mlt.elementsByTagName("transition"); QString attribute; - for (int i = 0; i < prods.count(); i++) { + for (int i = 0; i < prods.count(); ++i) { QDomElement e = prods.item(i).toElement(); if (e.isNull()) continue; attribute = "resource"; @@ -853,7 +853,7 @@ void ArchiveWidget::slotArchivingFinished(bool result) archive_url->setEnabled(true); proxy_only->setEnabled(true); compressed_archive->setEnabled(true); - for (int i = 0; i < files_list->topLevelItemCount(); i++) { + for (int i = 0; i < files_list->topLevelItemCount(); ++i) { files_list->topLevelItem(i)->setDisabled(false); for (int j = 0; j < files_list->topLevelItem(i)->childCount(); j++) files_list->topLevelItem(i)->child(j)->setDisabled(false); @@ -953,7 +953,7 @@ void ArchiveWidget::slotProxyOnly(int onlyProxy) QTreeWidgetItem *parentItem = NULL; // Build list of existing proxy ids - for (int i = 0; i < files_list->topLevelItemCount(); i++) { + for (int i = 0; i < files_list->topLevelItemCount(); ++i) { parentItem = files_list->topLevelItem(i); if (parentItem->data(0, Qt::UserRole).toString() == "proxy") break; } @@ -964,7 +964,7 @@ void ArchiveWidget::slotProxyOnly(int onlyProxy) } // Parse all items to disable original clips for existing proxies - for (int i = 0; i < proxyIdList.count(); i++) { + for (int i = 0; i < proxyIdList.count(); ++i) { QString id = proxyIdList.at(i); if (id.isEmpty()) continue; for (int j = 0; j < files_list->topLevelItemCount(); j++) { @@ -983,7 +983,7 @@ void ArchiveWidget::slotProxyOnly(int onlyProxy) } else { // Archive all clips - for (int i = 0; i < files_list->topLevelItemCount(); i++) { + for (int i = 0; i < files_list->topLevelItemCount(); ++i) { QTreeWidgetItem *parentItem = files_list->topLevelItem(i); int items = parentItem->childCount(); for (int j = 0; j < items; j++) { @@ -994,7 +994,7 @@ void ArchiveWidget::slotProxyOnly(int onlyProxy) // Calculate requested size int total = 0; - for (int i = 0; i < files_list->topLevelItemCount(); i++) { + for (int i = 0; i < files_list->topLevelItemCount(); ++i) { QTreeWidgetItem *parentItem = files_list->topLevelItem(i); int items = parentItem->childCount(); int itemsCount = 0; diff --git a/src/clipitem.cpp b/src/clipitem.cpp index e19ef61..fb62f05 100644 --- a/src/clipitem.cpp +++ b/src/clipitem.cpp @@ -160,7 +160,7 @@ void ClipItem::setEffectList(const EffectsList effectList) m_effectList.clone(effectList); m_effectNames = m_effectList.effectNames().join(" / "); if (!m_effectList.isEmpty()) { - for (int i = 0; i < m_effectList.count(); i++) { + for (int i = 0; i < m_effectList.count(); ++i) { QDomElement effect = m_effectList.at(i); QString effectId = effect.attribute("id"); // check if it is a fade effect @@ -238,7 +238,7 @@ void ClipItem::initEffect(QDomElement effect, int diff, int offset) // Init parameter value & keyframes if required QDomNodeList params = effect.elementsByTagName("parameter"); - for (int i = 0; i < params.count(); i++) { + for (int i = 0; i < params.count(); ++i) { QDomElement e = params.item(i).toElement(); if (e.isNull()) @@ -433,7 +433,7 @@ void ClipItem::setKeyframes(const int ix, const QStringList keyframes) QLocale locale; QDomNodeList params = effect.elementsByTagName("parameter"); int keyframeParams = 0; - for (int i = 0; i < params.count(); i++) { + for (int i = 0; i < params.count(); ++i) { QDomElement e = params.item(i).toElement(); if (!e.isNull() && (e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe") && (!e.hasAttribute("intimeline") || e.attribute("intimeline") == "1")) { e.setAttribute("keyframes", keyframes.at(keyframeParams)); @@ -470,7 +470,7 @@ void ClipItem::setSelectedEffect(const int ix) QDomElement effect = effectAtIndex(m_selectedEffect); if (!effect.isNull() && effect.attribute("disable") != "1") { QDomNodeList params = effect.elementsByTagName("parameter"); - for (int i = 0; i < params.count(); i++) { + for (int i = 0; i < params.count(); ++i) { QDomElement e = params.item(i).toElement(); if (!e.isNull() && (e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe") && (!e.hasAttribute("intimeline") || e.attribute("intimeline") == "1")) { m_keyframes.clear(); @@ -510,7 +510,7 @@ void ClipItem::resizeGeometries(const int index, int width, int height, int prev QDomElement effect = m_effectList.at(index); QDomNodeList params = effect.elementsByTagName("parameter"); - for (int i = 0; i < params.count(); i++) { + for (int i = 0; i < params.count(); ++i) { QDomElement e = params.item(i).toElement(); if (!e.isNull() && e.attribute("type") == "geometry") { geom = e.attribute("value"); @@ -526,7 +526,7 @@ QStringList ClipItem::keyframes(const int index) QDomElement effect = m_effectList.at(index); QDomNodeList params = effect.elementsByTagName("parameter"); - for (int i = 0; i < params.count(); i++) { + for (int i = 0; i < params.count(); ++i) { QDomElement e = params.item(i).toElement(); if (!e.isNull() && (e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe")) result.append(e.attribute("keyframes")); @@ -857,7 +857,7 @@ void ClipItem::paint(QPainter *painter, QPointF startPos = mapped.topLeft(); int startOffset = m_info.cropStart.frames(m_fps); if (clipType() == IMAGE || clipType() == TEXT) { - for (int i = left; i <= right; i++) { + for (int i = left; i <= right; ++i) { painter->drawPixmap(startPos + QPointF(FRAME_SIZE *(i - startOffset), 0), m_startPix); } } @@ -869,7 +869,7 @@ void ClipItem::paint(QPainter *painter, QPen pen(Qt::white); pen.setStyle(Qt::DotLine); QList <int> missing; - for (int i = left; i <= right; i++) { + for (int i = left; i <= right; ++i) { img = m_clip->thumbProducer()->findCachedThumb(path + QString::number(i)); QPointF xpos = startPos + QPointF(FRAME_SIZE *(i - startOffset), 0); if (img.isNull()) missing << i; @@ -1081,7 +1081,7 @@ OPERATIONTYPE ClipItem::operationMode(QPointF pos) if (parentItem()) { QGraphicsItemGroup *dragGroup = static_cast <QGraphicsItemGroup *>(parentItem()); QList<QGraphicsItem *> list = dragGroup->childItems(); - for (int i = 0; i < list.count(); i++) { + for (int i = 0; i < list.count(); ++i) { if (list.at(i)->type() == AVWIDGET) { ClipItem *c = static_cast <ClipItem*>(list.at(i)); if (c->startPos() != startPos()) return MOVE; @@ -1096,7 +1096,7 @@ OPERATIONTYPE ClipItem::operationMode(QPointF pos) if (parentItem()) { QGraphicsItemGroup *dragGroup = static_cast <QGraphicsItemGroup *>(parentItem()); QList<QGraphicsItem *> list = dragGroup->childItems(); - for (int i = 0; i < list.count(); i++) { + for (int i = 0; i < list.count(); ++i) { if (list.at(i)->type() == AVWIDGET) { ClipItem *c = static_cast <ClipItem*>(list.at(i)); if (c->endPos() != endPos()) return MOVE; @@ -1131,7 +1131,7 @@ QList <GenTime> ClipItem::snapMarkers() const QList < GenTime > markers = m_clip->snapMarkers(); GenTime pos; - for (int i = 0; i < markers.size(); i++) { + for (int i = 0; i < markers.size(); ++i) { pos = GenTime((int)(markers.at(i).frames(m_fps) / qAbs(m_speed) + 0.5), m_fps) - cropStart(); if (pos > GenTime()) { if (pos > cropDuration()) break; @@ -1148,7 +1148,7 @@ QList <CommentedTime> ClipItem::commentedSnapMarkers() const QList < CommentedTime > markers = m_clip->commentedSnapMarkers(); GenTime pos; - for (int i = 0; i < markers.size(); i++) { + for (int i = 0; i < markers.size(); ++i) { pos = GenTime((int)(markers.at(i).time().frames(m_fps) / qAbs(m_speed) + 0.5), m_fps) - cropStart(); if (pos > GenTime()) { if (pos > cropDuration()) break; @@ -1194,7 +1194,7 @@ void ClipItem::slotPrepareAudioThumb(double pixelForOneFrame, int startpixel, in QPainter pixpainter(&m_audioThumbCachePic[startCache]); - for (int i = 0; i < channels; i++) { + for (int i = 0; i < channels; ++i) { if (simplifiedAudio) { positiveChannelPaths[i].moveTo(-1, channelHeight); } @@ -1252,7 +1252,7 @@ void ClipItem::slotPrepareAudioThumb(double pixelForOneFrame, int startpixel, in pixpainter.setBrush(Qt::NoBrush); } pixpainter.setRenderHint(QPainter::Antialiasing, false); - for (int i = 0; i < channels; i++) { + for (int i = 0; i < channels; ++i) { if (fullAreaDraw) { pixpainter.drawPath(positiveChannelPaths[i].united(negativeChannelPaths.value(i))); } else @@ -1419,7 +1419,7 @@ QVariant ClipItem::itemChange(GraphicsItemChange change, const QVariant &value) bool forwardMove = newPos.x() > pos().x(); int offset = 0; if (!items.isEmpty()) { - for (int i = 0; i < items.count(); i++) { + for (int i = 0; i < items.count(); ++i) { if (!items.at(i)->isEnabled()) continue; if (items.at(i)->type() == type()) { // Collision! @@ -1639,7 +1639,7 @@ EffectsParameterList ClipItem::addEffect(QDomElement effect, bool /*animate*/) }*/ } - for (int i = 0; i < params.count(); i++) { + for (int i = 0; i < params.count(); ++i) { QDomElement e = params.item(i).toElement(); if (!e.isNull()) { if (e.attribute("type") == "geometry" && !e.hasAttribute("fixed")) { @@ -1789,7 +1789,7 @@ const ItemInfo ClipItem::speedIndependantInfo() const int ClipItem::nextFreeEffectGroupIndex() const { int freeGroupIndex = 0; - for (int i = 0; i < m_effectList.count(); i++) { + for (int i = 0; i < m_effectList.count(); ++i) { QDomElement effect = m_effectList.at(i); EffectInfo effectInfo; effectInfo.fromString(effect.attribute("kdenlive_info")); @@ -1814,7 +1814,7 @@ void ClipItem::dropEvent(QGraphicsSceneDragDropEvent * event) QDomNodeList effectlist = e.elementsByTagName("effect"); int freeGroupIndex = nextFreeEffectGroupIndex(); EffectInfo effectInfo; - for (int i = 0; i < effectlist.count(); i++) { + for (int i = 0; i < effectlist.count(); ++i) { QDomElement effect = effectlist.at(i).toElement(); effectInfo.fromString(effect.attribute("kdenlive_info")); effectInfo.groupIndex = freeGroupIndex; @@ -1895,7 +1895,7 @@ void ClipItem::insertKeyframe(QDomElement effect, int pos, int val) effect.setAttribute("active_keyframe", pos); m_editedKeyframe = pos; QDomNodeList params = effect.elementsByTagName("parameter"); - for (int i = 0; i < params.count(); i++) { + for (int i = 0; i < params.count(); ++i) { QDomElement e = params.item(i).toElement(); if (!e.isNull() && (e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe")) { QString kfr = e.attribute("keyframes"); @@ -1935,7 +1935,7 @@ void ClipItem::movedKeyframe(QDomElement effect, int oldpos, int newpos, double QDomNodeList params = effect.elementsByTagName("parameter"); int start = cropStart().frames(m_fps); int end = (cropStart() + cropDuration()).frames(m_fps) - 1; - for (int i = 0; i < params.count(); i++) { + for (int i = 0; i < params.count(); ++i) { QDomElement e = params.item(i).toElement(); if (!e.isNull() && (e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe")) { QString kfr = e.attribute("keyframes"); @@ -1995,7 +1995,7 @@ Mlt::Producer *ClipItem::getProducer(int track, bool trackSpecific) QMap<int, QDomElement> ClipItem::adjustEffectsToDuration(int width, int height, ItemInfo oldInfo) { QMap<int, QDomElement> effects; - for (int i = 0; i < m_effectList.count(); i++) { + for (int i = 0; i < m_effectList.count(); ++i) { QDomElement effect = m_effectList.at(i); if (effect.attribute("id").startsWith("fade")) { diff --git a/src/clipmanager.cpp b/src/clipmanager.cpp index b764ee7..e661c6e 100644 --- a/src/clipmanager.cpp +++ b/src/clipmanager.cpp @@ -227,7 +227,7 @@ void ClipManager::checkAudioThumbs() } m_thumbsMutex.lock(); - for (int i = 0; i < m_clipList.count(); i++) { + for (int i = 0; i < m_clipList.count(); ++i) { DocClipBase *clip = m_clipList.at(i); if (clip->hasAudioThumb() && !clip->audioThumbCreated()) m_audioThumbsQueue.append(m_clipList.at(i)->getId()); @@ -294,7 +294,7 @@ void ClipManager::slotGetAudioThumbs() h3 = 0; for (int c = 0; c < channels; c++) { QByteArray audioArray(arrayWidth, '\x00'); - for (int i = 0; i < arrayWidth; i++) { + for (int i = 0; i < arrayWidth; ++i) { audioArray[i] = channelarray.at(h2 + h3 + i); if (audioArray.at(i) > maxVolume) maxVolume = audioArray.at(i); } @@ -353,7 +353,7 @@ void ClipManager::slotGetAudioThumbs() for (int c = 0; c < channels; c++) { QByteArray audioArray; audioArray.resize(arrayWidth); - for (int i = 0; i < audioArray.size(); i++) { + for (int i = 0; i < audioArray.size(); ++i) { double pcmval = *(pcm + c + i * samples / audioArray.size()); if (pcmval >= 0) { pcmval = sqrt(pcmval) / 2.83 + 64; @@ -420,7 +420,7 @@ void ClipManager::slotDeleteClips(QStringList ids) QUndoCommand *delClips = new QUndoCommand(); delClips->setText(i18np("Delete clip", "Delete clips", ids.size())); - for (int i = 0; i < ids.size(); i++) { + for (int i = 0; i < ids.size(); ++i) { DocClipBase *clip = getClipById(ids.at(i)); if (clip) { new AddClipCommand(m_doc, clip->toXML(), ids.at(i), false, delClips); @@ -431,7 +431,7 @@ void ClipManager::slotDeleteClips(QStringList ids) void ClipManager::deleteClip(const QString &clipId) { - for (int i = 0; i < m_clipList.count(); i++) { + for (int i = 0; i < m_clipList.count(); ++i) { if (m_clipList.at(i)->getId() == clipId) { DocClipBase *clip = m_clipList.takeAt(i); if (clip->clipType() != COLOR && clip->clipType() != SLIDESHOW && !clip->fileURL().isEmpty()) { @@ -455,7 +455,7 @@ DocClipBase *ClipManager::getClipById(QString clipId) { //kDebug() << "++++ CLIP MAN, LOOKING FOR CLIP ID: " << clipId; clipId = clipId.section('_', 0, 0); - for (int i = 0; i < m_clipList.count(); i++) { + for (int i = 0; i < m_clipList.count(); ++i) { if (m_clipList.at(i)->getId() == clipId) { //kDebug() << "++++ CLIP MAN, FOUND FOR CLIP ID: " << clipId; return m_clipList.at(i); @@ -469,7 +469,7 @@ const QList <DocClipBase *> ClipManager::getClipByResource(const QString &resour QList <DocClipBase *> list; QString clipResource; QString proxyResource; - for (int i = 0; i < m_clipList.count(); i++) { + for (int i = 0; i < m_clipList.count(); ++i) { clipResource = m_clipList.at(i)->getProperty("resource"); proxyResource = m_clipList.at(i)->getProperty("proxy"); if (clipResource.isEmpty()) clipResource = m_clipList.at(i)->getProperty("colour"); @@ -483,14 +483,14 @@ const QList <DocClipBase *> ClipManager::getClipByResource(const QString &resour void ClipManager::clearUnusedProducers() { - for (int i = 0; i < m_clipList.count(); i++) { + for (int i = 0; i < m_clipList.count(); ++i) { if (m_clipList.at(i)->numReferences() == 0) m_clipList.at(i)->deleteProducers(); } } void ClipManager::resetProducersList(const QList <Mlt::Producer *> prods, bool displayRatioChanged, bool fpsChanged) { - for (int i = 0; i < m_clipList.count(); i++) { + for (int i = 0; i < m_clipList.count(); ++i) { if (m_clipList.at(i)->numReferences() > 0 || displayRatioChanged || fpsChanged) { m_clipList.at(i)->deleteProducers(); } @@ -498,7 +498,7 @@ void ClipManager::resetProducersList(const QList <Mlt::Producer *> prods, bool d QString id; Mlt::Producer *prod; QStringList brokenClips; - for (int i = 0; i < prods.count(); i++) { + for (int i = 0; i < prods.count(); ++i) { prod = prods.at(i); id = prod->get("id"); if (id.contains('_')) id = id.section('_', 0, 0); @@ -600,7 +600,7 @@ void ClipManager::slotAddClipList(const KUrl::List urls, QMap <QString, QString> prod.setAttribute("type", (int) TEXT); // extract embeded images QDomNodeList items = txtdoc.elementsByTagName("content"); - for (int i = 0; i < items.count() ; i++) { + for (int i = 0; i < items.count() ; ++i) { QDomElement content = items.item(i).toElement(); if (content.hasAttribute("base64")) { QString titlesFolder = m_doc->projectFolder().path(KUrl::AddTrailingSlash) + "titles/"; @@ -813,7 +813,7 @@ QDomElement ClipManager::groupsXml() const QDomDocument doc; QDomElement groups = doc.createElement("groups"); doc.appendChild(groups); - for (int i = 0; i < m_groupsList.count(); i++) { + for (int i = 0; i < m_groupsList.count(); ++i) { QDomElement group = doc.createElement("group"); groups.appendChild(group); QList <QGraphicsItem *> children = m_groupsList.at(i)->childItems(); @@ -843,7 +843,7 @@ void ClipManager::slotClipModified(const QString &path) { //kDebug() << "// CLIP: " << path << " WAS MODIFIED"; const QList <DocClipBase *> list = getClipByResource(path); - for (int i = 0; i < list.count(); i++) { + for (int i = 0; i < list.count(); ++i) { DocClipBase *clip = list.at(i); if (clip != NULL) { QString id = clip->getId(); @@ -875,7 +875,7 @@ void ClipManager::slotClipMissing(const QString &path) { // kDebug() << "// CLIP: " << path << " WAS MISSING"; const QList <DocClipBase *> list = getClipByResource(path); - for (int i = 0; i < list.count(); i++) { + for (int i = 0; i < list.count(); ++i) { DocClipBase *clip = list.at(i); if (clip != NULL) emit missingClip(clip->getId()); } @@ -885,7 +885,7 @@ void ClipManager::slotClipAvailable(const QString &path) { // kDebug() << "// CLIP: " << path << " WAS ADDED"; const QList <DocClipBase *> list = getClipByResource(path); - for (int i = 0; i < list.count(); i++) { + for (int i = 0; i < list.count(); ++i) { DocClipBase *clip = list.at(i); if (clip != NULL) emit availableClip(clip->getId()); } diff --git a/src/clipproperties.cpp b/src/clipproperties.cpp index d2c7647..589f589 100644 --- a/src/clipproperties.cpp +++ b/src/clipproperties.cpp @@ -365,7 +365,7 @@ ClipProperties::ClipProperties(DocClipBase *clip, const Timecode &tc, double fps m_view.animation->setCurrentIndex(0); QString path = props.value("resource"); QString ext = path.section('.', -1); - for (int i = 0; i < m_view.image_type->count(); i++) { + for (int i = 0; i < m_view.image_type->count(); ++i) { if (m_view.image_type->itemData(i).toString() == ext) { m_view.image_type->setCurrentIndex(i); break; @@ -867,7 +867,7 @@ void ClipProperties::slotDeleteMarker() { QList < CommentedTime > marks = m_clip->commentedSnapMarkers(); QList < CommentedTime > toDelete; - for (int i = 0; i < marks.count(); i++) { + for (int i = 0; i < marks.count(); ++i) { if (m_view.markers_list->topLevelItem(i)->isSelected()) { CommentedTime marker = marks.at(i); marker.setMarkerType(-1); diff --git a/src/clipstabilize.cpp b/src/clipstabilize.cpp index 093d935..ba65901 100644 --- a/src/clipstabilize.cpp +++ b/src/clipstabilize.cpp @@ -234,7 +234,7 @@ void ClipStabilize::slotStartStabilize() void ClipStabilize::slotUpdateParams() { - for (int i=0;i<vbox->count();i++){ + for (int i=0;i<vbox->count();++i){ QWidget* w=vbox->itemAt(i)->widget(); QString name=w->objectName(); if (!name.isEmpty() && m_ui_params.contains(name)){ diff --git a/src/cliptranscode.cpp b/src/cliptranscode.cpp index 664eb5f..87797a8 100644 --- a/src/cliptranscode.cpp +++ b/src/cliptranscode.cpp @@ -65,7 +65,7 @@ ClipTranscode::ClipTranscode(const KUrl::List &urls, const QString ¶ms, cons dest_url->setMode(KFile::Directory); dest_url->setUrl(KUrl(m_urls.at(0).directory())); dest_url->fileDialog()->setOperationMode(KFileDialog::Saving); - for (int i = 0; i < m_urls.count(); i++) + for (int i = 0; i < m_urls.count(); ++i) urls_list->addItem(m_urls.at(i).path()); } if (!params.isEmpty()) { @@ -261,7 +261,7 @@ void ClipTranscode::slotTranscodeFinished(int exitCode, QProcess::ExitStatus exi //Refill url list in case user wants to transcode to another format if (urls_list->count() > 0) { m_urls.clear(); - for (int i = 0; i < urls_list->count(); i++) + for (int i = 0; i < urls_list->count(); ++i) m_urls << urls_list->item(i)->text(); } } diff --git a/src/colorcorrection/rgbparadegenerator.cpp b/src/colorcorrection/rgbparadegenerator.cpp index e81cdc4..97ae402 100644 --- a/src/colorcorrection/rgbparadegenerator.cpp +++ b/src/colorcorrection/rgbparadegenerator.cpp @@ -80,7 +80,7 @@ QImage RGBParadeGenerator::calculateRGBParade(const QSize ¶deSize, const QIm const float wPrediv = (float)(partW-1)/(iw-1); StructRGB paradeVals[partW][256]; - for (uint i = 0; i < partW; i++) { + for (uint i = 0; i < partW; ++i) { for (uint j = 0; j < 256; j++) { paradeVals[i][j].r = 0; paradeVals[i][j].g = 0; @@ -121,7 +121,7 @@ QImage RGBParadeGenerator::calculateRGBParade(const QSize ¶deSize, const QIm const uint offset2 = 2*partW + 2*offset; switch(paintMode) { case PaintMode_RGB: - for (uint i = 0; i < partW; i++) { + for (uint i = 0; i < partW; ++i) { for (uint j = 0; j < 256; j++) { unscaled.setPixel(i, j, qRgba(255,10,10, CHOP255(gain*paradeVals[i][j].r))); unscaled.setPixel(i+offset1, j, qRgba(10,255,10, CHOP255(gain*paradeVals[i][j].g))); @@ -130,7 +130,7 @@ QImage RGBParadeGenerator::calculateRGBParade(const QSize ¶deSize, const QIm } break; default: - for (uint i = 0; i < partW; i++) { + for (uint i = 0; i < partW; ++i) { for (uint j = 0; j < 256; j++) { unscaled.setPixel(i, j, qRgba(255,255,255, CHOP255(gain*paradeVals[i][j].r))); unscaled.setPixel(i+offset1, j, qRgba(255,255,255, CHOP255(gain*paradeVals[i][j].g))); @@ -147,7 +147,7 @@ QImage RGBParadeGenerator::calculateRGBParade(const QSize ¶deSize, const QIm if (drawAxis) { QRgb opx; - for (uint i = 0; i <= 10; i++) { + for (uint i = 0; i <= 10; ++i) { dy = (float)i/10 * (partH-1); for (uint x = 0; x < ww-distRight; x++) { opx = parade.pixel(x, dy); diff --git a/src/colorcorrection/waveformgenerator.cpp b/src/colorcorrection/waveformgenerator.cpp index a1d2162..8571023 100644 --- a/src/colorcorrection/waveformgenerator.cpp +++ b/src/colorcorrection/waveformgenerator.cpp @@ -57,7 +57,7 @@ QImage WaveformGenerator::calculateWaveform(const QSize &waveformSize, const QIm const uint byteCount = iw*ih; uint waveValues[waveformSize.width()][waveformSize.height()]; - for (int i = 0; i < waveformSize.width(); i++) { + for (int i = 0; i < waveformSize.width(); ++i) { for (int j = 0; j < waveformSize.height(); j++) { waveValues[i][j] = 0; } @@ -110,7 +110,7 @@ QImage WaveformGenerator::calculateWaveform(const QSize &waveformSize, const QIm switch (paintMode) { case PaintMode_Green: - for (int i = 0; i < waveformSize.width(); i++) { + for (int i = 0; i < waveformSize.width(); ++i) { for (int j = 0; j < waveformSize.height(); j++) { // Logarithmic scale. Needs fine tuning by hand, but looks great. wave.setPixel(i, waveformSize.height()-j-1, qRgba(CHOP255(52*log(0.1*gain*waveValues[i][j])), @@ -121,14 +121,14 @@ QImage WaveformGenerator::calculateWaveform(const QSize &waveformSize, const QIm } break; case PaintMode_Yellow: - for (int i = 0; i < waveformSize.width(); i++) { + for (int i = 0; i < waveformSize.width(); ++i) { for (int j = 0; j < waveformSize.height(); j++) { wave.setPixel(i, waveformSize.height()-j-1, qRgba(255,242,0, CHOP255(gain*waveValues[i][j]))); } } break; default: - for (int i = 0; i < waveformSize.width(); i++) { + for (int i = 0; i < waveformSize.width(); ++i) { for (int j = 0; j < waveformSize.height(); j++) { wave.setPixel(i, waveformSize.height()-j-1, qRgba(255,255,255, CHOP255(2*gain*waveValues[i][j]))); } @@ -141,7 +141,7 @@ QImage WaveformGenerator::calculateWaveform(const QSize &waveformSize, const QIm QRgb opx; davinci.setPen(qRgba(150,255,200,32)); davinci.setCompositionMode(QPainter::CompositionMode_Overlay); - for (uint i = 0; i <= 10; i++) { + for (uint i = 0; i <= 10; ++i) { dy = (float)i/10 * (wh-1); for (uint x = 0; x < ww; x++) { opx = wave.pixel(x, dy); diff --git a/src/commands/moveeffectcommand.cpp b/src/commands/moveeffectcommand.cpp index ba39479..e290ff2 100644 --- a/src/commands/moveeffectcommand.cpp +++ b/src/commands/moveeffectcommand.cpp @@ -30,7 +30,7 @@ MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, con m_oldindex(oldPos), m_pos(pos) { - for (int i = 0; i < m_oldindex.count(); i++) { + for (int i = 0; i < m_oldindex.count(); ++i) { m_newindex << newPos + i; } /* QString effectName; diff --git a/src/cornerswidget.cpp b/src/cornerswidget.cpp index aacebe3..372a6bb 100644 --- a/src/cornerswidget.cpp +++ b/src/cornerswidget.cpp @@ -223,7 +223,7 @@ void CornersWidget::slotInsertKeyframe() QPolygonF pol = m_item->polygon(); double val; - for (int i = 0; i < keyframe_list->columnCount(); i++) { + for (int i = 0; i < keyframe_list->columnCount(); ++i) { if (i < 8) { if (i % 2 == 0) val = pol.at(i / 2).x() / (double)m_monitor->render->frameRenderWidth(); diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index 7cc6220..72f07a9 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -241,7 +241,7 @@ void CustomTrackView::setContextMenu(QMenu *timeline, QMenu *clip, QMenu *transi markermenu->addMenu(m_markerMenu); connect(m_markerMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotGoToMarker(QAction*))); QList <QAction *> list = m_timelineContextClipMenu->actions(); - for (int i = 0; i < list.count(); i++) { + for (int i = 0; i < list.count(); ++i) { if (list.at(i)->data().toString() == "paste_effects") m_pasteEffectsAction = list.at(i); else if (list.at(i)->data().toString() == "ungroup_clip") m_ungroupAction = list.at(i); else if (list.at(i)->data().toString() == "A") m_audioActions.append(list.at(i)); @@ -250,7 +250,7 @@ void CustomTrackView::setContextMenu(QMenu *timeline, QMenu *clip, QMenu *transi m_timelineContextTransitionMenu = transition; list = m_timelineContextTransitionMenu->actions(); - for (int i = 0; i < list.count(); i++) { + for (int i = 0; i < list.count(); ++i) { if (list.at(i)->data().toString() == "auto") { m_autoTransition = list.at(i); break; @@ -298,7 +298,7 @@ void CustomTrackView::updateSceneFrameWidth() int frameWidth = getFrameWidth(); QList<QGraphicsItem *> itemList = items(); ClipItem *item; - for (int i = 0; i < itemList.count(); i++) { + for (int i = 0; i < itemList.count(); ++i) { if (itemList.at(i)->type() == AVWIDGET) { item = (ClipItem*) itemList.at(i); item->resetFrameWidth(frameWidth); @@ -318,7 +318,7 @@ bool CustomTrackView::checkTrackHeight() int frameWidth = getFrameWidth(); bool snap = KdenliveSettings::snaptopoints(); KdenliveSettings::setSnaptopoints(false); - for (int i = 0; i < itemList.count(); i++) { + for (int i = 0; i < itemList.count(); ++i) { if (itemList.at(i)->type() == AVWIDGET) { item = (ClipItem*) itemList.at(i); item->setRect(0, 0, item->rect().width(), m_tracksHeight - 1); @@ -333,7 +333,7 @@ bool CustomTrackView::checkTrackHeight() } double newHeight = m_tracksHeight * m_document->tracksCount() * matrix().m22(); m_cursorLine->setLine(0, 0, 0, newHeight - 1); - for (int i = 0; i < m_guides.count(); i++) { + for (int i = 0; i < m_guides.count(); ++i) { m_guides.at(i)->setLine(0, 0, 0, newHeight - 1); } @@ -519,7 +519,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) QPainterPath shape = m_selectionGroup->clipGroupSpacerShape(QPointF(snappedPos - m_selectionGroup->sceneBoundingRect().left(), 0)); QList<QGraphicsItem*> collidingItems = scene()->items(shape, Qt::IntersectsItemShape); collidingItems.removeAll(m_selectionGroup); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == GROUPWIDGET) { QList<QGraphicsItem *> subchildren = children.at(i)->childItems(); for (int j = 0; j < subchildren.count(); j++) @@ -529,7 +529,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) } bool collision = false; int offset = 0; - for (int i = 0; i < collidingItems.count(); i++) { + for (int i = 0; i < collidingItems.count(); ++i) { if (!collidingItems.at(i)->isEnabled()) continue; if (collidingItems.at(i)->type() == AVWIDGET && snappedPos < m_selectionGroup->sceneBoundingRect().left()) { AbstractClipItem *item = static_cast <AbstractClipItem *>(collidingItems.at(i)); @@ -545,7 +545,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) shape = m_selectionGroup->clipGroupSpacerShape(QPointF(snappedPos - m_selectionGroup->sceneBoundingRect().left(), 0)); collidingItems = scene()->items(shape, Qt::IntersectsItemShape); collidingItems.removeAll(m_selectionGroup); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == GROUPWIDGET) { QList<QGraphicsItem *> subchildren = children.at(i)->childItems(); for (int j = 0; j < subchildren.count(); j++) @@ -554,7 +554,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) collidingItems.removeAll(children.at(i)); } - for (int i = 0; i < collidingItems.count(); i++) { + for (int i = 0; i < collidingItems.count(); ++i) { if (!collidingItems.at(i)->isEnabled()) continue; if (collidingItems.at(i)->type() == AVWIDGET) { collision = true; @@ -568,7 +568,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) shape = m_selectionGroup->transitionGroupShape(QPointF(snappedPos - m_selectionGroup->sceneBoundingRect().left(), 0)); collidingItems = scene()->items(shape, Qt::IntersectsItemShape); collidingItems.removeAll(m_selectionGroup); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == GROUPWIDGET) { QList<QGraphicsItem *> subchildren = children.at(i)->childItems(); for (int j = 0; j < subchildren.count(); j++) @@ -578,7 +578,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) } offset = 0; - for (int i = 0; i < collidingItems.count(); i++) { + for (int i = 0; i < collidingItems.count(); ++i) { if (collidingItems.at(i)->type() == TRANSITIONWIDGET && snappedPos < m_selectionGroup->sceneBoundingRect().left()) { AbstractClipItem *item = static_cast <AbstractClipItem *>(collidingItems.at(i)); // Moving backward, determine best pos @@ -594,7 +594,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) shape = m_selectionGroup->transitionGroupShape(QPointF(snappedPos - m_selectionGroup->sceneBoundingRect().left(), 0)); collidingItems = scene()->items(shape, Qt::IntersectsItemShape); collidingItems.removeAll(m_selectionGroup); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == GROUPWIDGET) { QList<QGraphicsItem *> subchildren = children.at(i)->childItems(); for (int j = 0; j < subchildren.count(); j++) @@ -602,7 +602,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) } collidingItems.removeAll(children.at(i)); } - for (int i = 0; i < collidingItems.count(); i++) { + for (int i = 0; i < collidingItems.count(); ++i) { if (collidingItems.at(i)->type() == TRANSITIONWIDGET) { collision = true; break; @@ -629,7 +629,7 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event) if (itemList.count() == 1 && itemList.at(0)->type() == GUIDEITEM) { opMode = MOVEGUIDE; setCursor(Qt::SplitHCursor); - } else for (int i = 0; i < itemList.count(); i++) { + } else for (int i = 0; i < itemList.count(); ++i) { if (itemList.at(i)->type() == AVWIDGET || itemList.at(i)->type() == TRANSITIONWIDGET) { item = (QGraphicsRectItem*) itemList.at(i); break; @@ -845,7 +845,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) m_dragItem = collisionClip; } found = true; - for (int i = 0; i < m_document->tracksCount(); i++) { + for (int i = 0; i < m_document->tracksCount(); ++i) { if (m_document->trackInfoAt(i).isLocked) lockedTracks << QString::number(m_document->tracksCount() - i - 1); } yOffset = mapToScene(m_clickEvent).y() - m_dragItem->scenePos().y(); @@ -907,7 +907,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) if (!m_dragItem && !m_dragGuide) { // check if there is a guide close to mouse click QList<QGraphicsItem *> guidesCollisionList = items(event->pos().x() - 5, event->pos().y(), 10, 2); // a rect of height < 2 does not always collide with the guide - for (int i = 0; i < guidesCollisionList.count(); i++) { + for (int i = 0; i < guidesCollisionList.count(); ++i) { if (guidesCollisionList.at(i)->type() == GUIDEITEM) { m_dragGuide = static_cast <Guide *>(guidesCollisionList.at(i)); break; @@ -970,7 +970,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) m_selectionGroup = new AbstractGroupItem(m_document->fps()); scene()->addItem(m_selectionGroup); - for (int i = 0; i < selection.count(); i++) { + for (int i = 0; i < selection.count(); ++i) { if (selection.at(i)->parentItem() == 0 && (selection.at(i)->type() == AVWIDGET || selection.at(i)->type() == TRANSITIONWIDGET)) { AbstractClipItem *item = static_cast<AbstractClipItem *>(selection.at(i)); if (item->isItemLocked()) continue; @@ -1071,7 +1071,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) if (dragGroup) { dragGroup->setSelected(selected); QList<QGraphicsItem *> children = dragGroup->childItems(); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { children.at(i)->setSelected(selected); } if (dragGroup->parentItem()) { @@ -1102,7 +1102,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) m_selectionMutex.lock(); if (m_selectionGroup) { QList<QGraphicsItem *> children = m_selectionGroup->childItems(); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { children.at(i)->setSelected(itemSelected); } m_selectionGroup->setSelected(itemSelected); @@ -1153,7 +1153,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) m_selectionMutex.lock(); QList <GenTime> offsetList; QList<QGraphicsItem *> children = m_selectionGroup->childItems(); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == AVWIDGET || children.at(i)->type() == TRANSITIONWIDGET) { AbstractClipItem *item = static_cast <AbstractClipItem *>(children.at(i)); offsetList.append(item->startPos()); @@ -1203,7 +1203,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) QRectF r(info.startPos.frames(m_document->fps()), startY, (info.endPos - info.startPos).frames(m_document->fps()), m_tracksHeight / 2); QList<QGraphicsItem *> selection = m_scene->items(r); bool transitionAccepted = true; - for (int i = 0; i < selection.count(); i++) { + for (int i = 0; i < selection.count(); ++i) { if (selection.at(i)->type() == TRANSITIONWIDGET) { Transition *tr = static_cast <Transition *>(selection.at(i)); if (tr->startPos() - info.startPos > GenTime(5, m_document->fps())) { @@ -1236,7 +1236,7 @@ void CustomTrackView::mousePressEvent(QMouseEvent * event) QRectF r(info.startPos.frames(m_document->fps()), startY, (info.endPos - info.startPos).frames(m_document->fps()), m_tracksHeight / 2); QList<QGraphicsItem *> selection = m_scene->items(r); bool transitionAccepted = true; - for (int i = 0; i < selection.count(); i++) { + for (int i = 0; i < selection.count(); ++i) { if (selection.at(i)->type() == TRANSITIONWIDGET) { Transition *tr = static_cast <Transition *>(selection.at(i)); if (info.endPos - tr->endPos() > GenTime(5, m_document->fps())) { @@ -1259,7 +1259,7 @@ void CustomTrackView::rebuildGroup(int childTrack, GenTime childPos) const QPointF p((int)childPos.frames(m_document->fps()), childTrack * m_tracksHeight + m_tracksHeight / 2); QList<QGraphicsItem *> list = scene()->items(p); AbstractGroupItem *group = NULL; - for (int i = 0; i < list.size(); i++) { + for (int i = 0; i < list.size(); ++i) { if (!list.at(i)->isEnabled()) continue; if (list.at(i)->type() == GROUPWIDGET) { group = static_cast <AbstractGroupItem *>(list.at(i)); @@ -1276,7 +1276,7 @@ void CustomTrackView::rebuildGroup(AbstractGroupItem *group) if (group == m_selectionGroup) m_selectionGroup = NULL; QList <QGraphicsItem *> children = group->childItems(); m_document->clipManager()->removeGroup(group); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { group->removeFromGroup(children.at(i)); } scene()->destroyItemGroup(group); @@ -1296,7 +1296,7 @@ void CustomTrackView::resetSelectionGroup(bool selectItems) QList<QGraphicsItem *> children = m_selectionGroup->childItems(); scene()->destroyItemGroup(m_selectionGroup); m_selectionGroup = NULL; - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->parentItem() == 0) { if ((children.at(i)->type() == AVWIDGET || children.at(i)->type() == TRANSITIONWIDGET)) { if (!static_cast <AbstractClipItem *>(children.at(i))->isItemLocked()) { @@ -1325,7 +1325,7 @@ void CustomTrackView::groupSelectedItems(QList <QGraphicsItem *> selection, bool QSet <QGraphicsItemGroup *> groupsList; QSet <QGraphicsItem *> itemsList; - for (int i = 0; i < selection.count(); i++) { + for (int i = 0; i < selection.count(); ++i) { if (selectNewGroup) selection.at(i)->setSelected(true); if (selection.at(i)->type() == GROUPWIDGET) { AbstractGroupItem *it = static_cast <AbstractGroupItem *> (selection.at(i)); @@ -1336,7 +1336,7 @@ void CustomTrackView::groupSelectedItems(QList <QGraphicsItem *> selection, bool groupsList.insert(it); } } - for (int i = 0; i < selection.count(); i++) { + for (int i = 0; i < selection.count(); ++i) { if (selection.at(i)->type() == AVWIDGET || selection.at(i)->type() == TRANSITIONWIDGET) { if (selection.at(i)->parentItem() && selection.at(i)->parentItem()->type() == GROUPWIDGET) { AbstractGroupItem *it = static_cast <AbstractGroupItem *> (selection.at(i)->parentItem()); @@ -1386,7 +1386,7 @@ void CustomTrackView::groupSelectedItems(QList <QGraphicsItem *> selection, bool foreach (QGraphicsItemGroup *value, groupsList) { QList<QGraphicsItem *> children = value->childItems(); - for (int i = 0; i < children.count(); i++) { + for (int i = 0; i < children.count(); ++i) { if (children.at(i)->type() == AVWIDGET || children.at(i)->type() == TRANSITIONWIDGET) itemsList.insert(children.at(i)); } @@ -1606,7 +1606,7 @@ void CustomTrackView::displayContextMenu(QPoint pos, AbstractClipItem *clip, Abs QList <CommentedTime> markers = item->baseClip()->commentedSnapMarkers(); int offset = (item->startPos()- item->cropStart()).frames(m_document->fps()); if (!markers.isEmpty()) { - for (int i = 0; i < markers.count(); i++) { + for (int i = 0; i < markers.count(); ++i) { int pos = (int) markers.at(i).time().frames(m_document->timecode().fps()); QString position = m_document->timecode().getTimecode(markers.at(i).time()) + ' ' + markers.at(i).comment(); QAction *go = m_markerMenu->addAction(position); @@ -1721,7 +1721,7 @@ bool CustomTrackView::insertDropClips(const QMimeData *data, const QPoint &pos) offsetList.append(info.endPos); updateSnapPoints(NULL, offsetList); QStringList lockedTracks; - for (int i = 0; i < m_document->tracksCount(); i++) { + for (int i = 0; i < m_document->tracksCount(); ++i) { if (m_document->trackInfoAt(i).isLocked) lockedTracks << QString::number(m_document->tracksCount() - i - 1); } m_selectionGroup->setProperty("locked_tracks", lockedTracks); @@ -1800,7 +1800,7 @@ bool CustomTrackView::insertDropClips(const QMimeData *data, const QPoint &pos) updateSnapPoints(NULL, offsetList); QStringList lockedTracks; - for (int i = 0; i < m_document->tracksCount(); i++) { + for (int i = 0; i < m_document->tracksCount(); ++i) { if (m_document->trackInfoAt(i).isLocked) lockedTracks << QString::number(m_document->tracksCount() - i - 1); } @@ -1842,7 +1842,7 @@ bool CustomTrackView::itemCollision(AbstractClipItem *item, ItemInfo newPos) collindingItems.removeAll(item); if (collindingItems.isEmpty()) return false; else { - for (int i = 0; i < collindingItems.count(); i++) { + for (int i = 0; i < collindingItems.count(); ++i) { QGraphicsItem *collision = collindingItems.at(i); if (collision->type() == item->type()) { // Collision @@ -1863,7 +1863,7 @@ void CustomTrackView::slotRefreshEffects(ClipItem *clip) return; } ... [truncated message content] |