From 3b2b50f79fc60768f198a8e9f9bea948b387bef7 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sun, 27 Jan 2019 07:05:49 +0100 Subject: AnsiEscapeCodeHandler: Fix some Clang sign conversion warnings Change-Id: I170054defc4c54d2bae4e936eb3c0c482c36e03d Reviewed-by: Orgad Shaneh --- src/libs/utils/ansiescapecodehandler.cpp | 6 +++--- 1 file 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 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 AnsiEscapeCodeHandler::parseText(const FormattedText &input break; case 5: // 256 color mode with format: 38;5; - uint index = numbers.at(i + 1).toInt(); + uint index = numbers.at(i + 1).toUInt(); QColor color; if (index < 8) { @@ -229,7 +229,7 @@ QList 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); } -- cgit v1.2.3