forked from qt-creator/qt-creator
Compile fix with recent Qt dev
The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.
Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -321,7 +321,6 @@ private:
|
||||
QString m_fileName;
|
||||
};
|
||||
using Marks = QHash<QChar, Mark>;
|
||||
using MarksIterator = QHashIterator<QChar, Mark>;
|
||||
|
||||
struct State
|
||||
{
|
||||
@@ -3605,8 +3604,7 @@ void FakeVimHandler::Private::updateSelection()
|
||||
{
|
||||
QList<QTextEdit::ExtraSelection> selections = m_extraSelections;
|
||||
if (hasConfig(ConfigShowMarks)) {
|
||||
for (MarksIterator it(m_buffer->marks); it.hasNext(); ) {
|
||||
it.next();
|
||||
for (auto it = m_buffer->marks.cbegin(), end = m_buffer->marks.cend(); it != end; ++it) {
|
||||
QTextEdit::ExtraSelection sel;
|
||||
sel.cursor = m_cursor;
|
||||
setCursorPosition(&sel.cursor, it.value().position(document()));
|
||||
@@ -5724,9 +5722,7 @@ bool FakeVimHandler::Private::handleExRegisterCommand(const ExCommand &cmd)
|
||||
QByteArray regs = cmd.args.toLatin1();
|
||||
if (regs.isEmpty()) {
|
||||
regs = "\"0123456789";
|
||||
QHashIterator<int, Register> it(g.registers);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
for (auto it = g.registers.cbegin(), end = g.registers.cend(); it != end; ++it) {
|
||||
if (it.key() > '9')
|
||||
regs += char(it.key());
|
||||
}
|
||||
@@ -8535,10 +8531,8 @@ bool FakeVimHandler::Private::jumpToMark(QChar mark, bool backTickMode)
|
||||
|
||||
void FakeVimHandler::Private::updateMarks(const Marks &newMarks)
|
||||
{
|
||||
for (MarksIterator it(newMarks); it.hasNext(); ) {
|
||||
it.next();
|
||||
for (auto it = newMarks.cbegin(), end = newMarks.cend(); it != end; ++it)
|
||||
m_buffer->marks[it.key()] = it.value();
|
||||
}
|
||||
}
|
||||
|
||||
RangeMode FakeVimHandler::Private::registerRangeMode(int reg) const
|
||||
|
||||
Reference in New Issue
Block a user