Unduplicated the code that initializes editor settings

This stuff was all over the place, a relic from before the editor
settings were unified. Now the initialization is only done in
TextEditorSettings.

Fixes the .pro file editor and the generic project files editor, which
before only used the font settings.
This commit is contained in:
Thorbjørn Lindeijer
2009-03-17 18:17:51 +01:00
parent a952a9bfa8
commit 0a48bd8731
11 changed files with 38 additions and 76 deletions

View File

@@ -140,26 +140,12 @@ void TextEditorPlugin::extensionsInitialized()
m_editorFactory->actionHandler()->initializeActions();
}
void TextEditorPlugin::initializeEditor(TextEditor::PlainTextEditor *editor)
void TextEditorPlugin::initializeEditor(PlainTextEditor *editor)
{
// common actions
m_editorFactory->actionHandler()->setupActions(editor);
// settings
connect(m_settings, SIGNAL(fontSettingsChanged(TextEditor::FontSettings)),
editor, SLOT(setFontSettings(TextEditor::FontSettings)));
connect(m_settings, SIGNAL(tabSettingsChanged(TextEditor::TabSettings)),
editor, SLOT(setTabSettings(TextEditor::TabSettings)));
connect(m_settings, SIGNAL(storageSettingsChanged(TextEditor::StorageSettings)),
editor, SLOT(setStorageSettings(TextEditor::StorageSettings)));
connect(m_settings, SIGNAL(displaySettingsChanged(TextEditor::DisplaySettings)),
editor, SLOT(setDisplaySettings(TextEditor::DisplaySettings)));
// tab settings rely on font settings
editor->setFontSettings(m_settings->fontSettings());
editor->setTabSettings(m_settings->tabSettings());
editor->setStorageSettings(m_settings->storageSettings());
editor->setDisplaySettings(m_settings->displaySettings());
TextEditorSettings::instance()->initializeEditor(editor);
}
void TextEditorPlugin::invokeCompletion()