aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2019-01-27 07:05:49 +0100
committerAndré Hartmann <aha_1980@gmx.de>2019-01-28 06:10:17 +0000
commit3b2b50f79fc60768f198a8e9f9bea948b387bef7 (patch)
tree8f2b0d7bf7d2699432fe1147d9b5740a578958e5
parent693e2649a4dea7ed848372db7e81fad878bc0df4 (diff)
AnsiEscapeCodeHandler: Fix some Clang sign conversion warnings
Change-Id: I170054defc4c54d2bae4e936eb3c0c482c36e03d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r--src/libs/utils/ansiescapecodehandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/utils/ansiescapecodehandler.cpp b/src/libs/utils/ansiescapecodehandler.cpp
index 70a4dff36e..486279d393 100644
--- a/src/libs/utils/ansiescapecodehandler.cpp
+++ b/src/libs/utils/ansiescapecodehandler.cpp
@@ -166,7 +166,7 @@ QList<FormattedText> AnsiEscapeCodeHandler::parseText(const FormattedText &input
}
for (int i = 0; i < numbers.size(); ++i) {
- const int code = numbers.at(i).toInt();
+ const uint code = numbers.at(i).toUInt();
if (code >= TextColorStart && code <= TextColorEnd) {
charFormat.setForeground(ansiColor(code - TextColorStart));
@@ -214,7 +214,7 @@ QList<FormattedText> AnsiEscapeCodeHandler::parseText(const FormattedText &input
break;
case 5:
// 256 color mode with format: 38;5;<i>
- uint index = numbers.at(i + 1).toInt();
+ uint index = numbers.at(i + 1).toUInt();
QColor color;
if (index < 8) {
@@ -229,7 +229,7 @@ QList<FormattedText> AnsiEscapeCodeHandler::parseText(const FormattedText &input
color = QColor((o / 36) * 51, ((o / 6) % 6) * 51, (o % 6) * 51);
} else {
// The last 24 colors are a greyscale gradient.
- uint grey = (index - 232) * 11;
+ int grey = int((index - 232) * 11);
color = QColor(grey, grey, grey);
}