TextEditors: Avoid multiple highlighting runs when changing font setting

And remove some unnecessary code in Python editor

Change-Id: I86cde74c244a16d1b36b0ac0e841ef8110ba832f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2014-01-22 15:36:06 +01:00
parent c99464dd9b
commit 0ec2a02fd4
7 changed files with 44 additions and 35 deletions

View File

@@ -85,20 +85,6 @@ void EditorWidget::unCommentSelection()
Utils::unCommentSelection(this, m_commentDefinition);
}
/**
Handles common IDE fonts&colors settings
(Tools -> Options -> Text editor -> Fonts and colors)
*/
void EditorWidget::applyFontSettings()
{
TextEditor::BaseTextEditorWidget::applyFontSettings();
PythonHighlighter *highlighter =
qobject_cast<PythonHighlighter *>(baseTextDocument()->syntaxHighlighter());
if (highlighter)
highlighter->setFontSettings(baseTextDocument()->fontSettings());
}
TextEditor::BaseTextEditor *EditorWidget::createEditor()
{
return new PythonEditor(this);

View File

@@ -48,7 +48,6 @@ public:
virtual void unCommentSelection();
protected:
void applyFontSettings();
TextEditor::BaseTextEditor *createEditor();
private: