From 5e5c9c07291f6b09623d31c92b1fb61c4ede576e Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Thu, 22 Feb 2018 16:54:34 +0100 Subject: Applied clang-format on source --- src/loghighlighter.cpp | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) (limited to 'src/loghighlighter.cpp') diff --git a/src/loghighlighter.cpp b/src/loghighlighter.cpp index f43e5662..414c3020 100644 --- a/src/loghighlighter.cpp +++ b/src/loghighlighter.cpp @@ -20,33 +20,28 @@ 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) {} + +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); - } + 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); - } + markPos = text.indexOf("using profile"); + if (markPos != -1) { + setFormat(markPos + 13, text.length(), Qt::blue); + } } -- cgit v1.3.1