diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-03-11 17:23:55 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-03-11 17:31:07 +0100 |
commit | 056e8aa4c257b862343dc095bc1d14b45e5fe878 (patch) | |
tree | 2819b612ca91142f7e16493c93c733ca861290d7 /src/plugins/texteditor/refactoringchanges.cpp | |
parent | 28413a81538836a0957206f3ce7fdcdf483f0b67 (diff) | |
download | qt-creator-056e8aa4c257b862343dc095bc1d14b45e5fe878.tar.gz |
Fix some Krazy warnings about non-const ref iterator.
Change-Id: I1c78f5f5a7174002cd25bea109d5fe795530cdb5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Diffstat (limited to 'src/plugins/texteditor/refactoringchanges.cpp')
-rw-r--r-- | src/plugins/texteditor/refactoringchanges.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/texteditor/refactoringchanges.cpp b/src/plugins/texteditor/refactoringchanges.cpp index 00054b99e7..db870ee0e1 100644 --- a/src/plugins/texteditor/refactoringchanges.cpp +++ b/src/plugins/texteditor/refactoringchanges.cpp @@ -382,8 +382,9 @@ void RefactoringFile::indentOrReindent(void (RefactoringChangesData::*mf)(const const BaseTextEditorWidget *) const, const QList<QPair<QTextCursor, QTextCursor> > &ranges) { - QPair<QTextCursor, QTextCursor> p; - foreach (p, ranges) { + typedef QPair<QTextCursor, QTextCursor> CursorPair; + + foreach (const CursorPair &p, ranges) { QTextCursor selection(p.first.document()); selection.setPosition(p.first.position()); selection.setPosition(p.second.position(), QTextCursor::KeepAnchor); |