summaryrefslogtreecommitdiff
path: root/src/scripttools/debugging/qscriptcompletiontask.cpp
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2011-08-12 20:22:30 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-12 13:52:06 +0200
commit97e84865b8415e77d265c894798ed2333a056682 (patch)
treee51a27c6069440f87a87c1aaf9dfd5cbaa42c32c /src/scripttools/debugging/qscriptcompletiontask.cpp
parent7a954f4f8846aeece67aab7a74507f5904ccd436 (diff)
downloadqtscript-97e84865b8415e77d265c894798ed2333a056682.tar.gz
Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)'
Merge-request: 1299 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> (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 <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/scripttools/debugging/qscriptcompletiontask.cpp')
-rw-r--r--src/scripttools/debugging/qscriptcompletiontask.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scripttools/debugging/qscriptcompletiontask.cpp b/src/scripttools/debugging/qscriptcompletiontask.cpp
index fb250b7..3c94a21 100644
--- a/src/scripttools/debugging/qscriptcompletiontask.cpp
+++ b/src/scripttools/debugging/qscriptcompletiontask.cpp
@@ -172,7 +172,7 @@ void QScriptCompletionTaskPrivate::completeScriptExpression()
while ((pos > 0) && isIdentChar(contents.at(pos-1)))
--pos;
int pos2 = cursorPosition - 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);
position = pos;