Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.2
-
None
-
Self compiled (from git tag) on Linux 64 bit + gcc 441
-
1b326932d48c0e584f9d5173fa5f892c5086fee8
Description
The code;
QTextDocument doc;
QTextBlock block = doc.begin();
QTextBlock nextBlock = block.next(); // note this one is invalid!
QTextBlock lastValid one = nextBlock.previous();
qDebug() << lastValid.isValid();
QTextBlock last = doc.end().previous();
qDebug() << last.isValid();
behaves differently between 4.7.2 and earlier versions.
It looks like using a QTextBlock as an interator is no longer possible due to this change and I think thats a consistency bug. I expect that much like a QList<T>::Iterator the 'entry-after-last' to be possible to go back one and get a valid entry again.