diff --git a/GUI/View/Info/PythonSyntaxHighlighter.h b/GUI/View/Info/PythonSyntaxHighlighter.h
index 28c9729c07f2b6f6094421eb2d0b7c6ba034385e..3cbb40d46f8f9fd705e289303750afdc45df5126 100644
--- a/GUI/View/Info/PythonSyntaxHighlighter.h
+++ b/GUI/View/Info/PythonSyntaxHighlighter.h
@@ -62,14 +62,12 @@ public:
 
 //! Implementation of highlighting for Python code.
 class PythonSyntaxHighlighter : public QSyntaxHighlighter {
-    Q_OBJECT
 public:
     PythonSyntaxHighlighter(QTextDocument* parent = nullptr);
 
-protected:
+private:
     void highlightBlock(const QString& text) override;
 
-private:
     QStringList keywords;
     QStringList operators;
     QStringList braces;