Commit d6b12213 authored by Alessandro Portale's avatar Alessandro Portale

ProjectExplorer: Use constants for compile_warning.png and _error

Instead of repeating strings like
   ":/projectexplorer/images/compile_warning.png" all over the code,
we should use constants for it.

Change-Id: I91b36838d6da0a2332381e433788e796948d26db
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 75c14dab
...@@ -165,7 +165,7 @@ void AndroidManifestEditorWidget::initializePage() ...@@ -165,7 +165,7 @@ void AndroidManifestEditorWidget::initializePage()
m_packageNameWarning->setVisible(false); m_packageNameWarning->setVisible(false);
m_packageNameWarningIcon = new QLabel; m_packageNameWarningIcon = new QLabel;
m_packageNameWarningIcon->setPixmap(QPixmap(QString::fromUtf8(":/projectexplorer/images/compile_warning.png"))); m_packageNameWarningIcon->setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
m_packageNameWarningIcon->setVisible(false); m_packageNameWarningIcon->setVisible(false);
m_packageNameWarningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_packageNameWarningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <utils/detailswidget.h> #include <utils/detailswidget.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/kitmanager.h> #include <projectexplorer/kitmanager.h>
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
...@@ -91,7 +92,7 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent) ...@@ -91,7 +92,7 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
: Utils::DetailsWidget(parent) : Utils::DetailsWidget(parent)
{ {
setSummaryText(QLatin1String("<b>Android has not been configured. Create Android kits.</b>")); setSummaryText(QLatin1String("<b>Android has not been configured. Create Android kits.</b>"));
setIcon(QIcon(QLatin1String(":/projectexplorer/images/compile_warning.png"))); setIcon(QIcon(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
//detailsWidget->setState(Utils::DetailsWidget::NoSummary); //detailsWidget->setState(Utils::DetailsWidget::NoSummary);
QWidget *mainWidget = new QWidget(this); QWidget *mainWidget = new QWidget(this);
setWidget(mainWidget); setWidget(mainWidget);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "avddialog.h" #include "avddialog.h"
#include "androidconfigurations.h" #include "androidconfigurations.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <QMessageBox> #include <QMessageBox>
...@@ -52,7 +53,7 @@ AvdDialog::AvdDialog(int minApiLevel, const QString &targetArch, const AndroidCo ...@@ -52,7 +53,7 @@ AvdDialog::AvdDialog(int minApiLevel, const QString &targetArch, const AndroidCo
QRegExp rx(QLatin1String("\\S+")); QRegExp rx(QLatin1String("\\S+"));
QRegExpValidator v(rx, 0); QRegExpValidator v(rx, 0);
m_avdDialog.nameLineEdit->setValidator(&v); m_avdDialog.nameLineEdit->setValidator(&v);
m_avdDialog.warningIcon->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_warning.png"))); m_avdDialog.warningIcon->setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
updateApiLevelComboBox(); updateApiLevelComboBox();
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qmakeprojectmanager/qmakeproject.h> #include <qmakeprojectmanager/qmakeproject.h>
#include <qmakeprojectmanager/qmakenodes.h> #include <qmakeprojectmanager/qmakenodes.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <proparser/prowriter.h> #include <proparser/prowriter.h>
#include <QComboBox> #include <QComboBox>
#include <QFormLayout> #include <QFormLayout>
...@@ -110,7 +111,7 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard) ...@@ -110,7 +111,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(QPixmap(QLatin1String(":/projectexplorer/images/compile_error.png"))); m_warningIcon->setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_ERROR)));
m_warningIcon->setWordWrap(true); m_warningIcon->setWordWrap(true);
m_warningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_warningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
......
...@@ -86,7 +86,7 @@ void BareMetalRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout) ...@@ -86,7 +86,7 @@ void BareMetalRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout)
{ {
QHBoxLayout * const hl = new QHBoxLayout; QHBoxLayout * const hl = new QHBoxLayout;
hl->addStretch(); hl->addStretch();
d->disabledIcon.setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_warning.png"))); d->disabledIcon.setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
hl->addWidget(&d->disabledIcon); hl->addWidget(&d->disabledIcon);
d->disabledReason.setVisible(false); d->disabledReason.setVisible(false);
hl->addWidget(&d->disabledReason); hl->addWidget(&d->disabledReason);
......
...@@ -85,8 +85,8 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation ...@@ -85,8 +85,8 @@ 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(QPixmap(QLatin1String(":/projectexplorer/images/compile_error.png"))); m_errorIcon->setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_ERROR)));
m_warningIcon->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_warning.png"))); m_warningIcon->setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
m_contentWidget->hide(); m_contentWidget->hide();
......
...@@ -73,7 +73,7 @@ void DesktopDeviceConfigurationWidget::initGui() ...@@ -73,7 +73,7 @@ void DesktopDeviceConfigurationWidget::initGui()
m_ui->freePortsLineEdit->setPlaceholderText( m_ui->freePortsLineEdit->setPlaceholderText(
QString::fromLatin1("eg: %1-%2").arg(DESKTOP_PORT_START).arg(DESKTOP_PORT_END)); QString::fromLatin1("eg: %1-%2").arg(DESKTOP_PORT_START).arg(DESKTOP_PORT_END));
m_ui->portsWarningLabel->setPixmap( m_ui->portsWarningLabel->setPixmap(
QPixmap(QLatin1String(":/projectexplorer/images/compile_warning.png"))); QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
m_ui->portsWarningLabel->setToolTip(QLatin1String("<font color=\"red\">") m_ui->portsWarningLabel->setToolTip(QLatin1String("<font color=\"red\">")
+ tr("You will need at least one port for QML debugging.") + tr("You will need at least one port for QML debugging.")
+ QLatin1String("</font>")); + QLatin1String("</font>"));
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "kit.h" #include "kit.h"
#include "kitmanagerconfigwidget.h" #include "kitmanagerconfigwidget.h"
#include "kitmanager.h" #include "kitmanager.h"
#include "projectexplorerconstants.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
...@@ -155,8 +156,8 @@ int KitModel::columnCount(const QModelIndex &parent) const ...@@ -155,8 +156,8 @@ int KitModel::columnCount(const QModelIndex &parent) const
QVariant KitModel::data(const QModelIndex &index, int role) const QVariant KitModel::data(const QModelIndex &index, int role) const
{ {
static QIcon warningIcon(QLatin1String(":/projectexplorer/images/compile_warning.png")); static QIcon warningIcon(QString::fromLatin1(ProjectExplorer::Constants::ICON_WARNING));
static QIcon errorIcon(QLatin1String(":/projectexplorer/images/compile_error.png")); static QIcon errorIcon(QString::fromLatin1(ProjectExplorer::Constants::ICON_ERROR));
if (!index.isValid() || index.column() != 0) if (!index.isValid() || index.column() != 0)
return QVariant(); return QVariant();
......
...@@ -162,6 +162,8 @@ const char ICON_DEBUG_SMALL[] = ":/projectexplorer/images/debugger_start_sma ...@@ -162,6 +162,8 @@ const char ICON_DEBUG_SMALL[] = ":/projectexplorer/images/debugger_start_sma
const char ICON_STOP[] = ":/projectexplorer/images/stop.png"; const char ICON_STOP[] = ":/projectexplorer/images/stop.png";
const char ICON_STOP_SMALL[] = ":/projectexplorer/images/stop_small.png"; const char ICON_STOP_SMALL[] = ":/projectexplorer/images/stop_small.png";
const char ICON_WINDOW[] = ":/projectexplorer/images/window.png"; const char ICON_WINDOW[] = ":/projectexplorer/images/window.png";
const char ICON_WARNING[] = ":/projectexplorer/images/compile_warning.png";
const char ICON_ERROR[] = ":/projectexplorer/images/compile_error.png";
// Mime types // Mime types
const char C_SOURCE_MIMETYPE[] = "text/x-csrc"; const char C_SOURCE_MIMETYPE[] = "text/x-csrc";
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "task.h" #include "task.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
namespace ProjectExplorer namespace ProjectExplorer
...@@ -38,9 +39,9 @@ static QString taskTypeIcon(Task::TaskType t) ...@@ -38,9 +39,9 @@ static QString taskTypeIcon(Task::TaskType t)
{ {
switch (t) { switch (t) {
case Task::Warning: case Task::Warning:
return QLatin1String(":/projectexplorer/images/compile_warning.png"); return QLatin1String(ProjectExplorer::Constants::ICON_WARNING);
case Task::Error: case Task::Error:
return QLatin1String(":/projectexplorer/images/compile_error.png"); return QLatin1String(ProjectExplorer::Constants::ICON_ERROR);
case Task::Unknown: case Task::Unknown:
break; break;
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "taskhub.h" #include "taskhub.h"
#include <coreplugin/ioutputpane.h> #include <coreplugin/ioutputpane.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
using namespace ProjectExplorer; using namespace ProjectExplorer;
...@@ -84,8 +85,8 @@ void TaskMark::clicked() ...@@ -84,8 +85,8 @@ void TaskMark::clicked()
} }
TaskHub::TaskHub() TaskHub::TaskHub()
: m_errorIcon(QLatin1String(":/projectexplorer/images/compile_error.png")), : m_errorIcon(QLatin1String(ProjectExplorer::Constants::ICON_ERROR)),
m_warningIcon(QLatin1String(":/projectexplorer/images/compile_warning.png")) m_warningIcon(QLatin1String(ProjectExplorer::Constants::ICON_WARNING))
{ {
m_instance = this; m_instance = this;
qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task"); qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task");
......
...@@ -262,7 +262,7 @@ TaskWindow::TaskWindow() : d(new TaskWindowPrivate) ...@@ -262,7 +262,7 @@ TaskWindow::TaskWindow() : d(new TaskWindowPrivate)
d->m_listview->setContextMenuPolicy(Qt::ActionsContextMenu); d->m_listview->setContextMenuPolicy(Qt::ActionsContextMenu);
d->m_filterWarningsButton = createFilterButton( d->m_filterWarningsButton = createFilterButton(
QIcon(QLatin1String(":/projectexplorer/images/compile_warning.png")), QIcon(QLatin1String(Constants::ICON_WARNING)),
tr("Show Warnings"), this, SLOT(setShowWarnings(bool))); tr("Show Warnings"), this, SLOT(setShowWarnings(bool)));
d->m_categoriesButton = new QToolButton; d->m_categoriesButton = new QToolButton;
......
...@@ -338,7 +338,7 @@ QbsRunConfigurationWidget::QbsRunConfigurationWidget(QbsRunConfiguration *rc, QW ...@@ -338,7 +338,7 @@ QbsRunConfigurationWidget::QbsRunConfigurationWidget(QbsRunConfiguration *rc, QW
QHBoxLayout *hl = new QHBoxLayout(); QHBoxLayout *hl = new QHBoxLayout();
hl->addStretch(); hl->addStretch();
m_disabledIcon = new QLabel(this); m_disabledIcon = new QLabel(this);
m_disabledIcon->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_warning.png"))); m_disabledIcon->setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
hl->addWidget(m_disabledIcon); hl->addWidget(m_disabledIcon);
m_disabledReason = new QLabel(this); m_disabledReason = new QLabel(this);
m_disabledReason->setVisible(false); m_disabledReason->setVisible(false);
......
...@@ -190,7 +190,7 @@ DesktopQmakeRunConfigurationWidget::DesktopQmakeRunConfigurationWidget(DesktopQm ...@@ -190,7 +190,7 @@ DesktopQmakeRunConfigurationWidget::DesktopQmakeRunConfigurationWidget(DesktopQm
QHBoxLayout *hl = new QHBoxLayout(); QHBoxLayout *hl = new QHBoxLayout();
hl->addStretch(); hl->addStretch();
m_disabledIcon = new QLabel(this); m_disabledIcon = new QLabel(this);
m_disabledIcon->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_warning.png"))); m_disabledIcon->setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
hl->addWidget(m_disabledIcon); hl->addWidget(m_disabledIcon);
m_disabledReason = new QLabel(this); m_disabledReason = new QLabel(this);
m_disabledReason->setVisible(false); m_disabledReason->setVisible(false);
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <QMessageBox> #include <QMessageBox>
#include <QFileDialog> #include <QFileDialog>
...@@ -51,7 +52,7 @@ ...@@ -51,7 +52,7 @@
namespace Qnx { namespace Qnx {
namespace Internal { namespace Internal {
static QIcon invalidConfigIcon(QLatin1String(":/projectexplorer/images/compile_error.png")); static QIcon invalidConfigIcon(QString::fromLatin1(ProjectExplorer::Constants::ICON_ERROR));
BlackBerryNDKSettingsWidget::BlackBerryNDKSettingsWidget(QWidget *parent) : BlackBerryNDKSettingsWidget::BlackBerryNDKSettingsWidget(QWidget *parent) :
QWidget(parent), QWidget(parent),
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "qnxconstants.h" #include "qnxconstants.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <QGridLayout> #include <QGridLayout>
#include <QLabel> #include <QLabel>
...@@ -86,7 +87,7 @@ BlackBerryPotentialKitWidget::BlackBerryPotentialKitWidget(QWidget *parent) ...@@ -86,7 +87,7 @@ BlackBerryPotentialKitWidget::BlackBerryPotentialKitWidget(QWidget *parent)
: Utils::DetailsWidget(parent) : Utils::DetailsWidget(parent)
{ {
setSummaryText(tr("<b>BlackBerry has not been configured. Create BlackBerry kits.</b>")); setSummaryText(tr("<b>BlackBerry has not been configured. Create BlackBerry kits.</b>"));
setIcon(QIcon(QLatin1String(":/projectexplorer/images/compile_warning.png"))); setIcon(QIcon(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
QWidget *mainWidget = new QWidget(this); QWidget *mainWidget = new QWidget(this);
setWidget(mainWidget); setWidget(mainWidget);
......
...@@ -106,8 +106,8 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent) ...@@ -106,8 +106,8 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent)
, m_versionUi(new Internal::Ui::QtVersionInfo()) , m_versionUi(new Internal::Ui::QtVersionInfo())
, m_debuggingHelperUi(new Internal::Ui::DebuggingHelper()) , m_debuggingHelperUi(new Internal::Ui::DebuggingHelper())
, m_infoBrowser(new QTextBrowser) , m_infoBrowser(new QTextBrowser)
, m_invalidVersionIcon(QLatin1String(":/projectexplorer/images/compile_error.png")) , m_invalidVersionIcon(QLatin1String(ProjectExplorer::Constants::ICON_ERROR))
, m_warningVersionIcon(QLatin1String(":/projectexplorer/images/compile_warning.png")) , m_warningVersionIcon(QLatin1String(ProjectExplorer::Constants::ICON_WARNING))
, m_configurationWidget(0) , m_configurationWidget(0)
, m_autoItem(0) , m_autoItem(0)
, m_manualItem(0) , m_manualItem(0)
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "genericlinuxdeviceconfigurationwidget.h" #include "genericlinuxdeviceconfigurationwidget.h"
#include "ui_genericlinuxdeviceconfigurationwidget.h" #include "ui_genericlinuxdeviceconfigurationwidget.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/portlist.h> #include <utils/portlist.h>
#include <utils/fancylineedit.h> #include <utils/fancylineedit.h>
#include <ssh/sshconnection.h> #include <ssh/sshconnection.h>
...@@ -179,7 +180,7 @@ void GenericLinuxDeviceConfigurationWidget::initGui() ...@@ -179,7 +180,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(QPixmap(QLatin1String(":/projectexplorer/images/compile_error.png"))); m_ui->portsWarningLabel->setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_ERROR)));
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);
......
...@@ -105,7 +105,7 @@ void RemoteLinuxRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout) ...@@ -105,7 +105,7 @@ void RemoteLinuxRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout)
{ {
QHBoxLayout * const hl = new QHBoxLayout; QHBoxLayout * const hl = new QHBoxLayout;
hl->addStretch(); hl->addStretch();
d->disabledIcon.setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_warning.png"))); d->disabledIcon.setPixmap(QPixmap(QLatin1String(ProjectExplorer::Constants::ICON_WARNING)));
hl->addWidget(&d->disabledIcon); hl->addWidget(&d->disabledIcon);
d->disabledReason.setVisible(false); d->disabledReason.setVisible(false);
hl->addWidget(&d->disabledReason); hl->addWidget(&d->disabledReason);
......
...@@ -52,10 +52,6 @@ const char ICON_INFO[] = ":/todoplugin/images/info.png"; ...@@ -52,10 +52,6 @@ const char ICON_INFO[] = ":/todoplugin/images/info.png";
// Dummy, needs to be changed // Dummy, needs to be changed
const char ICON_TODO[] = ":/todoplugin/images/todo.png"; const char ICON_TODO[] = ":/todoplugin/images/todo.png";
const char ICON_WARNING[] = ":/projectexplorer/images/compile_warning.png";
const char ICON_ERROR[] = ":/projectexplorer/images/compile_error.png";
// Settings entries // Settings entries
const char SETTINGS_GROUP[] = "TodoPlugin"; const char SETTINGS_GROUP[] = "TodoPlugin";
const char SCANNING_SCOPE[] = "ScanningScope"; const char SCANNING_SCOPE[] = "ScanningScope";
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include "constants.h" #include "constants.h"
#include "lineparser.h" #include "lineparser.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <QColorDialog> #include <QColorDialog>
namespace Todo { namespace Todo {
...@@ -91,13 +93,13 @@ void KeywordDialog::setupListWidget(const QString &selectedIcon) ...@@ -91,13 +93,13 @@ void KeywordDialog::setupListWidget(const QString &selectedIcon)
item->setData(Qt::UserRole, infoIconName); item->setData(Qt::UserRole, infoIconName);
ui->listWidget->addItem(item); ui->listWidget->addItem(item);
const QString warningIconName = QLatin1String(Constants::ICON_WARNING); const QString warningIconName = QLatin1String(ProjectExplorer::Constants::ICON_WARNING);
item = new QListWidgetItem(QIcon(warningIconName), item = new QListWidgetItem(QIcon(warningIconName),
QLatin1String("warning")); QLatin1String("warning"));
item->setData(Qt::UserRole, warningIconName); item->setData(Qt::UserRole, warningIconName);
ui->listWidget->addItem(item); ui->listWidget->addItem(item);
const QString errorIconName = QLatin1String(Constants::ICON_ERROR); const QString errorIconName = QLatin1String(ProjectExplorer::Constants::ICON_ERROR);
item = new QListWidgetItem(QIcon(errorIconName), item = new QListWidgetItem(QIcon(errorIconName),
QLatin1String("error")); QLatin1String("error"));
item->setData(Qt::UserRole, errorIconName); item->setData(Qt::UserRole, errorIconName);
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include "settings.h" #include "settings.h"
#include "constants.h" #include "constants.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <QSettings> #include <QSettings>
namespace Todo { namespace Todo {
...@@ -98,7 +100,7 @@ void Settings::setDefault() ...@@ -98,7 +100,7 @@ void Settings::setDefault()
Keyword keyword; Keyword keyword;
keyword.name = QLatin1String("TODO"); keyword.name = QLatin1String("TODO");
keyword.iconResource = QLatin1String(Constants::ICON_WARNING); keyword.iconResource = QLatin1String(ProjectExplorer::Constants::ICON_WARNING);
keyword.color = QColor(QLatin1String(Constants::COLOR_TODO_BG)); keyword.color = QColor(QLatin1String(Constants::COLOR_TODO_BG));
keywords.append(keyword); keywords.append(keyword);
...@@ -108,17 +110,17 @@ void Settings::setDefault() ...@@ -108,17 +110,17 @@ void Settings::setDefault()
keywords.append(keyword); keywords.append(keyword);
keyword.name = QLatin1String("FIXME"); keyword.name = QLatin1String("FIXME");
keyword.iconResource = QLatin1String(Constants::ICON_ERROR); keyword.iconResource = QLatin1String(ProjectExplorer::Constants::ICON_ERROR);
keyword.color = QColor(QLatin1String(Constants::COLOR_FIXME_BG)); keyword.color = QColor(QLatin1String(Constants::COLOR_FIXME_BG));
keywords.append(keyword); keywords.append(keyword);
keyword.name = QLatin1String("BUG"); keyword.name = QLatin1String("BUG");
keyword.iconResource = QLatin1String(Constants::ICON_ERROR); keyword.iconResource = QLatin1String(ProjectExplorer::Constants::ICON_ERROR);
keyword.color = QColor(QLatin1String(Constants::COLOR_BUG_BG)); keyword.color = QColor(QLatin1String(Constants::COLOR_BUG_BG));
keywords.append(keyword); keywords.append(keyword);
keyword.name = QLatin1String("WARNING"); keyword.name = QLatin1String("WARNING");
keyword.iconResource = QLatin1String(Constants::ICON_WARNING); keyword.iconResource = QLatin1String(ProjectExplorer::Constants::ICON_WARNING);
keyword.color = QColor(QLatin1String(Constants::COLOR_WARNING_BG)); keyword.color = QColor(QLatin1String(Constants::COLOR_WARNING_BG));
keywords.append(keyword); keywords.append(keyword);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment