Automatically trigger completion for C++ editor after three characters

Similar behaviour as for the QML editor. However, for now without
removing the completion box when you have typed the whole word, since it
could still be useful for automatically inserting other characters.

Task-number: QTCREATORBUG-67
This commit is contained in:
Thorbjørn Lindeijer
2010-07-14 12:37:49 +02:00
parent a76773191d
commit 2c51e0c9da
2 changed files with 30 additions and 3 deletions

View File

@@ -72,6 +72,7 @@ public:
TextEditor::ITextEditable *editor() const;
int startPosition() const;
bool shouldRestartCompletion();
QList<TextEditor::CompletionItem> getCompletions();
bool supportsEditor(TextEditor::ITextEditable *editor);
bool triggersCompletion(TextEditor::ITextEditable *editor);
@@ -144,6 +145,7 @@ private:
CppModelManager *m_manager;
TextEditor::ITextEditable *m_editor;
int m_startPosition; // Position of the cursor from which completion started
bool m_shouldRestartCompletion;
bool m_forcedCompletion;
unsigned m_completionOperator;