Skip to content

Commit

Permalink
logging tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosFdez committed Mar 1, 2017
1 parent 27df869 commit 45bb3c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ void MainWindow::syncRangesToText()
QString second = millisecondsToTimestamp(range.second, false);
newText += first + "," + second + "\n";
}
qDebug() << newText;
ui->rangeInput->setPlainText(newText);
}

Expand Down
10 changes: 5 additions & 5 deletions src/rangecontainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void RangeContainer::splitAt(qint64 position)

if (beforeIdx < 0)
{
qDebug() << "adding range to fill starting gap";
qDebug() << "split: adding range to fill starting gap";

// we are on an empty space before any ranges, fill in the start
// since it is not empty, we are guaranteed an after
Expand All @@ -78,22 +78,22 @@ void RangeContainer::splitAt(qint64 position)
}
else if (afterIdx < 0)
{
qDebug() << "adding range to fill final gap";
qDebug() << "split: adding range to fill final gap";

// we are on an empty space after all ranges, fill in the end
int lastRangeEnd = ranges[beforeIdx].second;
ranges.insert(ranges.begin(), pair<qint64, qint64>(lastRangeEnd, videoLength));
}
else if (ranges[beforeIdx].first == position || ranges[beforeIdx].second == position)
{
qDebug() << "skipping due to being on a border";
qDebug() << "split: skipping due to being on a border";

// if on an edge of a range, do nothing
return;
}
else if (position > ranges[beforeIdx].first && position < ranges[beforeIdx].second)
{
qDebug() << "splitting an existing range";
qDebug() << "split: splitting an existing range";

// if inside a range, split down the middle.
pair<qint64, qint64> newRange(position, ranges[beforeIdx].second);
Expand All @@ -102,7 +102,7 @@ void RangeContainer::splitAt(qint64 position)
}
else
{
qDebug() << "Adding range to fill gap between ranges";
qDebug() << "split: adding range to fill gap between ranges";

// inside a gap between ranges
qint64 startPosition = ranges[beforeIdx].second;
Expand Down

0 comments on commit 45bb3c7

Please sign in to comment.