Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
+28
-27
@@ -1,4 +1,5 @@
|
||||
#include "track_content_widget.h"
|
||||
#include <utility>
|
||||
#include "track_entry.h"
|
||||
#include "tools.h"
|
||||
#include "track_entry_painters.h"
|
||||
@@ -170,7 +171,7 @@ bool TrackContentWidget::checkForCollisions(const TrackContentWidget *tcw, const
|
||||
{
|
||||
|
||||
const QVector<TrackEntry *> &selectedEntries = tcw->getSelectedEntries();
|
||||
for (TrackEntry *te : qAsConst(trackEntries))
|
||||
for (TrackEntry *te : std::as_const(trackEntries))
|
||||
{
|
||||
if (!selectedEntries.contains(te))
|
||||
vecEntriesToCheck.append(te);
|
||||
@@ -192,7 +193,7 @@ bool TrackContentWidget::checkForCollisions(const TrackContentWidget *tcw, const
|
||||
int startOffset_s = dropTime_s - startTimeMostLeft_s;
|
||||
|
||||
|
||||
for (TrackEntry *previewEntry : qAsConst(_preview))
|
||||
for (TrackEntry *previewEntry : std::as_const(_preview))
|
||||
{
|
||||
int startPreview_s = previewEntry->m_startTime + startOffset_s;
|
||||
|
||||
@@ -204,7 +205,7 @@ bool TrackContentWidget::checkForCollisions(const TrackContentWidget *tcw, const
|
||||
|
||||
int endPreview_s = startPreview_s + previewEntry->m_length;
|
||||
|
||||
for (const TrackEntry *checkTe : qAsConst(vecEntriesToCheck))
|
||||
for (const TrackEntry *checkTe : std::as_const(vecEntriesToCheck))
|
||||
{
|
||||
if (checkTe->m_topicId == previewEntry->m_topicId && !ignoreSelfCheck)
|
||||
{
|
||||
@@ -300,7 +301,7 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
|
||||
|
||||
|
||||
for (TrackEntry *previewEntry : qAsConst(previewCopy))
|
||||
for (TrackEntry *previewEntry : std::as_const(previewCopy))
|
||||
{
|
||||
|
||||
|
||||
@@ -311,7 +312,7 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
|
||||
|
||||
|
||||
for (TrackEntry *pTrackEntry : qAsConst(vecTrackEntries))
|
||||
for (TrackEntry *pTrackEntry : std::as_const(vecTrackEntries))
|
||||
{
|
||||
|
||||
|
||||
@@ -443,7 +444,7 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
|
||||
QVector<TrackEntryType> correspondingDifferentTopicTypes;
|
||||
|
||||
for (TrackEntry *previewEntry : qAsConst(previewCopy))
|
||||
for (TrackEntry *previewEntry : std::as_const(previewCopy))
|
||||
{
|
||||
correspondingDifferentTopicTypes.clear();
|
||||
|
||||
@@ -454,7 +455,7 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
startOffset_s -= startTimeMostLeft_s;
|
||||
|
||||
|
||||
for (const QPair<TrackEntryType, TrackEntryType> &pair : qAsConst(differentParallelForbidden))
|
||||
for (const QPair<TrackEntryType, TrackEntryType> &pair : std::as_const(differentParallelForbidden))
|
||||
{
|
||||
if (pair.first == previewEntry->m_type)
|
||||
correspondingDifferentTopicTypes += pair.second;
|
||||
@@ -468,11 +469,11 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
if (correspondingDifferentTopicTypes.isEmpty())
|
||||
continue;
|
||||
|
||||
for (const TrackEntryType correspondingDifferentTopicType : qAsConst(correspondingDifferentTopicTypes))
|
||||
for (const TrackEntryType correspondingDifferentTopicType : std::as_const(correspondingDifferentTopicTypes))
|
||||
{
|
||||
|
||||
|
||||
for (TrackEntry *pTrackEntry : qAsConst(vecTrackEntries))
|
||||
for (TrackEntry *pTrackEntry : std::as_const(vecTrackEntries))
|
||||
{
|
||||
|
||||
|
||||
@@ -769,7 +770,7 @@ void TrackContentWidget::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
int firstTeTime = -1;
|
||||
|
||||
for (const TrackEntry *te : qAsConst(m_preview))
|
||||
for (const TrackEntry *te : std::as_const(m_preview))
|
||||
{
|
||||
if (firstTeTime > te->m_startTime || firstTeTime == -1)
|
||||
firstTeTime = te->m_startTime;
|
||||
@@ -863,7 +864,7 @@ void TrackContentWidget::selectAll()
|
||||
{
|
||||
m_selected.clear();
|
||||
|
||||
for (TrackEntry *te : qAsConst(m_entryList))
|
||||
for (TrackEntry *te : std::as_const(m_entryList))
|
||||
{
|
||||
m_selected.append(te);
|
||||
m_mainSelected = te;
|
||||
@@ -1035,7 +1036,7 @@ bool TrackContentWidget::canMoveAll(int offset) const
|
||||
checkForCollisions(this, m_selected, newTime, cols, true);
|
||||
|
||||
QVector<TrackEntry *> parls;
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
checkForParallelTopics(tcw, m_selected, newTime, parls);
|
||||
|
||||
if (!cols.isEmpty() || !parls.isEmpty())
|
||||
@@ -1168,7 +1169,7 @@ void TrackContentWidget::selectEntriesAtPositions(int fromPos, int toPos)
|
||||
{
|
||||
m_unselectAllImmune = true;
|
||||
|
||||
for (TrackEntry *te : qAsConst(m_entryList))
|
||||
for (TrackEntry *te : std::as_const(m_entryList))
|
||||
{
|
||||
int start = m_tools->getPos(te->m_startTime);
|
||||
int end = m_tools->getPos(te->m_startTime + te->m_length);
|
||||
@@ -1215,7 +1216,7 @@ bool TrackContentWidget::canPasteTopics(const QVector<TrackEntry *> &topics, int
|
||||
TemporaryPointerVector<TrackEntry *> newTes;
|
||||
|
||||
newTes.reserve(topics.size());
|
||||
for (TrackEntry *te : qAsConst(topics))
|
||||
for (TrackEntry *te : std::as_const(topics))
|
||||
{
|
||||
TrackEntry *newTe = new TrackEntry(te);
|
||||
newTe->m_startTime = (newTe->m_startTime - offsetTime + pasteTime);
|
||||
@@ -1228,7 +1229,7 @@ bool TrackContentWidget::canPasteTopics(const QVector<TrackEntry *> &topics, int
|
||||
|
||||
bool parl = false;
|
||||
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
{
|
||||
parl = checkForParallelTopics(tcw, newTes, pasteTime, true );
|
||||
if (parl)
|
||||
@@ -1252,7 +1253,7 @@ void TrackContentWidget::forcePasteTopics(const QVector<TrackEntry *> &topics, i
|
||||
m_selected.clear();
|
||||
|
||||
|
||||
for (TrackEntry *te : qAsConst(topics))
|
||||
for (TrackEntry *te : std::as_const(topics))
|
||||
{
|
||||
TrackEntry *newTe = new TrackEntry(te);
|
||||
newTe->m_topicId = m_scriptTimeline->nextUniqueId();
|
||||
@@ -1345,7 +1346,7 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
if (tes.isEmpty())
|
||||
return false;
|
||||
|
||||
for (TrackEntry *te : qAsConst(tes))
|
||||
for (TrackEntry *te : std::as_const(tes))
|
||||
{
|
||||
if (!allowedByType(te))
|
||||
{
|
||||
@@ -1370,11 +1371,11 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
|
||||
if (m_isMultiLineMultiSelectionMode)
|
||||
{
|
||||
for (TrackEntry *te : qAsConst(tes))
|
||||
for (TrackEntry *te : std::as_const(tes))
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
for (TrackEntry *thisTe : qAsConst(thisTes))
|
||||
for (TrackEntry *thisTe : std::as_const(thisTes))
|
||||
{
|
||||
if (thisTe->m_topicId == te->m_topicId)
|
||||
{
|
||||
@@ -1397,7 +1398,7 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
TrackEntry *pPreview = tes.front();
|
||||
bool hasJustBeenAddedByUser = true;
|
||||
|
||||
for (auto pTE : qAsConst(m_entryList))
|
||||
for (auto pTE : std::as_const(m_entryList))
|
||||
{
|
||||
if (pPreview->m_topicId == pTE->m_topicId)
|
||||
{
|
||||
@@ -1407,9 +1408,9 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
}
|
||||
|
||||
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
{
|
||||
for (auto pTE : qAsConst(tcw->m_entryList))
|
||||
for (auto pTE : std::as_const(tcw->m_entryList))
|
||||
{
|
||||
if (pPreview->m_topicId == pTE->m_topicId)
|
||||
{
|
||||
@@ -1424,7 +1425,7 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
|
||||
m_selected.clear();
|
||||
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
tcw->m_selected.clear();
|
||||
}
|
||||
}
|
||||
@@ -1472,7 +1473,7 @@ bool TrackContentWidget::dragDrop(int pos)
|
||||
|
||||
int firstTeTime = -1;
|
||||
|
||||
for (const TrackEntry *te : qAsConst(m_preview))
|
||||
for (const TrackEntry *te : std::as_const(m_preview))
|
||||
{
|
||||
if (firstTeTime > te->m_startTime || firstTeTime == -1)
|
||||
firstTeTime = te->m_startTime;
|
||||
@@ -1509,7 +1510,7 @@ bool TrackContentWidget::dragDrop(int pos)
|
||||
update();
|
||||
|
||||
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
tcw->removeTrackEntryByTopicId(prevTe);
|
||||
|
||||
m_unselectAllImmune = false;
|
||||
@@ -1520,7 +1521,7 @@ bool TrackContentWidget::dragDrop(int pos)
|
||||
if (m_isMultiLineMultiSelectionMode)
|
||||
{
|
||||
|
||||
for (TrackEntry *oldSel : qAsConst(selectedOld))
|
||||
for (TrackEntry *oldSel : std::as_const(selectedOld))
|
||||
emit signalTrackEntryDeleted(oldSel->m_topicId);
|
||||
qDeleteAll(selectedOld);
|
||||
|
||||
@@ -1540,7 +1541,7 @@ bool TrackContentWidget::dragMove(int pos)
|
||||
checkForCollisions(this, m_preview, dropTime_s, m_dragHandler->m_vecCollisions, true);
|
||||
|
||||
m_dragHandler->m_vecParallel.clear();
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
checkForParallelTopics(tcw, m_preview, dropTime_s, m_dragHandler->m_vecParallel);
|
||||
|
||||
m_moveValid = m_dragHandler->m_vecCollisions.isEmpty() && m_dragHandler->m_vecParallel.isEmpty();
|
||||
|
||||
Reference in new issue
Block a user