Rename the "ERROR" icon to "CRITICAL"

We mostly use this icon in terms of showing messages which might be
informational, warnings, or errors. We cannot call the icon "ERROR" as
that clashes with some macro on windows. To be more inline with Qt's
predefined messaging macros (qDebug(), qInfo(), qWarning(),
qCritical(), qFatal()), we rename the icon to "CRITICAL" and regroup
the entries in the header to suggest this usage.

Change-Id: I89880919d7ca54ea9c86de384eb29f375bf3075f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Ulf Hermann
2017-01-02 12:37:49 +01:00
parent 3ed12811e0
commit 018ba5a834
17 changed files with 25 additions and 23 deletions

View File

@@ -64,7 +64,7 @@ const Icon NOTLOADED({
{QLatin1String(":/utils/images/notloaded.png"), Theme::IconsErrorColor}}, Icon::Tint); {QLatin1String(":/utils/images/notloaded.png"), Theme::IconsErrorColor}}, Icon::Tint);
const Icon BROKEN({ const Icon BROKEN({
{QLatin1String(":/utils/images/broken.png"), Theme::IconsErrorColor}}, Icon::Tint); {QLatin1String(":/utils/images/broken.png"), Theme::IconsErrorColor}}, Icon::Tint);
const Icon ERROR({ const Icon CRITICAL({
{QLatin1String(":/utils/images/warningfill.png"), Theme::BackgroundColorNormal}, {QLatin1String(":/utils/images/warningfill.png"), Theme::BackgroundColorNormal},
{QLatin1String(":/utils/images/error.png"), Theme::IconsErrorColor}}, Icon::Tint); {QLatin1String(":/utils/images/error.png"), Theme::IconsErrorColor}}, Icon::Tint);
const Icon BOOKMARK({ const Icon BOOKMARK({
@@ -166,7 +166,7 @@ const Icon WARNING({
{QLatin1String(":/utils/images/warning.png"), Theme::IconsWarningColor}}, Icon::Tint); {QLatin1String(":/utils/images/warning.png"), Theme::IconsWarningColor}}, Icon::Tint);
const Icon WARNING_TOOLBAR({ const Icon WARNING_TOOLBAR({
{QLatin1String(":/utils/images/warning.png"), Theme::IconsWarningToolBarColor}}); {QLatin1String(":/utils/images/warning.png"), Theme::IconsWarningToolBarColor}});
const Icon ERROR_TOOLBAR({ const Icon CRITICAL_TOOLBAR({
{QLatin1String(":/utils/images/error.png"), Theme::IconsErrorToolBarColor}}); {QLatin1String(":/utils/images/error.png"), Theme::IconsErrorToolBarColor}});
const Icon ERROR_TASKBAR({ const Icon ERROR_TASKBAR({
{QLatin1String(":/utils/images/compile_error_taskbar.png"), Theme::IconsErrorColor}}, Icon::Tint); {QLatin1String(":/utils/images/compile_error_taskbar.png"), Theme::IconsErrorColor}}, Icon::Tint);

View File

@@ -48,7 +48,6 @@ QTCREATOR_UTILS_EXPORT extern const Icon FITTOVIEW_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon OK; QTCREATOR_UTILS_EXPORT extern const Icon OK;
QTCREATOR_UTILS_EXPORT extern const Icon NOTLOADED; QTCREATOR_UTILS_EXPORT extern const Icon NOTLOADED;
QTCREATOR_UTILS_EXPORT extern const Icon BROKEN; QTCREATOR_UTILS_EXPORT extern const Icon BROKEN;
QTCREATOR_UTILS_EXPORT extern const Icon ERROR;
QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK; QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK;
QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK_TEXTEDITOR; QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK_TEXTEDITOR;
@@ -97,12 +96,15 @@ QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_SPLIT_LEFT;
QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_SPLIT_RIGHT; QTCREATOR_UTILS_EXPORT extern const Icon CLOSE_SPLIT_RIGHT;
QTCREATOR_UTILS_EXPORT extern const Icon FILTER; QTCREATOR_UTILS_EXPORT extern const Icon FILTER;
QTCREATOR_UTILS_EXPORT extern const Icon LINK; QTCREATOR_UTILS_EXPORT extern const Icon LINK;
QTCREATOR_UTILS_EXPORT extern const Icon WARNING;
QTCREATOR_UTILS_EXPORT extern const Icon WARNING_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon ERROR_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon ERROR_TASKBAR;
QTCREATOR_UTILS_EXPORT extern const Icon INFO; QTCREATOR_UTILS_EXPORT extern const Icon INFO;
QTCREATOR_UTILS_EXPORT extern const Icon INFO_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon INFO_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon WARNING;
QTCREATOR_UTILS_EXPORT extern const Icon WARNING_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon CRITICAL;
QTCREATOR_UTILS_EXPORT extern const Icon CRITICAL_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon ERROR_TASKBAR;
QTCREATOR_UTILS_EXPORT extern const Icon EXPAND_ALL_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon EXPAND_ALL_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon TOOLBAR_EXTENSION; QTCREATOR_UTILS_EXPORT extern const Icon TOOLBAR_EXTENSION;
QTCREATOR_UTILS_EXPORT extern const Icon RUN_SMALL; QTCREATOR_UTILS_EXPORT extern const Icon RUN_SMALL;

View File

@@ -88,7 +88,7 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
m_ui->signingDebugWarningIcon->setPixmap(Utils::Icons::WARNING.pixmap()); m_ui->signingDebugWarningIcon->setPixmap(Utils::Icons::WARNING.pixmap());
m_ui->signingDebugWarningIcon->hide(); m_ui->signingDebugWarningIcon->hide();
m_ui->signingDebugWarningLabel->hide(); m_ui->signingDebugWarningLabel->hide();
m_ui->signingDebugDeployErrorIcon->setPixmap(Utils::Icons::ERROR.pixmap()); m_ui->signingDebugDeployErrorIcon->setPixmap(Utils::Icons::CRITICAL.pixmap());
signPackageCheckBoxToggled(m_step->signPackage()); signPackageCheckBoxToggled(m_step->signPackage());
m_ui->useGradleCheckBox->setChecked(m_step->useGradle()); m_ui->useGradleCheckBox->setChecked(m_step->useGradle());

View File

@@ -174,7 +174,7 @@ AndroidSettingsWidget::AndroidSettingsWidget(QWidget *parent)
m_ui->jdkWarningIconLabel->setPixmap(warningPixmap); m_ui->jdkWarningIconLabel->setPixmap(warningPixmap);
m_ui->kitWarningIconLabel->setPixmap(warningPixmap); m_ui->kitWarningIconLabel->setPixmap(warningPixmap);
const QPixmap errorPixmap = Utils::Icons::ERROR.pixmap(); const QPixmap errorPixmap = Utils::Icons::CRITICAL.pixmap();
m_ui->sdkWarningIconLabel->setPixmap(errorPixmap); m_ui->sdkWarningIconLabel->setPixmap(errorPixmap);
m_ui->gdbWarningIconLabel->setPixmap(errorPixmap); m_ui->gdbWarningIconLabel->setPixmap(errorPixmap);
m_ui->ndkWarningIconLabel->setPixmap(errorPixmap); m_ui->ndkWarningIconLabel->setPixmap(errorPixmap);

View File

@@ -101,7 +101,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
++row; ++row;
m_errorLabel = new QLabel; m_errorLabel = new QLabel;
m_errorLabel->setPixmap(Utils::Icons::ERROR.pixmap()); m_errorLabel->setPixmap(Utils::Icons::CRITICAL.pixmap());
m_errorLabel->setVisible(false); m_errorLabel->setVisible(false);
m_errorMessageLabel = new QLabel; m_errorMessageLabel = new QLabel;
m_errorMessageLabel->setVisible(false); m_errorMessageLabel->setVisible(false);

View File

@@ -136,7 +136,7 @@ Console::Console()
m_showErrorButtonAction->setToolTip(tr("Show error messages.")); m_showErrorButtonAction->setToolTip(tr("Show error messages."));
m_showErrorButtonAction->setCheckable(true); m_showErrorButtonAction->setCheckable(true);
m_showErrorButtonAction->setChecked(true); m_showErrorButtonAction->setChecked(true);
m_showErrorButtonAction->setIcon(Utils::Icons::ERROR_TOOLBAR.icon()); m_showErrorButtonAction->setIcon(Utils::Icons::CRITICAL_TOOLBAR.icon());
connect(m_showErrorButtonAction, &Utils::SavedAction::toggled, connect(m_showErrorButtonAction, &Utils::SavedAction::toggled,
proxyModel, &ConsoleProxyModel::setShowErrors); proxyModel, &ConsoleProxyModel::setShowErrors);
m_showErrorButton->setDefaultAction(m_showErrorButtonAction); m_showErrorButton->setDefaultAction(m_showErrorButtonAction);

View File

@@ -69,7 +69,7 @@ ConsoleItemDelegate::ConsoleItemDelegate(ConsoleItemModel *model, QObject *paren
m_model(model), m_model(model),
m_logIcon(Utils::Icons::INFO.icon()), m_logIcon(Utils::Icons::INFO.icon()),
m_warningIcon(Utils::Icons::WARNING.icon()), m_warningIcon(Utils::Icons::WARNING.icon()),
m_errorIcon(Utils::Icons::ERROR.icon()), m_errorIcon(Utils::Icons::CRITICAL.icon()),
m_expandIcon(Utils::Icons::EXPAND.icon()), m_expandIcon(Utils::Icons::EXPAND.icon()),
m_collapseIcon(Utils::Icons::COLLAPSE.icon()), m_collapseIcon(Utils::Icons::COLLAPSE.icon()),
m_prompt(QLatin1String(":/qmljstools/images/prompt.png")), m_prompt(QLatin1String(":/qmljstools/images/prompt.png")),

View File

@@ -219,7 +219,7 @@ QDateTime DebuggerItem::lastModified() const
QIcon DebuggerItem::decoration() const QIcon DebuggerItem::decoration() const
{ {
if (m_engineType == NoEngineType) if (m_engineType == NoEngineType)
return Utils::Icons::ERROR.icon(); return Utils::Icons::CRITICAL.icon();
if (!m_command.toFileInfo().isExecutable()) if (!m_command.toFileInfo().isExecutable())
return Utils::Icons::WARNING.icon(); return Utils::Icons::WARNING.icon();
if (!m_workingDirectory.isEmpty() && !m_workingDirectory.toFileInfo().isDir()) if (!m_workingDirectory.isEmpty() && !m_workingDirectory.toFileInfo().isDir())

View File

@@ -52,7 +52,7 @@ GitSubmitEditorWidget::GitSubmitEditorWidget() :
new GitSubmitHighlighter(descriptionEdit()); new GitSubmitHighlighter(descriptionEdit());
m_emailValidator = new QRegExpValidator(QRegExp("[^@ ]+@[^@ ]+\\.[a-zA-Z]+"), this); m_emailValidator = new QRegExpValidator(QRegExp("[^@ ]+@[^@ ]+\\.[a-zA-Z]+"), this);
const QPixmap error = Utils::Icons::ERROR.pixmap(); const QPixmap error = Utils::Icons::CRITICAL.pixmap();
m_gitSubmitPanelUi.invalidAuthorLabel->setPixmap(error); m_gitSubmitPanelUi.invalidAuthorLabel->setPixmap(error);
m_gitSubmitPanelUi.invalidEmailLabel->setToolTip(tr("Provide a valid email to commit.")); m_gitSubmitPanelUi.invalidEmailLabel->setToolTip(tr("Provide a valid email to commit."));
m_gitSubmitPanelUi.invalidEmailLabel->setPixmap(error); m_gitSubmitPanelUi.invalidEmailLabel->setPixmap(error);

View File

@@ -84,7 +84,7 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation
m_errorIcon->setAlignment(Qt::AlignRight); m_errorIcon->setAlignment(Qt::AlignRight);
m_warningIcon->setAlignment(Qt::AlignRight); m_warningIcon->setAlignment(Qt::AlignRight);
m_errorIcon->setPixmap(Utils::Icons::ERROR_TOOLBAR.pixmap()); m_errorIcon->setPixmap(Utils::Icons::CRITICAL_TOOLBAR.pixmap());
m_warningIcon->setPixmap(Utils::Icons::WARNING_TOOLBAR.pixmap()); m_warningIcon->setPixmap(Utils::Icons::WARNING_TOOLBAR.pixmap());
m_contentWidget->hide(); m_contentWidget->hide();

View File

@@ -79,7 +79,7 @@ public:
} }
if (role == Qt::DecorationRole) { if (role == Qt::DecorationRole) {
if (!widget->isValid()) { if (!widget->isValid()) {
static const QIcon errorIcon(Utils::Icons::ERROR.icon()); static const QIcon errorIcon(Utils::Icons::CRITICAL.icon());
return errorIcon; return errorIcon;
} }
if (widget->hasWarning()) { if (widget->hasWarning()) {

View File

@@ -36,7 +36,7 @@ namespace ProjectExplorer
static QIcon taskTypeIcon(Task::TaskType t) static QIcon taskTypeIcon(Task::TaskType t)
{ {
static QIcon icons[3] = { QIcon(), static QIcon icons[3] = { QIcon(),
Utils::Icons::ERROR.icon(), Utils::Icons::CRITICAL.icon(),
Utils::Icons::WARNING.icon()}; Utils::Icons::WARNING.icon()};
if (t < 0 || t > 2) if (t < 0 || t > 2)

View File

@@ -126,7 +126,7 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
m_sourceDirectoryWarning->setWordWrap(true); m_sourceDirectoryWarning->setWordWrap(true);
m_warningIcon = new QLabel(this); m_warningIcon = new QLabel(this);
m_warningIcon->setVisible(false); m_warningIcon->setVisible(false);
m_warningIcon->setPixmap(Utils::Icons::ERROR.pixmap()); m_warningIcon->setPixmap(Utils::Icons::CRITICAL.pixmap());
m_warningIcon->setWordWrap(true); m_warningIcon->setWordWrap(true);
m_warningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_warningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);

View File

@@ -201,7 +201,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent)
, m_ui(new Internal::Ui::QtVersionManager()) , m_ui(new Internal::Ui::QtVersionManager())
, m_versionUi(new Internal::Ui::QtVersionInfo()) , m_versionUi(new Internal::Ui::QtVersionInfo())
, m_infoBrowser(new QTextBrowser) , m_infoBrowser(new QTextBrowser)
, m_invalidVersionIcon(Utils::Icons::ERROR.icon()) , m_invalidVersionIcon(Utils::Icons::CRITICAL.icon())
, m_warningVersionIcon(Utils::Icons::WARNING.icon()) , m_warningVersionIcon(Utils::Icons::WARNING.icon())
, m_configurationWidget(0) , m_configurationWidget(0)
{ {

View File

@@ -202,7 +202,7 @@ void GenericLinuxDeviceConfigurationWidget::initGui()
m_ui->machineTypeValueLabel->setText(tr("Physical Device")); m_ui->machineTypeValueLabel->setText(tr("Physical Device"));
else else
m_ui->machineTypeValueLabel->setText(tr("Emulator")); m_ui->machineTypeValueLabel->setText(tr("Emulator"));
m_ui->portsWarningLabel->setPixmap(Utils::Icons::ERROR.pixmap()); m_ui->portsWarningLabel->setPixmap(Utils::Icons::CRITICAL.pixmap());
m_ui->portsWarningLabel->setToolTip(QLatin1String("<font color=\"red\">") m_ui->portsWarningLabel->setToolTip(QLatin1String("<font color=\"red\">")
+ tr("You will need at least one port.") + QLatin1String("</font>")); + tr("You will need at least one port.") + QLatin1String("</font>"));
m_ui->keyFileLineEdit->setExpectedKind(PathChooser::File); m_ui->keyFileLineEdit->setExpectedKind(PathChooser::File);

View File

@@ -120,7 +120,7 @@ void ErrorWidget::createUi()
m_exportWarnings = new QToolButton; m_exportWarnings = new QToolButton;
m_exportWarnings->setIcon(Utils::Icons::SAVEFILE_TOOLBAR.icon()); m_exportWarnings->setIcon(Utils::Icons::SAVEFILE_TOOLBAR.icon());
m_showErrors = new QToolButton; m_showErrors = new QToolButton;
m_showErrors->setIcon(Utils::Icons::ERROR_TOOLBAR.icon()); m_showErrors->setIcon(Utils::Icons::CRITICAL_TOOLBAR.icon());
m_showErrors->setCheckable(true); m_showErrors->setCheckable(true);
m_showWarnings = new QToolButton; m_showWarnings = new QToolButton;
m_showWarnings->setIcon(Utils::Icons::WARNING_TOOLBAR.icon()); m_showWarnings->setIcon(Utils::Icons::WARNING_TOOLBAR.icon());

View File

@@ -64,7 +64,7 @@ QIcon icon(IconType type)
default: default:
case IconType::Error: { case IconType::Error: {
const static QIcon icon = Utils::Icons::ERROR.icon(); const static QIcon icon = Utils::Icons::CRITICAL.icon();
return icon; return icon;
} }
} }
@@ -83,7 +83,7 @@ QIcon toolBarIcon(IconType type)
return Icon({{":/todoplugin/images/tasklist.png", Theme::IconsRunToolBarColor}}).icon(); return Icon({{":/todoplugin/images/tasklist.png", Theme::IconsRunToolBarColor}}).icon();
default: default:
case IconType::Error: case IconType::Error:
return Icons::ERROR_TOOLBAR.icon(); return Icons::CRITICAL_TOOLBAR.icon();
} }
} }