Commit 35eb3b15 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Diff Editor: Fix compilation with Qt < 5.2.



Change-Id: I95401ed010e41341eb25bba032b924765b2c1be5
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent afd7e760
......@@ -309,9 +309,11 @@ void addChangedPositions(int positionOffset, const QMap<int, int> &originalChang
const int endPos = it.value();
const int newStartPos = startPos < 0 ? -1 : startPos + positionOffset;
const int newEndPos = endPos < 0 ? -1 : endPos + positionOffset;
if (startPos < 0 && !changedPositions->isEmpty())
changedPositions->insert(changedPositions->lastKey(), newEndPos);
else
if (startPos < 0 && !changedPositions->isEmpty()) {
QMap<int, int>::iterator last = changedPositions->end();
--last;
last.value() = newEndPos;
} else
changedPositions->insert(newStartPos, newEndPos);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment