forked from qt-creator/qt-creator
Don't mix iterator and const_iterator
This avoids unnecessary detaches of the Qt container data.
The mismatches where detected by defining QT_STRICT_ITERATORS;
however, this define violates the ODR (causing linker errors),
and therefore is not added permanently.
Change-Id: Idd336a9c8b394214a820437ef1b92d2101f6101c
GPush-Base: 62b0848b9c
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -3271,7 +3271,7 @@ void TextEditorWidgetPrivate::insertIntoBlockSelection(const QString &text)
|
||||
const QStringList::const_iterator endLine = textLines.constEnd();
|
||||
for (QStringList::const_iterator textLine = textLines.constBegin(); textLine != endLine; ++textLine)
|
||||
textLength += qMax(0, ts.columnCountForText(*textLine, column) - textLength);
|
||||
for (QStringList::iterator textLine = textLines.begin(); textLine != endLine; ++textLine)
|
||||
for (QStringList::iterator textLine = textLines.begin(); textLine != textLines.end(); ++textLine)
|
||||
textLine->append(QString(qMax(0, textLength - ts.columnCountForText(*textLine, column)), QLatin1Char(' ')));
|
||||
|
||||
// insert Text
|
||||
|
||||
Reference in New Issue
Block a user