forked from qt-creator/qt-creator
Utils: Move code model icons to utils
Using the already established icons for code model errors and warnings to Utils to mak them accessible for other code models. Change-Id: If9f8efde60cf20411e043aeb2831a9254398bcaf Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -75,9 +75,6 @@ HEADERS += \
|
||||
|
||||
FORMS += clangprojectsettingswidget.ui
|
||||
|
||||
RESOURCES += \
|
||||
clangcodemodel.qrc
|
||||
|
||||
DISTFILES += \
|
||||
README \
|
||||
$${IDE_SOURCE_TREE}/doc/src/editors/creator-clang-codemodel.qdoc
|
||||
|
||||
@@ -51,7 +51,6 @@ QtcPlugin {
|
||||
"clangbackendsender.h",
|
||||
"clangcodemodelplugin.cpp",
|
||||
"clangcodemodelplugin.h",
|
||||
"clangcodemodel.qrc",
|
||||
"clangcompletionassistinterface.cpp",
|
||||
"clangcompletionassistinterface.h",
|
||||
"clangcompletionassistprocessor.cpp",
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/clangcodemodel">
|
||||
<file>images/error.png</file>
|
||||
<file>images/error@2x.png</file>
|
||||
<file>images/warning.png</file>
|
||||
<file>images/warning@2x.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "clangconstants.h"
|
||||
#include "clangdiagnostictooltipwidget.h"
|
||||
|
||||
#include <utils/icon.h>
|
||||
#include <utils/utilsicons.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/theme/theme.h>
|
||||
|
||||
@@ -86,23 +86,11 @@ ClangTextMark::ClangTextMark(const QString &fileName,
|
||||
|
||||
void ClangTextMark::updateIcon(bool valid)
|
||||
{
|
||||
static const QIcon errorIcon = Utils::Icon(
|
||||
{{":/clangcodemodel/images/error.png", Utils::Theme::IconsErrorColor}},
|
||||
Utils::Icon::Tint).icon();
|
||||
static const QIcon warningIcon = Utils::Icon(
|
||||
{{":/clangcodemodel/images/warning.png", Utils::Theme::IconsWarningColor}},
|
||||
Utils::Icon::Tint).icon();
|
||||
static const QIcon invalidErrorIcon = Utils::Icon(
|
||||
{{":/clangcodemodel/images/error.png", Utils::Theme::IconsDisabledColor}},
|
||||
Utils::Icon::Tint).icon();
|
||||
static const QIcon invalidWarningIcon = Utils::Icon(
|
||||
{{":/clangcodemodel/images/warning.png", Utils::Theme::IconsDisabledColor}},
|
||||
Utils::Icon::Tint).icon();
|
||||
|
||||
using namespace Utils::Icons;
|
||||
if (isWarningOrNote(m_diagnostic.severity()))
|
||||
setIcon(valid ? warningIcon : invalidWarningIcon);
|
||||
setIcon(valid ? CODEMODEL_WARNING.icon() : CODEMODEL_DISABLED_WARNING.icon());
|
||||
else
|
||||
setIcon(valid ? errorIcon : invalidErrorIcon);
|
||||
setIcon(valid ? CODEMODEL_ERROR.icon() : CODEMODEL_DISABLED_ERROR.icon());
|
||||
}
|
||||
|
||||
bool ClangTextMark::addToolTipContent(QLayout *target) const
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 152 B |
Binary file not shown.
|
Before Width: | Height: | Size: 205 B |
Binary file not shown.
|
Before Width: | Height: | Size: 158 B |
Binary file not shown.
|
Before Width: | Height: | Size: 249 B |
Reference in New Issue
Block a user