Clang: Distinct warning/error icons

Similar shapes, but hollow.

Change-Id: I72f39d1bc701c28c8bc0b038f646904efe1e67b0
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
Alessandro Portale
2016-02-02 14:54:31 +01:00
committed by Marco Bubke
parent 8754cab9aa
commit 9d9f003e0f
8 changed files with 98 additions and 9 deletions

View File

@@ -27,7 +27,8 @@
#include "clangconstants.h"
#include <coreplugin/coreicons.h>
#include <utils/icon.h>
#include <utils/theme/theme.h>
#include <QString>
@@ -65,8 +66,12 @@ ClangTextMark::ClangTextMark(const QString &fileName, int lineNumber, ClangBackE
void ClangTextMark::setIcon(ClangBackEnd::DiagnosticSeverity severity)
{
static const QIcon errorIcon{Core::Icons::ERROR.icon()};
static const QIcon warningIcon{Core::Icons::WARNING.icon()};
static const QIcon errorIcon = Utils::Icon({
{QLatin1String(":/clangcodemodel/images/error.png"), Utils::Theme::IconsErrorColor}
}, Utils::Icon::Tint).icon();
static const QIcon warningIcon = Utils::Icon({
{QLatin1String(":/clangcodemodel/images/warning.png"), Utils::Theme::IconsWarningColor}
}, Utils::Icon::Tint).icon();
if (isWarningOrNote(severity))
TextMark::setIcon(warningIcon);