OSDN Git Service

Completion: Complete automatically only when in sync
authorLeandro Melo <leandro.melo@nokia.com>
Fri, 20 May 2011 08:27:56 +0000 (10:27 +0200)
committerLeandro T. C. Melo <leandro.melo@nokia.com>
Fri, 20 May 2011 15:11:05 +0000 (17:11 +0200)
commit9e6f387bce3581890bf2fd1600a3c93a855e2b01
tree6bebed33949a9d3e7f767fa7408f888a4cd4eccc
parenta923cee383e28dbeeb24c97dbba3b756f6a85d82
Completion: Complete automatically only when in sync

Whith the out-of-GUI completion one can have undesired
effects when invoking the completion, continue typing,
getting automatic content added to the editor
asynchronously, and then noticing that the lastly
input characters were "shifted" to a different
position.

Now we only do partial completions or implicit completions
(when there's a single match) if the proposal widget is
still in synch with the editor. In other words, if the
editor has not received input from the moment the completion
was triggered until it was actually displayed.

Change-Id: I31683bd596c9f75b9a48bb79dafb48eec8f12a3e
Reviewed-on: http://codereview.qt.nokia.com/44
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
src/plugins/texteditor/codeassist/genericproposalwidget.cpp