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

@@ -68,7 +68,7 @@ Core::IEditor *ProFileEditorEditable::duplicate(QWidget *parent)
ProFileEditor *ret = new ProFileEditor(parent, qobject_cast<ProFileEditor*>(editor())->factory(),
qobject_cast<ProFileEditor*>(editor())->actionHandler());
ret->duplicateFrom(editor());
ret->initialize();
TextEditor::TextEditorSettings::instance()->initializeEditor(ret);
return ret->editableInterface();
}
@@ -103,16 +103,6 @@ TextEditor::BaseTextEditorEditable *ProFileEditor::createEditableInterface()
return new ProFileEditorEditable(this);
}
void ProFileEditor::initialize()
{
TextEditor::TextEditorSettings *settings = TextEditor::TextEditorSettings::instance();
connect(settings, SIGNAL(fontSettingsChanged(const TextEditor::FontSettings&)),
this, SLOT(setFontSettings(const TextEditor::FontSettings&)));
setFontSettings(settings->fontSettings());
}
void ProFileEditor::setFontSettings(const TextEditor::FontSettings &fs)
{
TextEditor::BaseTextEditor::setFontSettings(fs);