From 97e84865b8415e77d265c894798ed2333a056682 Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Fri, 12 Aug 2011 20:22:30 +0200 Subject: Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)' Merge-request: 1299 Reviewed-by: Oswald Buddenhagen (cherry picked from commit 81f0c44f6a4fd4cfa41af5d5b292008185bf3981) Conflicts: demos/gradients/gradients.cpp qmake/generators/makefiledeps.cpp src/corelib/io/qdir.cpp src/gui/painting/qpaintengine_raster.cpp src/gui/painting/qpaintengine_x11.cpp src/gui/painting/qtessellator.cpp src/gui/widgets/qtabbar.cpp src/qt3support/itemviews/q3listbox.cpp src/qt3support/sql/q3datatable.cpp src/qt3support/text/q3richtext.cpp src/sql/kernel/qsqlresult.cpp src/tools/moc/moc.cpp Change-Id: I9076808dcae1f8392192da1360dd18df68a9f77a Reviewed-on: http://codereview.qt-project.org/4595 Reviewed-by: Qt Sanity Bot Reviewed-by: Oswald Buddenhagen --- src/scripttools/debugging/qscriptdebuggercodeview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scripttools/debugging/qscriptdebuggercodeview.cpp') diff --git a/src/scripttools/debugging/qscriptdebuggercodeview.cpp b/src/scripttools/debugging/qscriptdebuggercodeview.cpp index 7c99723..65fd366 100644 --- a/src/scripttools/debugging/qscriptdebuggercodeview.cpp +++ b/src/scripttools/debugging/qscriptdebuggercodeview.cpp @@ -233,7 +233,7 @@ bool QScriptDebuggerCodeView::event(QEvent *e) return false; } int pos2 = linePosition - 1; - while ((pos2 < contents.size()-1) && isIdentChar(contents.at(pos2+1))) + while ((pos2+1 < contents.size()) && isIdentChar(contents.at(pos2+1))) ++pos2; QString ident = contents.mid(pos, pos2 - pos + 1); -- cgit v1.2.1