forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user