diff --git a/src/plugins/pythoneditor/pythoneditorwidget.cpp b/src/plugins/pythoneditor/pythoneditorwidget.cpp
index ba5d80110c843526ef0b9a586d5e593f32e7ff0e..ddd6fe9da4a0ab2cd067296a2b26d69b82d1bd8a 100644
--- a/src/plugins/pythoneditor/pythoneditorwidget.cpp
+++ b/src/plugins/pythoneditor/pythoneditorwidget.cpp
@@ -81,14 +81,10 @@ void EditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
 {
     TextEditor::BaseTextEditorWidget::setFontSettings(fs);
 
-#ifdef PYTHONEDITOR_HIGHLIGHTER_H
     PythonHighlighter *highlighter =
             qobject_cast<PythonHighlighter *>(baseTextDocument()->syntaxHighlighter());
     if (highlighter)
-    {
         highlighter->setFontSettings(fs);
-    }
-#endif
 }
 
 TextEditor::BaseTextEditor *EditorWidget::createEditor()