From ea6292168a6acd4c263913f0ccd7dd64daf4f5cf Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Fri, 23 Feb 2018 01:45:58 +0100 Subject: Revert "Applied clang-format on source" This reverts commit 5e5c9c07291f6b09623d31c92b1fb61c4ede576e. --- src/loghighlighter.cpp | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) (limited to 'src/loghighlighter.cpp') diff --git a/src/loghighlighter.cpp b/src/loghighlighter.cpp index 414c3020..f43e5662 100644 --- a/src/loghighlighter.cpp +++ b/src/loghighlighter.cpp @@ -20,28 +20,33 @@ along with Mod Organizer. If not, see . #include "loghighlighter.h" #include -LogHighlighter::LogHighlighter(QObject* parent) : QSyntaxHighlighter(parent) {} - -void LogHighlighter::highlightBlock(const QString& text) { - int spacePos = text.indexOf(" "); - if (spacePos != -1) { - QString type = text.mid(0, spacePos); - if (type == "DEBUG") { - setFormat(0, text.length(), Qt::gray); - } else if (type == "INFO") { - setFormat(0, text.length(), Qt::darkGreen); - } else if (type == "ERROR") { - setFormat(0, text.length(), Qt::red); - } - } +LogHighlighter::LogHighlighter(QObject *parent) : + QSyntaxHighlighter(parent) +{ +} - int markPos = text.indexOf("injecting to"); - if (markPos != -1) { - setFormat(markPos + 12, text.length(), Qt::blue); - } - markPos = text.indexOf("using profile"); - if (markPos != -1) { - setFormat(markPos + 13, text.length(), Qt::blue); +void LogHighlighter::highlightBlock(const QString &text) +{ + int spacePos = text.indexOf(" "); + if (spacePos != -1) { + QString type = text.mid(0, spacePos); + if (type == "DEBUG") { + setFormat(0, text.length(), Qt::gray); + } else if (type == "INFO") { + setFormat(0, text.length(), Qt::darkGreen); + } else if (type == "ERROR") { + setFormat(0, text.length(), Qt::red); } + } + + int markPos = text.indexOf("injecting to"); + if (markPos != -1) { + setFormat(markPos + 12, text.length(), Qt::blue); + } + + markPos = text.indexOf("using profile"); + if (markPos != -1) { + setFormat(markPos + 13, text.length(), Qt::blue); + } } -- cgit v1.3.1