diff options
| author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2018-02-23 01:45:58 +0100 |
|---|---|---|
| committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2018-02-23 01:45:58 +0100 |
| commit | ea6292168a6acd4c263913f0ccd7dd64daf4f5cf (patch) | |
| tree | 312024abbd7c3c100274f3a8031d49096480b654 /src/loghighlighter.cpp | |
| parent | 5e5c9c07291f6b09623d31c92b1fb61c4ede576e (diff) | |
Revert "Applied clang-format on source"
This reverts commit 5e5c9c07291f6b09623d31c92b1fb61c4ede576e.
Diffstat (limited to 'src/loghighlighter.cpp')
| -rw-r--r-- | src/loghighlighter.cpp | 45 |
1 files changed, 25 insertions, 20 deletions
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 <http://www.gnu.org/licenses/>. #include "loghighlighter.h"
#include <QRegExp>
-LogHighlighter::LogHighlighter(QObject* parent) : QSyntaxHighlighter(parent) {}
+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);
+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);
}
+ }
- markPos = text.indexOf("using profile");
- if (markPos != -1) {
- setFormat(markPos + 13, 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);
+ }
}
|
