Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
Qt Creator 2.7.0
-
None
-
6ce9a80afa43b3a40b0244ebef3b41ba03cc76a0
Description
My code looks like this:
QString pattern; int index = pattern.lastIndexOf('/'); if (index == pattern.co
Here I want to do code completion. The combo box opens up, I select "count" and press Return. Afterwards, Creator hangs. The reason is that the while loop at src/plugins/cpptools/cppcompletionassist.cpp:347 starts out with a negative controlling value. In my example, the values are as follows:
toInsert.length() = 5, editor->position() = 21147, basePosition = 21140, resulting in an initial value of -2 for preserveLength. Relevent stack trace attached.
Attachments
For Gerrit Dashboard: QTCREATORBUG-8532 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
44439,1 | C++: fix invalid common prefix calculation. | 2.6 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |