forked from qt-creator/qt-creator
TextEditor: Clean up/streamline SyntaxHighlighter setup
No need for the third construction way if that's not really used by the factories anyway. Change-Id: Id3b34da5b0320babae9bef96a79bbaa52e0db06d Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -40,17 +40,6 @@ static const char CHANGE_PATTERN[] = "\\b[a-f0-9]{7,40}\\b";
|
||||
|
||||
GitSubmitHighlighter::GitSubmitHighlighter(QTextEdit * parent) :
|
||||
TextEditor::SyntaxHighlighter(parent)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
GitSubmitHighlighter::GitSubmitHighlighter(TextEditor::BaseTextDocument *parent) :
|
||||
TextEditor::SyntaxHighlighter(parent)
|
||||
{
|
||||
initialize();
|
||||
}
|
||||
|
||||
void GitSubmitHighlighter::initialize()
|
||||
{
|
||||
static QVector<TextEditor::TextStyle> categories;
|
||||
if (categories.isEmpty())
|
||||
@@ -108,7 +97,7 @@ GitRebaseHighlighter::RebaseAction::RebaseAction(const QString ®exp,
|
||||
{
|
||||
}
|
||||
|
||||
GitRebaseHighlighter::GitRebaseHighlighter(TextEditor::BaseTextDocument *parent) :
|
||||
GitRebaseHighlighter::GitRebaseHighlighter(QTextDocument *parent) :
|
||||
TextEditor::SyntaxHighlighter(parent),
|
||||
m_hashChar(QLatin1Char('#')),
|
||||
m_changeNumberPattern(QLatin1String(CHANGE_PATTERN))
|
||||
|
||||
Reference in New Issue
Block a user