forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
@@ -48,7 +48,6 @@ public:
|
||||
virtual void unCommentSelection();
|
||||
|
||||
protected:
|
||||
void applyFontSettings();
|
||||
TextEditor::BaseTextEditor *createEditor();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user