Fix compilation with Qt5.8dev

(cherry picked from commit 6d375ddeac)
This commit is contained in:
Guillaume Munch 2016-12-20 00:15:58 +01:00
parent 857548d33b
commit 9f2fcf20a5
2 changed files with 5 additions and 8 deletions

View File

@ -223,14 +223,9 @@ void ViewSourceWidget::realUpdateView()
if (changed && !texrow_.get()) {
// position-to-row is unavailable
// we jump to the first modification
const QChar * oc = old.constData();
const QChar * nc = qcontent.constData();
int length = min(old.length(), qcontent.length());
int pos = 0;
while (*oc != '\0' && *nc != '\0' && *oc == *nc) {
++oc;
++nc;
++pos;
}
for (; pos < length && old.at(pos) == qcontent.at(pos); ++pos) {}
QTextCursor c = QTextCursor(viewSourceTV->document());
//get some space below the cursor
c.setPosition(pos);

View File

@ -247,4 +247,6 @@ What's new
- Update boost source to 1.62.
- fix compiler warnings from clang 3.9 and gcc 6.
- Fix compiler warnings from clang 3.9 and gcc 6.
- Fix compilation with Qt 5.8.