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

@@ -45,11 +45,16 @@ struct TabSettings;
struct StorageSettings;
struct BehaviorSettings;
struct DisplaySettings;
struct CompletionSettings;
namespace Internal {
class TextEditorSettingsPrivate;
}
/**
* This class provides a central place for basic text editor settings. These
* settings include font settings, tab settings, storage settings, behavior
* settings and display settings.
* settings, display settings and completion settings.
*/
class TEXTEDITOR_EXPORT TextEditorSettings : public QObject
{
@@ -68,6 +73,9 @@ public:
const StorageSettings &storageSettings() const;
const BehaviorSettings &behaviorSettings() const;
const DisplaySettings &displaySettings() const;
const CompletionSettings &completionSettings() const;
void setCompletionSettings(const TextEditor::CompletionSettings &);
signals:
void fontSettingsChanged(const TextEditor::FontSettings &);
@@ -75,15 +83,12 @@ signals:
void storageSettingsChanged(const TextEditor::StorageSettings &);
void behaviorSettingsChanged(const TextEditor::BehaviorSettings &);
void displaySettingsChanged(const TextEditor::DisplaySettings &);
private slots:
void fontZoomRequested(int pointSize);
void zoomResetRequested();
void completionSettingsChanged(const TextEditor::CompletionSettings &);
private:
FontSettingsPage *m_fontSettingsPage;
BehaviorSettingsPage *m_behaviorSettingsPage;
DisplaySettingsPage *m_displaySettingsPage;
Internal::TextEditorSettingsPrivate *m_d;
Q_PRIVATE_SLOT(m_d, void fontZoomRequested(int pointSize));
Q_PRIVATE_SLOT(m_d, void zoomResetRequested());
static TextEditorSettings *m_instance;
};