Fixed completion settings to also apply to the QML code completion

By moving the completion settings into the TextEditor plugin, so that
both the CppTools and the QmlJSEditor plugins can access the settings.

The user-interface to edit the settings is still in the CppTools plugin,
since we're in string freeze at the moment. It should be moved to the
TextEditor plugin later.

For now the QML completion only supports the case-sensitivity and
partial completion options, since there is no automatic insertion of
brackets.

Task-number: QTCREATORBUG-1327
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
This commit is contained in:
Thorbjørn Lindeijer
2010-05-10 18:30:09 +02:00
parent b8f7d44753
commit e53b5bc9a1
17 changed files with 378 additions and 202 deletions

View File

@@ -79,18 +79,6 @@ public:
QIcon iconForSymbol(CPlusPlus::Symbol *symbol) const;
CaseSensitivity caseSensitivity() const;
void setCaseSensitivity(CaseSensitivity caseSensitivity);
bool autoInsertBrackets() const;
void setAutoInsertBrackets(bool autoInsertBrackets);
bool isPartialCompletionEnabled() const;
void setPartialCompletionEnabled(bool partialCompletionEnabled);
bool isSpaceAfterFunctionName() const;
void setSpaceAfterFunctionName(bool spaceAfterFunctionName);
private:
void addKeywords();
void addMacros(const QString &fileName, const CPlusPlus::Snapshot &snapshot);
@@ -152,10 +140,6 @@ private:
TextEditor::ITextEditable *m_editor;
int m_startPosition; // Position of the cursor from which completion started
CaseSensitivity m_caseSensitivity;
bool m_autoInsertBrackets;
bool m_partialCompletionEnabled;
bool m_spaceAfterFunctionName;
bool m_forcedCompletion;
unsigned m_completionOperator;
bool m_objcEnabled;