CleanUp usage of QtAlgorithms

Change-Id: I61be20554014f90c2e1313167a3e3c869e26c35e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Nikita Baryshnikov
2014-06-16 21:34:13 +04:00
committed by hjk
parent 453bb4ebe5
commit 84e176edab
12 changed files with 25 additions and 46 deletions

View File

@@ -72,7 +72,6 @@
#include <QRegExp>
#include <QTextStream>
#include <QTimer>
#include <QtAlgorithms>
#include <QStack>
#include <QApplication>
@@ -6417,7 +6416,7 @@ void FakeVimHandler::Private::indentText(const Range &range, QChar typedChar)
int beginBlock = document()->findBlock(range.beginPos).blockNumber();
int endBlock = document()->findBlock(range.endPos).blockNumber();
if (beginBlock > endBlock)
qSwap(beginBlock, endBlock);
std::swap(beginBlock, endBlock);
// Don't remember current indentation in last text insertion.
const QString lastInsertion = m_buffer->lastInsertion;
@@ -6438,7 +6437,7 @@ void FakeVimHandler::Private::shiftRegionRight(int repeat)
int endLine = lineForPosition(position());
int targetPos = anchor();
if (beginLine > endLine) {
qSwap(beginLine, endLine);
std::swap(beginLine, endLine);
targetPos = position();
}
if (hasConfig(ConfigStartOfLine))