summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@theqtcompany.com>2015-11-23 16:41:54 +0100
committerAlessandro Portale <alessandro.portale@theqtcompany.com>2015-11-25 12:30:52 +0000
commit033862f3057818df3123d07fc6cb34e193250c53 (patch)
tree884de0b3b8ac16e548e4f585bd8c821aa890f8b4 /src
parent00c75cd7ebde4f191c15e92550db369163a95b68 (diff)
downloadqt-creator-033862f3057818df3123d07fc6cb34e193250c53.tar.gz
Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case via a string that is a list of mask/color pairs, we have now a class for it. Icons are now listed in per-plugin *icons.h headers. RunControl::m_icon was The only place left where an icon property was in fact a string. This patch changes that member to be a Utils::Icon. Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs/utils/fancylineedit.cpp6
-rw-r--r--src/libs/utils/historycompleter.cpp4
-rw-r--r--src/libs/utils/icon.cpp (renamed from src/libs/utils/themehelper.cpp)139
-rw-r--r--src/libs/utils/icon.h (renamed from src/libs/utils/themehelper.h)46
-rw-r--r--src/libs/utils/utils-lib.pri9
-rw-r--r--src/libs/utils/utilsicons.h45
-rw-r--r--src/plugins/analyzerbase/analyzerbase.pro3
-rw-r--r--src/plugins/analyzerbase/analyzerbase.qbs1
-rw-r--r--src/plugins/analyzerbase/analyzerconstants.h3
-rw-r--r--src/plugins/analyzerbase/analyzericons.h46
-rw-r--r--src/plugins/analyzerbase/analyzermanager.cpp9
-rw-r--r--src/plugins/analyzerbase/analyzerruncontrol.cpp3
-rw-r--r--src/plugins/analyzerbase/detailederrorview.cpp4
-rw-r--r--src/plugins/android/androidbuildapkwidget.cpp9
-rw-r--r--src/plugins/android/androidmanifesteditorwidget.cpp6
-rw-r--r--src/plugins/android/androidpotentialkit.cpp5
-rw-r--r--src/plugins/android/androidruncontrol.cpp3
-rw-r--r--src/plugins/android/androidsettingswidget.cpp9
-rw-r--r--src/plugins/android/avddialog.cpp6
-rw-r--r--src/plugins/baremetal/baremetalrunconfigurationwidget.cpp6
-rw-r--r--src/plugins/clangcodemodel/clangtextmark.cpp9
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp4
-rw-r--r--src/plugins/coreplugin/coreconstants.h44
-rw-r--r--src/plugins/coreplugin/coreicons.h154
-rw-r--r--src/plugins/coreplugin/coreplugin.pro3
-rw-r--r--src/plugins/coreplugin/coreplugin.qbs1
-rw-r--r--src/plugins/coreplugin/dialogs/newdialog.cpp4
-rw-r--r--src/plugins/coreplugin/editormanager/documentmodel.cpp5
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp7
-rw-r--r--src/plugins/coreplugin/editormanager/editorview.cpp27
-rw-r--r--src/plugins/coreplugin/editormanager/openeditorsview.cpp4
-rw-r--r--src/plugins/coreplugin/editortoolbar.cpp20
-rw-r--r--src/plugins/coreplugin/find/findtoolbar.cpp23
-rw-r--r--src/plugins/coreplugin/find/ifindfilter.cpp10
-rw-r--r--src/plugins/coreplugin/find/searchresultwindow.cpp5
-rw-r--r--src/plugins/coreplugin/images/reload_gray.pngbin299 -> 184 bytes
-rw-r--r--src/plugins/coreplugin/images/reload_gray@2x.pngbin1029 -> 336 bytes
-rw-r--r--src/plugins/coreplugin/infobar.cpp4
-rw-r--r--src/plugins/coreplugin/locator/locatorfiltersfilter.cpp5
-rw-r--r--src/plugins/coreplugin/locator/locatorwidget.cpp7
-rw-r--r--src/plugins/coreplugin/mainwindow.cpp23
-rw-r--r--src/plugins/coreplugin/manhattanstyle.cpp7
-rw-r--r--src/plugins/coreplugin/navigationsubwidget.cpp9
-rw-r--r--src/plugins/coreplugin/navigationwidget.cpp24
-rw-r--r--src/plugins/coreplugin/opendocumentstreeview.cpp7
-rw-r--r--src/plugins/coreplugin/outputpanemanager.cpp16
-rw-r--r--src/plugins/coreplugin/sidebar.cpp22
-rw-r--r--src/plugins/coreplugin/sidebarwidget.cpp10
-rw-r--r--src/plugins/coreplugin/versiondialog.cpp6
-rw-r--r--src/plugins/cppeditor/cppinsertvirtualmethods.cpp5
-rw-r--r--src/plugins/debugger/breakhandler.cpp17
-rw-r--r--src/plugins/debugger/breakwindow.cpp3
-rw-r--r--src/plugins/debugger/debugger.pro3
-rw-r--r--src/plugins/debugger/debugger.qbs1
-rw-r--r--src/plugins/debugger/debuggeractions.cpp5
-rw-r--r--src/plugins/debugger/debuggericons.h86
-rw-r--r--src/plugins/debugger/debuggeroptionspage.cpp4
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp44
-rw-r--r--src/plugins/debugger/debuggerruncontrol.cpp3
-rw-r--r--src/plugins/debugger/debuggertooltipmanager.cpp3
-rw-r--r--src/plugins/debugger/logwindow.cpp5
-rw-r--r--src/plugins/debugger/snapshothandler.cpp5
-rw-r--r--src/plugins/debugger/stackhandler.cpp5
-rw-r--r--src/plugins/debugger/threadshandler.cpp5
-rw-r--r--src/plugins/diffeditor/diffeditor.cpp12
-rw-r--r--src/plugins/diffeditor/diffeditor.pro3
-rw-r--r--src/plugins/diffeditor/diffeditor.qbs1
-rw-r--r--src/plugins/diffeditor/diffeditorconstants.h2
-rw-r--r--src/plugins/diffeditor/diffeditoricons.h49
-rw-r--r--src/plugins/diffeditor/diffview.cpp8
-rw-r--r--src/plugins/git/gitplugin.cpp3
-rw-r--r--src/plugins/git/gitsubmiteditorwidget.cpp5
-rw-r--r--src/plugins/help/help.qbs1
-rw-r--r--src/plugins/help/helpindexfilter.cpp3
-rw-r--r--src/plugins/help/helpwidget.cpp20
-rw-r--r--src/plugins/help/searchwidget.cpp3
-rw-r--r--src/plugins/help/xbelsupport.cpp3
-rw-r--r--src/plugins/imageviewer/imageviewer.cpp11
-rw-r--r--src/plugins/ios/iosruncontrol.cpp4
-rw-r--r--src/plugins/projectexplorer/appoutputpane.cpp23
-rw-r--r--src/plugins/projectexplorer/buildprogress.cpp9
-rw-r--r--src/plugins/projectexplorer/buildstepspage.cpp4
-rw-r--r--src/plugins/projectexplorer/compileoutputwindow.cpp12
-rw-r--r--src/plugins/projectexplorer/devicesupport/desktopdeviceconfigurationwidget.cpp6
-rw-r--r--src/plugins/projectexplorer/foldernavigationwidget.cpp8
-rw-r--r--src/plugins/projectexplorer/kitmodel.cpp9
-rw-r--r--src/plugins/projectexplorer/localapplicationruncontrol.cpp3
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp21
-rw-r--r--src/plugins/projectexplorer/projectexplorer.pro3
-rw-r--r--src/plugins/projectexplorer/projectexplorer.qbs1
-rw-r--r--src/plugins/projectexplorer/projectexplorerconstants.h13
-rw-r--r--src/plugins/projectexplorer/projectexplorericons.h66
-rw-r--r--src/plugins/projectexplorer/projecttreewidget.cpp8
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp10
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h7
-rw-r--r--src/plugins/projectexplorer/runconfigurationaspects.cpp4
-rw-r--r--src/plugins/projectexplorer/task.cpp7
-rw-r--r--src/plugins/projectexplorer/taskhub.cpp7
-rw-r--r--src/plugins/projectexplorer/taskwindow.cpp11
-rw-r--r--src/plugins/pythoneditor/pythoneditorplugin.cpp3
-rw-r--r--src/plugins/qbsprojectmanager/qbsbuildstep.cpp6
-rw-r--r--src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp6
-rw-r--r--src/plugins/qmakeandroidsupport/createandroidmanifestwizard.cpp4
-rw-r--r--src/plugins/qmakeandroidsupport/qmakeandroidbuildapkwidget.cpp6
-rw-r--r--src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp9
-rw-r--r--src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp8
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp6
-rw-r--r--src/plugins/qmakeprojectmanager/qmakestep.cpp5
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp13
-rw-r--r--src/plugins/qmldesigner/components/importmanager/importlabel.cpp10
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp6
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatorview.cpp12
-rw-r--r--src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp11
-rw-r--r--src/plugins/qmldesigner/qmldesigner.qbs1
-rw-r--r--src/plugins/qmldesigner/qmldesignericons.h64
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.pri3
-rw-r--r--src/plugins/qmljstools/qmlconsoleitemdelegate.cpp8
-rw-r--r--src/plugins/qmljstools/qmlconsolepane.cpp11
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp8
-rw-r--r--src/plugins/qtsupport/qtoptionspage.cpp6
-rw-r--r--src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp3
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp6
-rw-r--r--src/plugins/remotelinux/remotelinuxruncontrol.cpp3
-rw-r--r--src/plugins/texteditor/circularclipboardassist.cpp4
-rw-r--r--src/plugins/texteditor/outlinefactory.cpp8
-rw-r--r--src/plugins/todo/keyword.cpp3
-rw-r--r--src/plugins/todo/keyworddialog.cpp3
-rw-r--r--src/plugins/todo/optionsdialog.cpp2
-rw-r--r--src/plugins/todo/todoicons.cpp12
-rw-r--r--src/plugins/todo/todoitemsmodel.cpp1
-rw-r--r--src/plugins/valgrind/callgrindtool.cpp17
-rw-r--r--src/plugins/valgrind/memchecktool.cpp11
-rw-r--r--src/plugins/valgrind/valgrindplugin.cpp5
-rw-r--r--src/plugins/winrt/winrtpackagedeploymentstepwidget.cpp4
-rw-r--r--src/plugins/winrt/winrtruncontrol.cpp3
-rw-r--r--src/shared/help/bookmarkmanager.cpp3
-rw-r--r--src/shared/help/help.pri3
-rw-r--r--src/shared/help/helpicons.h47
-rw-r--r--src/tools/icons/qtcreatoricons.svg3
139 files changed, 1092 insertions, 631 deletions
diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp
index 5c0dc2a88a..c50f0ca0a7 100644
--- a/src/libs/utils/fancylineedit.cpp
+++ b/src/libs/utils/fancylineedit.cpp
@@ -33,8 +33,8 @@
#include "historycompleter.h"
#include "hostosinfo.h"
#include "qtcassert.h"
-#include "themehelper.h"
#include "stylehelper.h"
+#include "utilsicons.h"
#include <QAbstractItemView>
#include <QDebug>
@@ -365,9 +365,7 @@ void FancyLineEdit::setFiltering(bool on)
QLatin1String("edit-clear-locationbar-rtl") :
QLatin1String("edit-clear-locationbar-ltr"),
QIcon::fromTheme(QLatin1String("edit-clear"),
- ThemeHelper::recoloredPixmap(
- QLatin1String(":/core/images/editclear.png"),
- ThemeHelper::inputfieldIconColor())));
+ Icons::EDIT_CLEAR.pixmap()));
setButtonPixmap(Right, icon.pixmap(16));
setButtonVisible(Right, true);
diff --git a/src/libs/utils/historycompleter.cpp b/src/libs/utils/historycompleter.cpp
index fcfb2905bb..17c9630075 100644
--- a/src/libs/utils/historycompleter.cpp
+++ b/src/libs/utils/historycompleter.cpp
@@ -30,6 +30,8 @@
#include "historycompleter.h"
#include "fancylineedit.h"
+#include "theme/theme.h"
+#include "utilsicons.h"
#include "qtcassert.h"
@@ -69,7 +71,7 @@ class HistoryLineDelegate : public QItemDelegate
public:
HistoryLineDelegate(QObject *parent)
: QItemDelegate(parent)
- , pixmap(QLatin1String(":/core/images/editclear.png"))
+ , pixmap(Icons::EDIT_CLEAR.pixmap())
{}
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
diff --git a/src/libs/utils/themehelper.cpp b/src/libs/utils/icon.cpp
index bffeb37f10..a4550d69f5 100644
--- a/src/libs/utils/themehelper.cpp
+++ b/src/libs/utils/icon.cpp
@@ -28,7 +28,8 @@
**
****************************************************************************/
-#include "themehelper.h"
+#include "icon.h"
+#include "qtcassert.h"
#include "theme/theme.h"
#include "stylehelper.h"
@@ -37,6 +38,7 @@
#include <QImage>
#include <QMetaEnum>
#include <QPainter>
+#include <QPaintEngine>
namespace Utils {
@@ -57,29 +59,13 @@ static QPixmap maskToColorAndAlpha(const QPixmap &mask, const QColor &color)
typedef QPair<QPixmap, QColor> MaskAndColor;
typedef QList<MaskAndColor> MasksAndColors;
-static MasksAndColors masksAndColors(const QString &mask, int dpr)
+static MasksAndColors masksAndColors(const Icon &icon, int dpr)
{
MasksAndColors result;
- const QStringList list = mask.split(QLatin1Char(','));
- for (QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
- const QStringList items = (*it).split(QLatin1Char('|'));
- const QString fileName = items.first().trimmed();
- QColor color = creatorTheme()->color(Theme::IconsBaseColor);
- if (items.count() > 1) {
- const QString colorName = items.at(1);
- static const QMetaObject &m = Theme::staticMetaObject;
- static const QMetaEnum colorEnum = m.enumerator(m.indexOfEnumerator("Color"));
- bool keyFound = false;
- const int colorEnumKey = colorEnum.keyToValue(colorName.toLatin1().constData(), &keyFound);
- if (keyFound) {
- color = creatorTheme()->color(static_cast<Theme::Color>(colorEnumKey));
- } else {
- const QColor colorFromName(colorName);
- if (colorFromName.isValid())
- color = colorFromName;
- }
- }
- const QString dprFileName = StyleHelper::availableImageResolutions(fileName).contains(dpr) ?
+ for (const IconMaskAndColor &i: icon) {
+ const QString &fileName = i.first;
+ const QColor color = creatorTheme()->color(i.second);
+ const QString dprFileName = StyleHelper::availableImageResolutions(i.first).contains(dpr) ?
StyleHelper::imageFileWithResolution(fileName, dpr) : fileName;
result.append(qMakePair(QPixmap(dprFileName), color));
}
@@ -106,7 +92,7 @@ static QPixmap combinedMask(const MasksAndColors &masks)
QPixmap result(masks.first().first);
QPainter p(&result);
p.setCompositionMode(QPainter::CompositionMode_Darken);
- MasksAndColors::const_iterator maskImage = masks.constBegin();
+ auto maskImage = masks.constBegin();
maskImage++;
for (;maskImage != masks.constEnd(); ++maskImage) {
p.save();
@@ -120,7 +106,7 @@ static QPixmap combinedMask(const MasksAndColors &masks)
return result;
}
-static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedMask)
+static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedMask, bool shadow)
{
QPixmap result(combinedMask.size());
result.setDevicePixelRatio(combinedMask.devicePixelRatio());
@@ -140,54 +126,97 @@ static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedM
p.drawPixmap(0, 0, maskToColorAndAlpha((*maskImage).first, (*maskImage).second));
}
- const QPixmap shadowMask = maskToColorAndAlpha(combinedMask, Qt::black);
- p.setCompositionMode(QPainter::CompositionMode_DestinationOver);
- p.setOpacity(0.05);
- p.drawPixmap(QPointF(0, -0.501), shadowMask);
- p.drawPixmap(QPointF(-0.501, 0), shadowMask);
- p.drawPixmap(QPointF(0.5, 0), shadowMask);
- p.drawPixmap(QPointF(0.5, 0.5), shadowMask);
- p.drawPixmap(QPointF(-0.501, 0.5), shadowMask);
- p.setOpacity(0.2);
- p.drawPixmap(0, 1, shadowMask);
+ if (shadow) {
+ const QPixmap shadowMask = maskToColorAndAlpha(combinedMask, Qt::black);
+ p.setCompositionMode(QPainter::CompositionMode_DestinationOver);
+ p.setOpacity(0.05);
+ p.drawPixmap(QPointF(0, -0.501), shadowMask);
+ p.drawPixmap(QPointF(-0.501, 0), shadowMask);
+ p.drawPixmap(QPointF(0.5, 0), shadowMask);
+ p.drawPixmap(QPointF(0.5, 0.5), shadowMask);
+ p.drawPixmap(QPointF(-0.501, 0.5), shadowMask);
+ p.setOpacity(0.2);
+ p.drawPixmap(0, 1, shadowMask);
+ }
p.end();
return result;
}
-QIcon ThemeHelper::themedIcon(const QString &mask)
+static QPixmap combinedPlainPixmaps(const QVector<IconMaskAndColor> &images)
{
- QIcon result;
- const MasksAndColors masks = masksAndColors(mask, qRound(qApp->devicePixelRatio()));
- const QPixmap combinedMask = Utils::combinedMask(masks);
- result.addPixmap(masksToIcon(masks, combinedMask));
-
- QColor disabledColor = creatorTheme()->palette().mid().color();
- disabledColor.setAlphaF(0.6);
- result.addPixmap(maskToColorAndAlpha(combinedMask, disabledColor), QIcon::Disabled);
+ QPixmap result(StyleHelper::dpiSpecificImageFile(images.first().first));
+ auto pixmap = images.constBegin();
+ pixmap++;
+ for (;pixmap != images.constEnd(); ++pixmap) {
+ const QPixmap overlay(StyleHelper::dpiSpecificImageFile((*pixmap).first));
+ result.paintEngine()->painter()->drawPixmap(0, 0, overlay);
+ }
return result;
}
-QPixmap ThemeHelper::themedIconPixmap(const QString &mask)
+Icon::Icon()
+{
+}
+
+Icon::Icon(std::initializer_list<IconMaskAndColor> args, Style style)
+ : QVector<IconMaskAndColor>(args)
+ , m_style(style)
+{
+}
+
+Icon::Icon(const QString &imageFileName)
+ : m_style(Style::Plain)
{
- const MasksAndColors masks =
- masksAndColors(mask, qRound(qApp->devicePixelRatio()));
- const QPixmap combinedMask = Utils::combinedMask(masks);
- return masksToIcon(masks, combinedMask);
+ append({imageFileName, Theme::Color(-1)});
+}
+
+QIcon Icon::icon() const
+{
+ if (isEmpty()) {
+ return QIcon();
+ } else if (m_style == Style::Plain) {
+ return QIcon(combinedPlainPixmaps(*this));
+ } else {
+ QIcon result;
+ const MasksAndColors masks = masksAndColors(*this, qRound(qApp->devicePixelRatio()));
+ const QPixmap combinedMask = Utils::combinedMask(masks);
+ result.addPixmap(masksToIcon(masks, combinedMask, m_style == Style::TintedWithShadow));
+
+ QColor disabledColor = creatorTheme()->palette().mid().color();
+ disabledColor.setAlphaF(0.6);
+ result.addPixmap(maskToColorAndAlpha(combinedMask, disabledColor), QIcon::Disabled);
+ return result;
+ }
+}
+
+QPixmap Icon::pixmap() const
+{
+ if (isEmpty()) {
+ return QPixmap();
+ } else if (m_style == Style::Plain) {
+ return combinedPlainPixmaps(*this);
+ } else {
+ const MasksAndColors masks =
+ masksAndColors(*this, qRound(qApp->devicePixelRatio()));
+ const QPixmap combinedMask = Utils::combinedMask(masks);
+ return masksToIcon(masks, combinedMask, m_style == Style::TintedWithShadow);
+ }
}
-QPixmap ThemeHelper::recoloredPixmap(const QString &maskImage, const QColor &color)
+QString Icon::imageFileName() const
{
- return maskToColorAndAlpha(QPixmap(Utils::StyleHelper::dpiSpecificImageFile(maskImage)), color);
+ QTC_ASSERT(length() == 1, return QString());
+ return first().first;
}
-QColor ThemeHelper::inputfieldIconColor()
+Icon& Icon::operator=(const Icon &other)
{
- // See QLineEdit::paintEvent
- QColor color = QApplication::palette().text().color();
- color.setAlpha(128);
- return color;
+ clear();
+ append(other);
+ m_style = other.m_style;
+ return *this;
}
} // namespace Utils
diff --git a/src/libs/utils/themehelper.h b/src/libs/utils/icon.h
index b72992a743..fb899353c7 100644
--- a/src/libs/utils/themehelper.h
+++ b/src/libs/utils/icon.h
@@ -32,29 +32,47 @@
#define THEMEHELPER_H
#include "utils_global.h"
+#include "theme/theme.h"
+
+#include <QPair>
+#include <QVector>
QT_FORWARD_DECLARE_CLASS(QColor)
QT_FORWARD_DECLARE_CLASS(QIcon)
QT_FORWARD_DECLARE_CLASS(QPixmap)
+QT_FORWARD_DECLARE_CLASS(QString)
namespace Utils {
-class QTCREATOR_UTILS_EXPORT ThemeHelper
+typedef QPair<QString, Theme::Color> IconMaskAndColor;
+
+// Returns a recolored icon with shadow and custom disabled state for a
+// series of grayscalemask|Theme::Color mask pairs
+class QTCREATOR_UTILS_EXPORT Icon : public QVector<IconMaskAndColor>
{
public:
- // Returns a recolored icon with shadow and custom disabled state for a
- // grayscale mask. The mask can range from a single image filename to
- // a list of filename|color,... pairs.
- // The color can be a Theme::Color enum key name. If invalid, it is run
- // through QColor(const QString &name).
- static QIcon themedIcon(const QString &mask);
- // Same as themedIcon() but without disabled state.
- static QPixmap themedIconPixmap(const QString &mask);
-
- // Simple recoloring of a mask. No shadow. maskImage is a single file.
- static QPixmap recoloredPixmap(const QString &maskImage, const QColor &color);
-
- static QColor inputfieldIconColor();
+ enum class Style {
+ Plain,
+ Tinted,
+ TintedWithShadow
+ };
+
+ Icon();
+ Icon(std::initializer_list<IconMaskAndColor> args, Style style = Style::TintedWithShadow);
+ Icon(const QString &imageFileName);
+
+ QIcon icon() const;
+ // Same as icon() but without disabled state.
+ QPixmap pixmap() const;
+
+ // Try to avoid it. it is just there for special API cases in Qt Creator
+ // where icons are still defined as filename.
+ QString imageFileName() const;
+
+ Icon& Icon::operator=(const Icon &other);
+
+private:
+ Style m_style = Style::Plain;
};
} // namespace Utils
diff --git a/src/libs/utils/utils-lib.pri b/src/libs/utils/utils-lib.pri
index 9c6ea3a5fd..c305e5b385 100644
--- a/src/libs/utils/utils-lib.pri
+++ b/src/libs/utils/utils-lib.pri
@@ -89,12 +89,12 @@ SOURCES += $$PWD/environment.cpp \
$$PWD/proxycredentialsdialog.cpp \
$$PWD/macroexpander.cpp \
$$PWD/theme/theme.cpp \
- $$PWD/themehelper.cpp \
$$PWD/progressindicator.cpp \
$$PWD/fadingindicator.cpp \
$$PWD/overridecursor.cpp \
$$PWD/categorysortfiltermodel.cpp \
- $$PWD/dropsupport.cpp
+ $$PWD/dropsupport.cpp \
+ $$PWD/icon.cpp
win32:SOURCES += $$PWD/consoleprocess_win.cpp
else:SOURCES += $$PWD/consoleprocess_unix.cpp
@@ -194,13 +194,14 @@ HEADERS += \
$$PWD/macroexpander.h \
$$PWD/theme/theme.h \
$$PWD/theme/theme_p.h \
- $$PWD/themehelper.h \
$$PWD/progressindicator.h \
$$PWD/fadingindicator.h \
$$PWD/executeondestruction.h \
$$PWD/overridecursor.h \
$$PWD/categorysortfiltermodel.h \
- $$PWD/dropsupport.h
+ $$PWD/dropsupport.h \
+ $$PWD/utilsicons.h \
+ $$PWD/icon.h
FORMS += $$PWD/filewizardpage.ui \
$$PWD/projectintropage.ui \
diff --git a/src/libs/utils/utilsicons.h b/src/libs/utils/utilsicons.h
new file mode 100644
index 0000000000..a6ed51ea78
--- /dev/null
+++ b/src/libs/utils/utilsicons.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms and
+** conditions see http://www.qt.io/terms-conditions. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef UTILSICONS_H
+#define UTILSICONS_H
+
+#include "icon.h"
+
+namespace Utils {
+namespace Icons {
+
+const Utils::Icon EDIT_CLEAR({
+ {QLatin1String(":/core/images/editclear.png"), Utils::Theme::BackgroundColorHover}}, Utils::Icon::Style::Tinted);
+
+} // namespace Icons
+} // namespace Utils
+
+#endif // UTILSICONS_H
diff --git a/src/plugins/analyzerbase/analyzerbase.pro b/src/plugins/analyzerbase/analyzerbase.pro
index 04bfc7c8df..923f59d398 100644
--- a/src/plugins/analyzerbase/analyzerbase.pro
+++ b/src/plugins/analyzerbase/analyzerbase.pro
@@ -29,7 +29,8 @@ HEADERS += \
analyzerutils.h \
detailederrorview.h \
diagnosticlocation.h \
- startremotedialog.h
+ startremotedialog.h \
+ analyzericons.h
RESOURCES += \
analyzerbase.qrc
diff --git a/src/plugins/analyzerbase/analyzerbase.qbs b/src/plugins/analyzerbase/analyzerbase.qbs
index b54dcaf9c7..43da9d10e6 100644
--- a/src/plugins/analyzerbase/analyzerbase.qbs
+++ b/src/plugins/analyzerbase/analyzerbase.qbs
@@ -16,6 +16,7 @@ QtcPlugin {
"analyzerbase.qrc",
"analyzerbase_global.h",
"analyzerconstants.h",
+ "analyzericons",
"analyzermanager.cpp",
"analyzermanager.h",
"analyzerplugin.cpp",
diff --git a/src/plugins/analyzerbase/analyzerconstants.h b/src/plugins/analyzerbase/analyzerconstants.h
index a38b939953..955506233d 100644
--- a/src/plugins/analyzerbase/analyzerconstants.h
+++ b/src/plugins/analyzerbase/analyzerconstants.h
@@ -53,9 +53,6 @@ const char G_ANALYZER_TOOLS[] = "Menu.Group.Analyzer.Tools";
const char G_ANALYZER_REMOTE_TOOLS[] = "Menu.Group.Analyzer.RemoteTools";
const char G_ANALYZER_OPTIONS[] = "Menu.Group.Analyzer.Options";
-// Manager controls.
-const char ANALYZER_CONTROL_START_ICON[] = ":/images/analyzer_overlay_small.png,:/core/images/run_overlay_small.png|IconsRunColor";
-
const char ANALYZERTASK_ID[] = "Analyzer.TaskId";
} // namespace Constants
diff --git a/src/plugins/analyzerbase/analyzericons.h b/src/plugins/analyzerbase/analyzericons.h
new file mode 100644
index 0000000000..cf6c5065e4
--- /dev/null
+++ b/src/plugins/analyzerbase/analyzericons.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms and
+** conditions see http://www.qt.io/terms-conditions. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef ANALYZERICONS_H
+#define ANALYZERICONS_H
+
+#include <utils/icon.h>
+
+namespace Analyzer {
+namespace Icons {
+
+const Utils::Icon ANALYZER_CONTROL_START({
+ {QLatin1String(":/images/analyzer_overlay_small.png"), Utils::Theme::IconsBaseColor},
+ {QLatin1String(":/core/images/run_overlay_small.png"), Utils::Theme::IconsRunColor}});
+
+} // namespace Icons
+} // namespace Analyzer
+
+#endif // ANALYZERICONS_H
diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp
index 83d867fdfa..34b02e4371 100644
--- a/src/plugins/analyzerbase/analyzermanager.cpp
+++ b/src/plugins/analyzerbase/analyzermanager.cpp
@@ -31,6 +31,7 @@
#include "analyzermanager.h"
+#include "analyzericons.h"
#include "analyzerplugin.h"
#include "analyzerstartparameters.h"
#include "ianalyzertool.h"
@@ -49,6 +50,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <projectexplorer/projectexplorer.h>
+#include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/project.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/session.h>
@@ -61,7 +63,6 @@
#include <utils/qtcassert.h>
#include <utils/checkablemessagebox.h>
#include <utils/statuslabel.h>
-#include <utils/themehelper.h>
#include <QVariant>
#include <QDebug>
@@ -241,16 +242,14 @@ void AnalyzerManagerPrivate::setupActions()
menubar->addMenu(mtools, m_menu);
m_startAction = new QAction(tr("Start"), m_menu);
- m_startAction->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(ANALYZER_CONTROL_START_ICON)));
+ m_startAction->setIcon(Analyzer::Icons::ANALYZER_CONTROL_START.icon());
ActionManager::registerAction(m_startAction, "Analyzer.Start");
connect(m_startAction, &QAction::triggered,
this, &AnalyzerManagerPrivate::startCurrentTool);
m_stopAction = new QAction(tr("Stop"), m_menu);
m_stopAction->setEnabled(false);
- m_stopAction->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(ProjectExplorer::Constants::ICON_STOP_SMALL)));
+ m_stopAction->setIcon(ProjectExplorer::Icons::STOP_SMALL.icon());
command = ActionManager::registerAction(m_stopAction, "Analyzer.Stop");
m_menu->addAction(command, G_ANALYZER_CONTROL);
diff --git a/src/plugins/analyzerbase/analyzerruncontrol.cpp b/src/plugins/analyzerbase/analyzerruncontrol.cpp
index 7cfd7a5ae0..924642f054 100644
--- a/src/plugins/analyzerbase/analyzerruncontrol.cpp
+++ b/src/plugins/analyzerbase/analyzerruncontrol.cpp
@@ -29,6 +29,7 @@
**
****************************************************************************/
+#include "analyzericons.h"
#include "analyzerruncontrol.h"
#include "ianalyzertool.h"
#include "analyzermanager.h"
@@ -51,7 +52,7 @@ AnalyzerRunControl::AnalyzerRunControl(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration)
: RunControl(runConfiguration, sp.runMode)
{
- setIcon(QLatin1String(Constants::ANALYZER_CONTROL_START_ICON));
+ setIcon(Icons::ANALYZER_CONTROL_START);
m_sp = sp;
diff --git a/src/plugins/analyzerbase/detailederrorview.cpp b/src/plugins/analyzerbase/detailederrorview.cpp
index 884c6edfb9..799b74c911 100644
--- a/src/plugins/analyzerbase/detailederrorview.cpp
+++ b/src/plugins/analyzerbase/detailederrorview.cpp
@@ -32,7 +32,7 @@
#include "diagnosticlocation.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/editormanager/editormanager.h>
#include <utils/qtcassert.h>
@@ -132,7 +132,7 @@ DetailedErrorView::DetailedErrorView(QWidget *parent) :
setItemDelegateForColumn(LocationColumn, new Internal::DetailedErrorDelegate(this));
m_copyAction->setText(tr("Copy"));
- m_copyAction->setIcon(QIcon(QLatin1String(Core::Constants::ICON_COPY)));
+ m_copyAction->setIcon(Core::Icons::COPY.icon());
m_copyAction->setShortcut(QKeySequence::Copy);
m_copyAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
connect(m_copyAction, &QAction::triggered, [this] {
diff --git a/src/plugins/android/androidbuildapkwidget.cpp b/src/plugins/android/androidbuildapkwidget.cpp
index 81474c9fbe..fb93d3b769 100644
--- a/src/plugins/android/androidbuildapkwidget.cpp
+++ b/src/plugins/android/androidbuildapkwidget.cpp
@@ -36,7 +36,7 @@
#include "androidmanager.h"
#include "ui_androidbuildapkwidget.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
@@ -44,7 +44,6 @@
#include <utils/fancylineedit.h>
#include <utils/pathchooser.h>
-#include <utils/themehelper.h>
#include <QFileDialog>
@@ -91,12 +90,10 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
m_ui->KeystoreLocationPathChooser->setInitialBrowsePathBackup(QDir::homePath());
m_ui->KeystoreLocationPathChooser->setPromptDialogFilter(tr("Keystore files (*.keystore *.jks)"));
m_ui->KeystoreLocationPathChooser->setPromptDialogTitle(tr("Select Keystore File"));
- m_ui->signingDebugWarningIcon->setPixmap(
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
+ m_ui->signingDebugWarningIcon->setPixmap(Core::Icons::WARNING.pixmap());
m_ui->signingDebugWarningIcon->hide();
m_ui->signingDebugWarningLabel->hide();
- m_ui->signingDebugDeployErrorIcon->setPixmap(
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_ERROR)));
+ m_ui->signingDebugDeployErrorIcon->setPixmap(Core::Icons::ERROR.pixmap());
signPackageCheckBoxToggled(m_step->signPackage());
m_ui->useGradleCheckBox->setChecked(m_step->useGradle());
diff --git a/src/plugins/android/androidmanifesteditorwidget.cpp b/src/plugins/android/androidmanifesteditorwidget.cpp
index ce5929e992..a1e5d31e5f 100644
--- a/src/plugins/android/androidmanifesteditorwidget.cpp
+++ b/src/plugins/android/androidmanifesteditorwidget.cpp
@@ -35,7 +35,7 @@
#include "androidmanager.h"
#include "androidqtsupport.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/infobar.h>
#include <coreplugin/editormanager/ieditor.h>
@@ -50,7 +50,6 @@
#include <texteditor/texteditoractionhandler.h>
#include <texteditor/texteditor.h>
#include <utils/algorithm.h>
-#include <utils/themehelper.h>
#include <QLineEdit>
#include <QFileInfo>
@@ -167,8 +166,7 @@ void AndroidManifestEditorWidget::initializePage()
m_packageNameWarning->setVisible(false);
m_packageNameWarningIcon = new QLabel;
- m_packageNameWarningIcon->setPixmap(
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
+ m_packageNameWarningIcon->setPixmap(Core::Icons::WARNING.pixmap());
m_packageNameWarningIcon->setVisible(false);
m_packageNameWarningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
diff --git a/src/plugins/android/androidpotentialkit.cpp b/src/plugins/android/androidpotentialkit.cpp
index 086787fb69..2e35d7858b 100644
--- a/src/plugins/android/androidpotentialkit.cpp
+++ b/src/plugins/android/androidpotentialkit.cpp
@@ -33,8 +33,7 @@
#include "androidconfigurations.h"
#include <utils/detailswidget.h>
-#include <utils/themehelper.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/kit.h>
@@ -93,7 +92,7 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
: Utils::DetailsWidget(parent)
{
setSummaryText(QLatin1String("<b>Android has not been configured. Create Android kits.</b>"));
- setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING)));
+ setIcon(Core::Icons::WARNING.icon());
//detailsWidget->setState(Utils::DetailsWidget::NoSummary);
QWidget *mainWidget = new QWidget(this);
setWidget(mainWidget);
diff --git a/src/plugins/android/androidruncontrol.cpp b/src/plugins/android/androidruncontrol.cpp
index 41893846e2..5517b8b730 100644
--- a/src/plugins/android/androidruncontrol.cpp
+++ b/src/plugins/android/androidruncontrol.cpp
@@ -35,6 +35,7 @@
#include "androidrunner.h"
#include <projectexplorer/projectexplorerconstants.h>
+#include <projectexplorer/projectexplorericons.h>
using namespace ProjectExplorer;
@@ -46,7 +47,7 @@ AndroidRunControl::AndroidRunControl(AndroidRunConfiguration *rc)
, m_runner(new AndroidRunner(this, rc, ProjectExplorer::Constants::NORMAL_RUN_MODE))
, m_running(false)
{
- setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
+ setIcon(Icons::RUN_SMALL);
}
AndroidRunControl::~AndroidRunControl()
diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp
index c57332902c..d5e2593e04 100644
--- a/src/plugins/android/androidsettingswidget.cpp
+++ b/src/plugins/android/androidsettingswidget.cpp
@@ -36,11 +36,10 @@
#include "androidconstants.h"
#include "androidtoolchain.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/environment.h>
#include <utils/hostosinfo.h>
#include <utils/pathchooser.h>
-#include <utils/themehelper.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/kitinformation.h>
@@ -176,13 +175,11 @@ AndroidSettingsWidget::AndroidSettingsWidget(QWidget *parent)
m_ui->downloadAntToolButton->setVisible(!Utils::HostOsInfo::isLinuxHost());
m_ui->downloadOpenJDKToolButton->setVisible(!Utils::HostOsInfo::isLinuxHost());
- const QPixmap warningPixmap = Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_WARNING));
+ const QPixmap warningPixmap = Core::Icons::WARNING.pixmap();
m_ui->jdkWarningIconLabel->setPixmap(warningPixmap);
m_ui->kitWarningIconLabel->setPixmap(warningPixmap);
- const QPixmap errorPixmap = Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_ERROR));
+ const QPixmap errorPixmap = Core::Icons::ERROR.pixmap();
m_ui->sdkWarningIconLabel->setPixmap(errorPixmap);
m_ui->gdbWarningIconLabel->setPixmap(errorPixmap);
m_ui->ndkWarningIconLabel->setPixmap(errorPixmap);
diff --git a/src/plugins/android/avddialog.cpp b/src/plugins/android/avddialog.cpp
index d8e3be5de3..7720add3e3 100644
--- a/src/plugins/android/avddialog.cpp
+++ b/src/plugins/android/avddialog.cpp
@@ -31,9 +31,8 @@
#include "avddialog.h"
#include "androidconfigurations.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/tooltip/tooltip.h>
-#include <utils/themehelper.h>
#include <QKeyEvent>
#include <QMessageBox>
@@ -63,8 +62,7 @@ AvdDialog::AvdDialog(int minApiLevel, const QString &targetArch, const AndroidCo
m_avdDialog.nameLineEdit->setValidator(v);
m_avdDialog.nameLineEdit->installEventFilter(this);
- m_avdDialog.warningIcon->setPixmap(Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ m_avdDialog.warningIcon->setPixmap(Core::Icons::WARNING.pixmap());
updateApiLevelComboBox();
diff --git a/src/plugins/baremetal/baremetalrunconfigurationwidget.cpp b/src/plugins/baremetal/baremetalrunconfigurationwidget.cpp
index 8d9e392547..11c231e79a 100644
--- a/src/plugins/baremetal/baremetalrunconfigurationwidget.cpp
+++ b/src/plugins/baremetal/baremetalrunconfigurationwidget.cpp
@@ -31,9 +31,8 @@
#include "baremetalrunconfigurationwidget.h"
#include "baremetalrunconfiguration.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/detailswidget.h>
-#include <utils/themehelper.h>
#include <QLineEdit>
#include <QFormLayout>
@@ -91,8 +90,7 @@ void BareMetalRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout)
{
QHBoxLayout * const hl = new QHBoxLayout;
hl->addStretch();
- d->disabledIcon.setPixmap(Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ d->disabledIcon.setPixmap(Core::Icons::WARNING.pixmap());
hl->addWidget(&d->disabledIcon);
d->disabledReason.setVisible(false);
hl->addWidget(&d->disabledReason);
diff --git a/src/plugins/clangcodemodel/clangtextmark.cpp b/src/plugins/clangcodemodel/clangtextmark.cpp
index 64a2d91bcc..38b7228795 100644
--- a/src/plugins/clangcodemodel/clangtextmark.cpp
+++ b/src/plugins/clangcodemodel/clangtextmark.cpp
@@ -32,14 +32,11 @@
#include "constants.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <QString>
#include <QApplication>
-#include <utils/tooltip/tooltip.h>
-#include <utils/themehelper.h>
-
namespace ClangCodeModel {
namespace {
@@ -74,8 +71,8 @@ ClangTextMark::ClangTextMark(const QString &fileName, int lineNumber, ClangBackE
void ClangTextMark::setIcon(ClangBackEnd::DiagnosticSeverity severity)
{
- static const QIcon errorIcon{Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_ERROR))};
- static const QIcon warningIcon{Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING))};
+ static const QIcon errorIcon{Core::Icons::ERROR.icon()};
+ static const QIcon warningIcon{Core::Icons::WARNING.icon()};
if (isWarningOrNote(severity))
TextMark::setIcon(warningIcon);
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
index c0df82f2b7..acda86c5d4 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
@@ -34,7 +34,7 @@
#include "cmakeproject.h"
#include "cmakeprojectconstants.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/helpmanager.h>
#include <qtsupport/qtkitinformation.h>
#include <projectexplorer/localenvironmentaspect.h>
@@ -241,7 +241,7 @@ CMakeRunConfigurationWidget::CMakeRunConfigurationWidget(CMakeRunConfiguration *
QToolButton *resetButton = new QToolButton();
resetButton->setToolTip(tr("Reset to Default"));
- resetButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RESET)));
+ resetButton->setIcon(Core::Icons::RESET.icon());
QHBoxLayout *boxlayout = new QHBoxLayout();
boxlayout->addWidget(m_workingDirectoryEdit);
diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h
index 8d6c2d8bee..6637ec8915 100644
--- a/src/plugins/coreplugin/coreconstants.h
+++ b/src/plugins/coreplugin/coreconstants.h
@@ -184,50 +184,6 @@ const char G_HELP_SUPPORT[] = "QtCreator.Group.Help.Supprt";
const char G_HELP_ABOUT[] = "QtCreator.Group.Help.About";
const char G_HELP_UPDATES[] = "QtCreator.Group.Help.Updates";
-const char ICON_MINUS[] = ":/core/images/minus.png";
-const char ICON_PLUS[] = ":/core/images/plus.png";
-const char ICON_NEWFILE[] = ":/core/images/filenew.png";
-const char ICON_OPENFILE[] = ":/core/images/fileopen.png";
-const char ICON_SAVEFILE[] = ":/core/images/filesave.png";
-const char ICON_UNDO[] = ":/core/images/undo.png";
-const char ICON_REDO[] = ":/core/images/redo.png";
-const char ICON_COPY[] = ":/core/images/editcopy.png";
-const char ICON_PASTE[] = ":/core/images/editpaste.png";
-const char ICON_CUT[] = ":/core/images/editcut.png";
-const char ICON_NEXT[] = ":/core/images/next.png|IconsNavigationArrowsColor";
-const char ICON_PREV[] = ":/core/images/prev.png|IconsNavigationArrowsColor";
-const char ICON_DIR[] = ":/core/images/dir.png";
-const char ICON_CLEAN_PANE[] = ":/core/images/clean_pane_small.png";
-const char ICON_CLEAR[] = ":/core/images/clear.png";
-const char ICON_RESET[] = ":/core/images/reset.png";
-const char ICON_RELOAD_GRAY[] = ":/core/images/reload_gray.png";
-const char ICON_MAGNIFIER[] = ":/core/images/magnifier.png";
-const char ICON_TOGGLE_SIDEBAR[] = ":/core/images/sidebaricon.png";
-const char ICON_BUTTON_CLOSE[] = ":/core/images/button_close.png";
-const char ICON_CLOSE_BUTTON[] = ":/core/images/closebutton.png";
-const char ICON_DARK_CLOSE_BUTTON[] = ":/core/images/darkclosebutton.png";
-const char ICON_DARK_CLOSE[] = ":/core/images/darkclose.png";
-const char ICON_SPLIT_HORIZONTAL[] = ":/core/images/splitbutton_horizontal.png";
-const char ICON_SPLIT_VERTICAL[] = ":/core/images/splitbutton_vertical.png";
-const char ICON_CLOSE_SPLIT_TOP[] = ":/core/images/splitbutton_closetop.png";
-const char ICON_CLOSE_SPLIT_BOTTOM[] = ":/core/images/splitbutton_closebottom.png";
-const char ICON_CLOSE_SPLIT_LEFT[] = ":/core/images/splitbutton_closeleft.png";
-const char ICON_CLOSE_SPLIT_RIGHT[] = ":/core/images/splitbutton_closeright.png";
-const char ICON_FILTER[] = ":/core/images/filtericon.png";
-const char ICON_LINK[] = ":/core/images/linkicon.png";
-const char ICON_PAUSE[] = ":/core/images/pause.png";
-const char ICON_QTLOGO_32[] = ":/core/images/logo/32/QtProject-qtcreator.png";
-const char ICON_QTLOGO_64[] = ":/core/images/logo/64/QtProject-qtcreator.png";
-const char ICON_QTLOGO_128[] = ":/core/images/logo/128/QtProject-qtcreator.png";
-const char ICON_WARNING[] = ":/core/images/warning.png|IconsWarningColor";
-const char ICON_ERROR[] = ":/core/images/error.png|IconsErrorColor";
-const char ICON_INFO[] = ":/core/images/info.png|IconsInfoColor";
-const char ICON_DEBUG_START_SMALL[] = ":/core/images/debugger_overlay_small.png|IconsDebugColor,:/core/images/run_overlay_small.png|IconsRunColor";
-const char ICON_DEBUG_EXIT_SMALL[] = ":/core/images/debugger_overlay_small.png|IconsDebugColor,:/core/images/stop_overlay_small.png|IconsStopColor";
-const char ICON_DEBUG_INTERRUPT_SMALL[] = ":/core/images/debugger_overlay_small.png|IconsDebugColor,:/core/images/interrupt_overlay_small.png|IconsInterruptColor";
-const char ICON_DEBUG_CONTINUE_SMALL[] = ":/core/images/debugger_overlay_small.png|IconsDebugColor,:/core/images/continue_overlay_small.png|IconsRunColor";
-const char ICON_ZOOM[] = ":/core/images/zoom.png";
-
const char WIZARD_CATEGORY_QT[] = "R.Qt";
const char WIZARD_TR_CATEGORY_QT[] = QT_TRANSLATE_NOOP("Core", "Qt");
const char WIZARD_KIND_UNKNOWN[] = "unknown";
diff --git a/src/plugins/coreplugin/coreicons.h b/src/plugins/coreplugin/coreicons.h
new file mode 100644
index 0000000000..917fc6930e
--- /dev/null
+++ b/src/plugins/coreplugin/coreicons.h
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms and
+** conditions see http://www.qt.io/terms-conditions. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef COREICONS_H
+#define COREICONS_H
+
+#include <utils/icon.h>
+
+namespace Core {
+namespace Icons {
+
+const Utils::Icon NEWFILE(
+ QLatin1String(":/core/images/filenew.png"));
+const Utils::Icon OPENFILE(
+ QLatin1String(":/core/images/fileopen.png"));
+const Utils::Icon SAVEFILE(
+ QLatin1String(":/core/images/filesave.png"));
+const Utils::Icon UNDO(
+ QLatin1String(":/core/images/undo.png"));
+const Utils::Icon REDO(
+ QLatin1String(":/core/images/redo.png"));
+const Utils::Icon COPY(
+ QLatin1String(":/core/images/editcopy.png"));
+const Utils::Icon PASTE(
+ QLatin1String(":/core/images/editpaste.png"));
+const Utils::Icon CUT(
+ QLatin1String(":/core/images/editcut.png"));
+const Utils::Icon DIR(
+ QLatin1String(":/core/images/dir.png"));
+const Utils::Icon CLEAR(
+ QLatin1String(":/core/images/clear.png"));
+const Utils::Icon RESET(
+ QLatin1String(":/core/images/reset.png"));
+const Utils::Icon CLOSE_BUTTON(
+ QLatin1String(":/core/images/closebutton.png"));
+const Utils::Icon DARK_CLOSE_BUTTON(
+ QLatin1String(":/core/images/darkclosebutton.png"));
+const Utils::Icon DARK_CLOSE(
+ QLatin1String(":/core/images/darkclose.png"));
+const Utils::Icon LOCKED(
+ QLatin1String(":/core/images/locked.png"));
+const Utils::Icon UNLOCKED(
+ QLatin1String(":/core/images/unlocked.png"));
+const Utils::Icon FIND_CASE_INSENSITIVELY(
+ QLatin1String(":/find/images/casesensitively.png"));
+const Utils::Icon FIND_WHOLE_WORD(
+ QLatin1String(":/find/images/wholewords.png"));
+const Utils::Icon FIND_REGEXP(
+ QLatin1String(":/find/images/regexp.png"));
+const Utils::Icon FIND_PRESERVE_CASE(
+ QLatin1String(":/find/images/preservecase.png"));
+const Utils::Icon QTLOGO_32(
+ QLatin1String(":/core/images/logo/32/QtProject-qtcreator.png"));
+const Utils::Icon QTLOGO_64(
+ QLatin1String(":/core/images/logo/64/QtProject-qtcreator.png"));
+const Utils::Icon QTLOGO_128(
+ QLatin1String(":/core/images/logo/128/QtProject-qtcreator.png"));
+
+const Utils::Icon ARROW_UP({
+ {QLatin1String(":/core/images/arrowup.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon ARROW_DOWN({
+ {QLatin1String(":/core/images/arrowdown.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon MINUS({
+ {QLatin1String(":/core/images/minus.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon PLUS({
+ {QLatin1String(":/core/images/plus.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon NEXT({
+ {QLatin1String(":/core/images/next.png"), Utils::Theme::IconsNavigationArrowsColor}});
+const Utils::Icon PREV({
+ {QLatin1String(":/core/images/prev.png"), Utils::Theme::IconsNavigationArrowsColor}});
+const Utils::Icon MAGNIFIER({
+ {QLatin1String(":/core/images/magnifier.png"), Utils::Theme::BackgroundColorHover}}, Utils::Icon::Style::Tinted);
+const Utils::Icon CLEAN_PANE({
+ {QLatin1String(":/core/images/clean_pane_small.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon RELOAD_GRAY({
+ {QLatin1String(":/core/images/reload_gray.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon TOGGLE_SIDEBAR({
+ {QLatin1String(":/core/images/sidebaricon.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon BUTTON_CLOSE({
+ {QLatin1String(":/core/images/button_close.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon SPLIT_HORIZONTAL({
+ {QLatin1String(":/core/images/splitbutton_horizontal.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon SPLIT_VERTICAL({
+ {QLatin1String(":/core/images/splitbutton_vertical.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon CLOSE_SPLIT_TOP({
+ {QLatin1String(":/core/images/splitbutton_closetop.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon CLOSE_SPLIT_BOTTOM({
+ {QLatin1String(":/core/images/splitbutton_closebottom.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon CLOSE_SPLIT_LEFT({
+ {QLatin1String(":/core/images/splitbutton_closeleft.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon CLOSE_SPLIT_RIGHT({
+ {QLatin1String(":/core/images/splitbutton_closeright.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon FILTER({
+ {QLatin1String(":/core/images/filtericon.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon LINK({
+ {QLatin1String(":/core/images/linkicon.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon PAUSE({
+ {QLatin1String(":/core/images/pause.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon WARNING({
+ {QLatin1String(":/core/images/warning.png"), Utils::Theme::IconsWarningColor}});
+const Utils::Icon ERROR({
+ {QLatin1String(":/core/images/error.png"), Utils::Theme::IconsErrorColor}});
+const Utils::Icon INFO({
+ {QLatin1String(":/core/images/info.png"), Utils::Theme::IconsInfoColor}});
+const Utils::Icon EXPAND({
+ {QLatin1String(":/find/images/expand.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon DEBUG_START_SMALL({
+ {QLatin1String(":/core/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor},
+ {QLatin1String(":/core/images/run_overlay_small.png"), Utils::Theme::IconsRunColor}});
+const Utils::Icon DEBUG_EXIT_SMALL({
+ {QLatin1String(":/core/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor},
+ {QLatin1String(":/core/images/stop_overlay_small.png"), Utils::Theme::IconsStopColor}});
+const Utils::Icon DEBUG_INTERRUPT_SMALL({
+ {QLatin1String(":/core/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor},
+ {QLatin1String(":/core/images/interrupt_overlay_small.png"), Utils::Theme::IconsInterruptColor}});
+const Utils::Icon DEBUG_CONTINUE_SMALL({
+ {QLatin1String(":/core/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor},
+ {QLatin1String(":/core/images/continue_overlay_small.png"), Utils::Theme::IconsRunColor}});
+const Utils::Icon ZOOM({
+ {QLatin1String(":/core/images/zoom.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon TOOLBAR_EXTENSION({
+ {QLatin1String(":/core/images/extension.png"), Utils::Theme::IconsBaseColor}});
+
+} // namespace Icons
+} // namespace Core
+
+#endif // COREICONS_H
diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro
index 650a91dd3a..4f7b14d255 100644
--- a/src/plugins/coreplugin/coreplugin.pro
+++ b/src/plugins/coreplugin/coreplugin.pro
@@ -232,7 +232,8 @@ HEADERS += corejsextensions.h \
themeeditor/themesettingsitemdelegate.h \
messagebox.h \
iwelcomepage.h \
- systemsettings.h
+ systemsettings.h \
+ coreicons.h
FORMS += dialogs/newdialog.ui \
dialogs/saveitemsdialog.ui \
diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs
index fd1dc2e92a..e5719dba66 100644
--- a/src/plugins/coreplugin/coreplugin.qbs
+++ b/src/plugins/coreplugin/coreplugin.qbs
@@ -38,6 +38,7 @@ QtcPlugin {
"core.qrc",
"core_global.h",
"coreconstants.h",
+ "coreicons.h",
"corejsextensions.cpp", "corejsextensions.h",
"coreplugin.cpp", "coreplugin.h",
"designmode.cpp", "designmode.h",
diff --git a/src/plugins/coreplugin/dialogs/newdialog.cpp b/src/plugins/coreplugin/dialogs/newdialog.cpp
index fe10f9796d..5632bbd5f6 100644
--- a/src/plugins/coreplugin/dialogs/newdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/newdialog.cpp
@@ -31,7 +31,7 @@
#include "newdialog.h"
#include "ui_newdialog.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
@@ -268,7 +268,7 @@ void NewDialog::setWizardFactories(QList<IWizardFactory *> factories,
parentItem->appendRow(filesKindItem);
if (m_dummyIcon.isNull())
- m_dummyIcon = QIcon(QLatin1String(Core::Constants::ICON_NEWFILE));
+ m_dummyIcon = Core::Icons::NEWFILE.icon();
QStringList availablePlatforms = IWizardFactory::allAvailablePlatforms();
m_ui->comboBox->addItem(tr("All Templates"), QString());
diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp
index 41b6fe05aa..712a5e1960 100644
--- a/src/plugins/coreplugin/editormanager/documentmodel.cpp
+++ b/src/plugins/coreplugin/editormanager/documentmodel.cpp
@@ -32,6 +32,7 @@
#include "ieditor.h"
#include <coreplugin/documentmanager.h>
#include <coreplugin/idocument.h>
+#include <coreplugin/coreicons.h>
#include <utils/algorithm.h>
#include <utils/dropsupport.h>
@@ -125,8 +126,8 @@ public:
};
DocumentModelPrivate::DocumentModelPrivate() :
- m_lockedIcon(QLatin1String(":/core/images/locked.png")),
- m_unlockedIcon(QLatin1String(":/core/images/unlocked.png"))
+ m_lockedIcon(Icons::LOCKED.icon()),
+ m_unlockedIcon(Icons::UNLOCKED.icon())
{
}
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index cd9a7aae0a..0a761b4a4c 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -41,7 +41,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/dialogs/openwithdialog.h>
#include <coreplugin/dialogs/readonlyfilesdialog.h>
#include <coreplugin/documentmanager.h>
@@ -73,7 +73,6 @@
#include <utils/mimetypes/mimetype.h>
#include <utils/qtcassert.h>
#include <utils/overridecursor.h>
-#include <utils/themehelper.h>
#include <QClipboard>
#include <QDateTime>
@@ -247,8 +246,8 @@ EditorManagerPrivate::EditorManagerPrivate(QObject *parent) :
m_closeAllEditorsExceptVisibleAction(new QAction(EditorManager::tr("Close All Except Visible"), this)),
m_gotoNextDocHistoryAction(new QAction(EditorManager::tr("Next Open Document in History"), this)),
m_gotoPreviousDocHistoryAction(new QAction(EditorManager::tr("Previous Open Document in History"), this)),
- m_goBackAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_PREV)), EditorManager::tr("Go Back"), this)),
- m_goForwardAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_NEXT)), EditorManager::tr("Go Forward"), this)),
+ m_goBackAction(new QAction(Icons::PREV.icon(), EditorManager::tr("Go Back"), this)),
+ m_goForwardAction(new QAction(Icons::NEXT.icon(), EditorManager::tr("Go Forward"), this)),
m_copyFilePathContextAction(new QAction(EditorManager::tr("Copy Full Path"), this)),
m_copyLocationContextAction(new QAction(EditorManager::tr("Copy Path and Line Number"), this)),
m_copyFileNameContextAction(new QAction(EditorManager::tr("Copy File Name"), this)),
diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index 479de2ff55..de386e304c 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -36,7 +36,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editortoolbar.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/infobar.h>
#include <coreplugin/locator/locatorconstants.h>
@@ -45,7 +45,6 @@
#include <coreplugin/findplaceholder.h>
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
-#include <utils/themehelper.h>
#include <QDebug>
@@ -704,15 +703,11 @@ void SplitterOrView::split(Qt::Orientation orientation)
view->view()->setCurrentEditor(duplicate);
if (orientation == Qt::Horizontal) {
- view->view()->setCloseSplitIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
- otherView->view()->setCloseSplitIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_RIGHT)));
+ view->view()->setCloseSplitIcon(Icons::CLOSE_SPLIT_LEFT.icon());
+ otherView->view()->setCloseSplitIcon(Icons::CLOSE_SPLIT_RIGHT.icon());
} else {
- view->view()->setCloseSplitIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
- otherView->view()->setCloseSplitIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
+ view->view()->setCloseSplitIcon(Icons::CLOSE_SPLIT_TOP.icon());
+ otherView->view()->setCloseSplitIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
}
EditorManagerPrivate::activateView(otherView->view());
@@ -801,13 +796,13 @@ void SplitterOrView::unsplit()
QSplitter *parentSplitter = qobject_cast<QSplitter *>(parentWidget());
if (parentSplitter) { // not the toplevel splitterOrView
if (parentSplitter->orientation() == Qt::Horizontal)
- Utils::ThemeHelper::themedIcon(QLatin1String(parentSplitter->widget(0) == this ?
- Constants::ICON_CLOSE_SPLIT_LEFT
- : Constants::ICON_CLOSE_SPLIT_RIGHT));
+ m_view->setCloseSplitIcon(parentSplitter->widget(0) == this ?
+ Icons::CLOSE_SPLIT_LEFT.icon()
+ : Icons::CLOSE_SPLIT_RIGHT.icon());
else
- Utils::ThemeHelper::themedIcon(QLatin1String(parentSplitter->widget(0) == this ?
- Constants::ICON_CLOSE_SPLIT_TOP
- : Constants::ICON_CLOSE_SPLIT_BOTTOM));
+ m_view->setCloseSplitIcon(parentSplitter->widget(0) == this ?
+ Icons::CLOSE_SPLIT_TOP.icon()
+ : Icons::CLOSE_SPLIT_BOTTOM.icon());
}
}
m_layout->setCurrentWidget(m_view);
diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.cpp b/src/plugins/coreplugin/editormanager/openeditorsview.cpp
index 08ab777006..778918f321 100644
--- a/src/plugins/coreplugin/editormanager/openeditorsview.cpp
+++ b/src/plugins/coreplugin/editormanager/openeditorsview.cpp
@@ -33,7 +33,7 @@
#include "ieditor.h"
#include "documentmodel.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
@@ -50,7 +50,7 @@ using namespace Core::Internal;
OpenEditorsWidget::OpenEditorsWidget()
{
setWindowTitle(tr("Open Documents"));
- setWindowIcon(QIcon(QLatin1String(Constants::ICON_DIR)));
+ setWindowIcon(Icons::DIR.icon());
setDragEnabled(true);
setDragDropMode(QAbstractItemView::DragOnly);
diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp
index 0c2affe99d..900d808293 100644
--- a/src/plugins/coreplugin/editortoolbar.cpp
+++ b/src/plugins/coreplugin/editortoolbar.cpp
@@ -32,7 +32,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/editormanager_p.h>
@@ -43,7 +43,6 @@
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QApplication>
#include <QComboBox>
@@ -100,13 +99,13 @@ EditorToolBarPrivate::EditorToolBarPrivate(QWidget *parent, EditorToolBar *q) :
m_lockButton(new QToolButton(q)),
m_dragHandle(new QToolButton(q)),
m_dragHandleMenu(0),
- m_goBackAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_PREV)), EditorManager::tr("Go Back"), parent)),
- m_goForwardAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_NEXT)), EditorManager::tr("Go Forward"), parent)),
+ m_goBackAction(new QAction(Icons::PREV.icon(), EditorManager::tr("Go Back"), parent)),
+ m_goForwardAction(new QAction(Icons::NEXT.icon(), EditorManager::tr("Go Forward"), parent)),
m_backButton(new QToolButton(q)),
m_forwardButton(new QToolButton(q)),
m_splitButton(new QToolButton(q)),
- m_horizontalSplitAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)), EditorManager::tr("Split"), parent)),
- m_verticalSplitAction(new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_SPLIT_VERTICAL)), EditorManager::tr("Split Side by Side"), parent)),
+ m_horizontalSplitAction(new QAction(Icons::SPLIT_HORIZONTAL.icon(), EditorManager::tr("Split"), parent)),
+ m_verticalSplitAction(new QAction(Icons::SPLIT_VERTICAL.icon(), EditorManager::tr("Split Side by Side"), parent)),
m_splitNewWindowAction(new QAction(EditorManager::tr("Open in New Window"), parent)),
m_closeSplitButton(new QToolButton(q)),
m_activeToolBar(0),
@@ -153,8 +152,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_editorList->setContextMenuPolicy(Qt::CustomContextMenu);
d->m_closeEditorButton->setAutoRaise(true);
- d->m_closeEditorButton->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_BUTTON_CLOSE)));
+ d->m_closeEditorButton->setIcon(Icons::BUTTON_CLOSE.icon());
d->m_closeEditorButton->setEnabled(false);
d->m_closeEditorButton->setProperty("showborder", true);
@@ -170,8 +168,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_splitNewWindowAction->setIconVisibleInMenu(false);
}
- d->m_splitButton->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)));
+ d->m_splitButton->setIcon(Icons::SPLIT_HORIZONTAL.icon());
d->m_splitButton->setToolTip(tr("Split"));
d->m_splitButton->setPopupMode(QToolButton::InstantPopup);
d->m_splitButton->setProperty("noArrow", true);
@@ -182,8 +179,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_splitButton->setMenu(splitMenu);
d->m_closeSplitButton->setAutoRaise(true);
- d->m_closeSplitButton->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
+ d->m_closeSplitButton->setIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
QHBoxLayout *toplayout = new QHBoxLayout(this);
toplayout->setSpacing(0);
diff --git a/src/plugins/coreplugin/find/findtoolbar.cpp b/src/plugins/coreplugin/find/findtoolbar.cpp
index 2314509a46..a3d951d5b5 100644
--- a/src/plugins/coreplugin/find/findtoolbar.cpp
+++ b/src/plugins/coreplugin/find/findtoolbar.cpp
@@ -32,7 +32,7 @@
#include "ifindfilter.h"
#include "findplugin.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/coreplugin.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
@@ -47,7 +47,6 @@
#include <utils/qtcassert.h>
#include <utils/stylehelper.h>
#include <utils/theme/theme.h>
-#include <utils/themehelper.h>
#include <QDebug>
#include <QSettings>
@@ -275,7 +274,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
m_ui.replaceAllButton->setDefaultAction(m_localReplaceAllAction);
m_caseSensitiveAction = new QAction(tr("Case Sensitive"), this);
- m_caseSensitiveAction->setIcon(QIcon(QLatin1String(":/find/images/casesensitively.png")));
+ m_caseSensitiveAction->setIcon(Icons::FIND_CASE_INSENSITIVELY.icon());
m_caseSensitiveAction->setCheckable(true);
m_caseSensitiveAction->setChecked(false);
cmd = ActionManager::registerAction(m_caseSensitiveAction, Constants::CASE_SENSITIVE);
@@ -283,7 +282,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
connect(m_caseSensitiveAction, &QAction::toggled, this, &FindToolBar::setCaseSensitive);
m_wholeWordAction = new QAction(tr("Whole Words Only"), this);
- m_wholeWordAction->setIcon(QIcon(QLatin1String(":/find/images/wholewords.png")));
+ m_wholeWordAction->setIcon(Icons::FIND_WHOLE_WORD.icon());
m_wholeWordAction->setCheckable(true);
m_wholeWordAction->setChecked(false);
cmd = ActionManager::registerAction(m_wholeWordAction, Constants::WHOLE_WORDS);
@@ -291,7 +290,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
connect(m_wholeWordAction, &QAction::toggled, this, &FindToolBar::setWholeWord);
m_regularExpressionAction = new QAction(tr("Use Regular Expressions"), this);
- m_regularExpressionAction->setIcon(QIcon(QLatin1String(":/find/images/regexp.png")));
+ m_regularExpressionAction->setIcon(Icons::FIND_REGEXP.icon());
m_regularExpressionAction->setCheckable(true);
m_regularExpressionAction->setChecked(false);
cmd = ActionManager::registerAction(m_regularExpressionAction, Constants::REGULAR_EXPRESSIONS);
@@ -299,7 +298,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
connect(m_regularExpressionAction, &QAction::toggled, this, &FindToolBar::setRegularExpressions);
m_preserveCaseAction = new QAction(tr("Preserve Case when Replacing"), this);
- m_preserveCaseAction->setIcon(QPixmap(QLatin1String(":/find/images/preservecase.png")));
+ m_preserveCaseAction->setIcon(Icons::FIND_PRESERVE_CASE.icon());
m_preserveCaseAction->setCheckable(true);
m_preserveCaseAction->setChecked(false);
cmd = ActionManager::registerAction(m_preserveCaseAction, Constants::PRESERVE_CASE);
@@ -673,9 +672,7 @@ void FindToolBar::updateIcons()
bool regexp = effectiveFlags & FindRegularExpression;
bool preserveCase = effectiveFlags & FindPreserveCase;
if (!casesensitive && !wholewords && !regexp && !preserveCase) {
- const QPixmap pixmap = Utils::ThemeHelper::recoloredPixmap(
- QLatin1String(Constants::ICON_MAGNIFIER),
- Utils::ThemeHelper::inputfieldIconColor());
+ const QPixmap pixmap = Icons::MAGNIFIER.pixmap();
m_ui.findEdit->setButtonPixmap(Utils::FancyLineEdit::Left, pixmap);
} else {
m_ui.findEdit->setButtonPixmap(Utils::FancyLineEdit::Left,
@@ -970,13 +967,13 @@ void FindToolBar::setLightColoredIcon(bool lightColored)
m_ui.findNextButton->setArrowType(Qt::RightArrow);
m_ui.findPreviousButton->setIcon(QIcon());
m_ui.findPreviousButton->setArrowType(Qt::LeftArrow);
- m_ui.close->setIcon(QIcon(QLatin1String(Constants::ICON_DARK_CLOSE)));
+ m_ui.close->setIcon(Icons::DARK_CLOSE.icon());
} else {
- m_ui.findNextButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_NEXT)));
+ m_ui.findNextButton->setIcon(Icons::NEXT.icon());
m_ui.findNextButton->setArrowType(Qt::NoArrow);
- m_ui.findPreviousButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_PREV)));
+ m_ui.findPreviousButton->setIcon(Icons::PREV.icon());
m_ui.findPreviousButton->setArrowType(Qt::NoArrow);
- m_ui.close->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_BUTTON_CLOSE)));
+ m_ui.close->setIcon(Icons::BUTTON_CLOSE.icon());
}
}
diff --git a/src/plugins/coreplugin/find/ifindfilter.cpp b/src/plugins/coreplugin/find/ifindfilter.cpp
index 2fbdb8a8f5..d01ac76ea4 100644
--- a/src/plugins/coreplugin/find/ifindfilter.cpp
+++ b/src/plugins/coreplugin/find/ifindfilter.cpp
@@ -30,6 +30,8 @@
#include "ifindfilter.h"
+#include <coreplugin/coreicons.h>
+
#include <QPainter>
#include <QPixmap>
@@ -228,10 +230,10 @@ FindFlags IFindFilter::supportedFindFlags() const
QPixmap IFindFilter::pixmapForFindFlags(FindFlags flags)
{
- static const QPixmap casesensitiveIcon = QPixmap(QLatin1String(":/find/images/casesensitively.png"));
- static const QPixmap regexpIcon = QPixmap(QLatin1String(":/find/images/regexp.png"));
- static const QPixmap wholewordsIcon = QPixmap(QLatin1String(":/find/images/wholewords.png"));
- static const QPixmap preservecaseIcon = QPixmap(QLatin1String(":/find/images/preservecase.png"));
+ static const QPixmap casesensitiveIcon = Icons::FIND_CASE_INSENSITIVELY.pixmap();
+ static const QPixmap regexpIcon = Icons::FIND_REGEXP.pixmap();
+ static const QPixmap wholewordsIcon = Icons::FIND_WHOLE_WORD.pixmap();
+ static const QPixmap preservecaseIcon = Icons::FIND_PRESERVE_CASE.pixmap();
bool casesensitive = flags & FindCaseSensitively;
bool wholewords = flags & FindWholeWords;
bool regexp = flags & FindRegularExpression;
diff --git a/src/plugins/coreplugin/find/searchresultwindow.cpp b/src/plugins/coreplugin/find/searchresultwindow.cpp
index a283dfee0c..d145940de3 100644
--- a/src/plugins/coreplugin/find/searchresultwindow.cpp
+++ b/src/plugins/coreplugin/find/searchresultwindow.cpp
@@ -35,11 +35,10 @@
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icontext.h>
#include <utils/qtcassert.h>
#include <utils/styledbar.h>
-#include <utils/themehelper.h>
#include <QAction>
#include <QComboBox>
@@ -142,7 +141,7 @@ namespace Internal {
m_expandCollapseButton->setAutoRaise(true);
m_expandCollapseAction->setCheckable(true);
- m_expandCollapseAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/find/images/expand.png")));
+ m_expandCollapseAction->setIcon(Core::Icons::EXPAND.icon());
Command *cmd = ActionManager::registerAction(m_expandCollapseAction, "Find.ExpandAll");
cmd->setAttribute(Command::CA_UpdateText);
m_expandCollapseButton->setDefaultAction(cmd->action());
diff --git a/src/plugins/coreplugin/images/reload_gray.png b/src/plugins/coreplugin/images/reload_gray.png
index 90f8a2e3d1..3b5644c2af 100644
--- a/src/plugins/coreplugin/images/reload_gray.png
+++ b/src/plugins/coreplugin/images/reload_gray.png
Binary files differ
diff --git a/src/plugins/coreplugin/images/reload_gray@2x.png b/src/plugins/coreplugin/images/reload_gray@2x.png
index 12a6303479..953b4a317f 100644
--- a/src/plugins/coreplugin/images/reload_gray@2x.png
+++ b/src/plugins/coreplugin/images/reload_gray@2x.png
Binary files differ
diff --git a/src/plugins/coreplugin/infobar.cpp b/src/plugins/coreplugin/infobar.cpp
index 2598d89718..8980ff4ebe 100644
--- a/src/plugins/coreplugin/infobar.cpp
+++ b/src/plugins/coreplugin/infobar.cpp
@@ -30,7 +30,7 @@
#include "infobar.h"
-#include "coreconstants.h"
+#include "coreicons.h"
#include "icore.h"
#include <utils/theme/theme.h>
@@ -251,7 +251,7 @@ void InfoBarDisplay::update()
if (info.cancelButtonText.isEmpty()) {
infoWidgetCloseButton->setAutoRaise(true);
- infoWidgetCloseButton->setIcon(QIcon(QLatin1String(Constants::ICON_CLEAR)));
+ infoWidgetCloseButton->setIcon(Icons::CLEAR.icon());
infoWidgetCloseButton->setToolTip(tr("Close"));
if (infoWidgetSuppressButton)
hbox->addWidget(infoWidgetSuppressButton);
diff --git a/src/plugins/coreplugin/locator/locatorfiltersfilter.cpp b/src/plugins/coreplugin/locator/locatorfiltersfilter.cpp
index 73c9c8bb97..0116c8c0e3 100644
--- a/src/plugins/coreplugin/locator/locatorfiltersfilter.cpp
+++ b/src/plugins/coreplugin/locator/locatorfiltersfilter.cpp
@@ -32,9 +32,8 @@
#include "locatorfiltersfilter.h"
#include "locatorwidget.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
using namespace Core;
using namespace Core::Internal;
@@ -45,7 +44,7 @@ LocatorFiltersFilter::LocatorFiltersFilter(Locator *plugin,
LocatorWidget *locatorWidget):
m_plugin(plugin),
m_locatorWidget(locatorWidget),
- m_icon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_NEXT)))
+ m_icon(Icons::NEXT.icon())
{
setId("FiltersFilter");
setDisplayName(tr("Available filters"));
diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp
index 61dd506ace..2249259964 100644
--- a/src/plugins/coreplugin/locator/locatorwidget.cpp
+++ b/src/plugins/coreplugin/locator/locatorwidget.cpp
@@ -34,7 +34,7 @@
#include "locatorsearchutils.h"
#include "ilocatorfilter.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -47,7 +47,6 @@
#include <utils/qtcassert.h>
#include <utils/runextensions.h>
#include <utils/stylehelper.h>
-#include <utils/themehelper.h>
#include <QColor>
#include <QFileInfo>
@@ -253,9 +252,7 @@ LocatorWidget::LocatorWidget(Locator *qop) :
layout->addWidget(m_fileLineEdit);
setWindowIcon(QIcon(QLatin1String(":/locator/images/locator.png")));
- const QPixmap pixmap = Utils::ThemeHelper::recoloredPixmap(
- QLatin1String(Constants::ICON_MAGNIFIER),
- Utils::ThemeHelper::inputfieldIconColor());
+ const QPixmap pixmap = Icons::MAGNIFIER.pixmap();
m_fileLineEdit->setFiltering(true);
m_fileLineEdit->setButtonPixmap(Utils::FancyLineEdit::Left, pixmap);
m_fileLineEdit->setButtonToolTip(Utils::FancyLineEdit::Left, tr("Options"));
diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index 5029d78a6c..1d56b36a17 100644
--- a/src/plugins/coreplugin/mainwindow.cpp
+++ b/src/plugins/coreplugin/mainwindow.cpp
@@ -30,7 +30,7 @@
#include "mainwindow.h"
#include "icore.h"
-#include "coreconstants.h"
+#include "coreicons.h"
#include "jsexpander.h"
#include "toolsettings.h"
#include "mimetypesettings.h"
@@ -81,7 +81,6 @@
#include <utils/qtcassert.h>
#include <utils/stylehelper.h>
#include <utils/theme/theme.h>
-#include <utils/themehelper.h>
#include <utils/stringutils.h>
#include <QApplication>
@@ -153,7 +152,7 @@ MainWindow::MainWindow() :
setWindowTitle(tr("Qt Creator"));
if (HostOsInfo::isLinuxHost())
- QApplication::setWindowIcon(QIcon(QLatin1String(Constants::ICON_QTLOGO_128)));
+ QApplication::setWindowIcon(Icons::QTLOGO_128.icon());
QCoreApplication::setApplicationName(QLatin1String("QtCreator"));
QCoreApplication::setApplicationVersion(QLatin1String(Constants::IDE_VERSION_LONG));
QCoreApplication::setOrganizationName(QLatin1String(Constants::IDE_SETTINGSVARIANT_STR));
@@ -503,7 +502,7 @@ void MainWindow::registerDefaultActions()
connect(m_focusToEditor, SIGNAL(triggered()), this, SLOT(setFocusToEditor()));
// New File Action
- QIcon icon = QIcon::fromTheme(QLatin1String("document-new"), QIcon(QLatin1String(Constants::ICON_NEWFILE)));
+ QIcon icon = QIcon::fromTheme(QLatin1String("document-new"), Icons::NEWFILE.icon());
m_newAction = new QAction(icon, tr("&New File or Project..."), this);
cmd = ActionManager::registerAction(m_newAction, Constants::NEW);
cmd->setDefaultKeySequence(QKeySequence::New);
@@ -517,7 +516,7 @@ void MainWindow::registerDefaultActions()
});
// Open Action
- icon = QIcon::fromTheme(QLatin1String("document-open"), QIcon(QLatin1String(Constants::ICON_OPENFILE)));
+ icon = QIcon::fromTheme(QLatin1String("document-open"), Icons::OPENFILE.icon());
m_openAction = new QAction(icon, tr("&Open File or Project..."), this);
cmd = ActionManager::registerAction(m_openAction, Constants::OPEN);
cmd->setDefaultKeySequence(QKeySequence::Open);
@@ -537,7 +536,7 @@ void MainWindow::registerDefaultActions()
ac->setOnAllDisabledBehavior(ActionContainer::Show);
// Save Action
- icon = QIcon::fromTheme(QLatin1String("document-save"), QIcon(QLatin1String(Constants::ICON_SAVEFILE)));
+ icon = QIcon::fromTheme(QLatin1String("document-save"), Icons::SAVEFILE.icon());
QAction *tmpaction = new QAction(icon, tr("&Save"), this);
tmpaction->setEnabled(false);
cmd = ActionManager::registerAction(tmpaction, Constants::SAVE);
@@ -581,7 +580,7 @@ void MainWindow::registerDefaultActions()
connect(m_exitAction, SIGNAL(triggered()), this, SLOT(exit()));
// Undo Action
- icon = QIcon::fromTheme(QLatin1String("edit-undo"), QIcon(QLatin1String(Constants::ICON_UNDO)));
+ icon = QIcon::fromTheme(QLatin1String("edit-undo"), Icons::UNDO.icon());
tmpaction = new QAction(icon, tr("&Undo"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::UNDO);
cmd->setDefaultKeySequence(QKeySequence::Undo);
@@ -591,7 +590,7 @@ void MainWindow::registerDefaultActions()
tmpaction->setEnabled(false);
// Redo Action
- icon = QIcon::fromTheme(QLatin1String("edit-redo"), QIcon(QLatin1String(Constants::ICON_REDO)));
+ icon = QIcon::fromTheme(QLatin1String("edit-redo"), Icons::REDO.icon());
tmpaction = new QAction(icon, tr("&Redo"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::REDO);
cmd->setDefaultKeySequence(QKeySequence::Redo);
@@ -601,7 +600,7 @@ void MainWindow::registerDefaultActions()
tmpaction->setEnabled(false);
// Cut Action
- icon = QIcon::fromTheme(QLatin1String("edit-cut"), QIcon(QLatin1String(Constants::ICON_CUT)));
+ icon = QIcon::fromTheme(QLatin1String("edit-cut"), Icons::CUT.icon());
tmpaction = new QAction(icon, tr("Cu&t"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::CUT);
cmd->setDefaultKeySequence(QKeySequence::Cut);
@@ -609,7 +608,7 @@ void MainWindow::registerDefaultActions()
tmpaction->setEnabled(false);
// Copy Action
- icon = QIcon::fromTheme(QLatin1String("edit-copy"), QIcon(QLatin1String(Constants::ICON_COPY)));
+ icon = QIcon::fromTheme(QLatin1String("edit-copy"), Icons::COPY.icon());
tmpaction = new QAction(icon, tr("&Copy"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::COPY);
cmd->setDefaultKeySequence(QKeySequence::Copy);
@@ -617,7 +616,7 @@ void MainWindow::registerDefaultActions()
tmpaction->setEnabled(false);
// Paste Action
- icon = QIcon::fromTheme(QLatin1String("edit-paste"), QIcon(QLatin1String(Constants::ICON_PASTE)));
+ icon = QIcon::fromTheme(QLatin1String("edit-paste"), Icons::PASTE.icon());
tmpaction = new QAction(icon, tr("&Paste"), this);
cmd = ActionManager::registerAction(tmpaction, Constants::PASTE);
cmd->setDefaultKeySequence(QKeySequence::Paste);
@@ -691,7 +690,7 @@ void MainWindow::registerDefaultActions()
}
// Show Sidebar Action
- m_toggleSideBarAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_TOGGLE_SIDEBAR)),
+ m_toggleSideBarAction = new QAction(Icons::TOGGLE_SIDEBAR.icon(),
QCoreApplication::translate("Core", Constants::TR_SHOW_SIDEBAR),
this);
m_toggleSideBarAction->setCheckable(true);
diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp
index cfd76033f2..548f4734f6 100644
--- a/src/plugins/coreplugin/manhattanstyle.cpp
+++ b/src/plugins/coreplugin/manhattanstyle.cpp
@@ -32,7 +32,7 @@
#include "styleanimator.h"
-#include <coreplugin/coreconstants.h>
+#include "coreicons.h"
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
@@ -40,7 +40,6 @@
#include <utils/fancymainwindow.h>
#include <utils/theme/theme.h>
-#include <utils/themehelper.h>
#include <QApplication>
#include <QComboBox>
@@ -139,8 +138,8 @@ public:
ManhattanStylePrivate::ManhattanStylePrivate() :
lineeditImage(StyleHelper::dpiSpecificImageFile(QStringLiteral(":/core/images/inputfield.png"))),
lineeditImage_disabled(StyleHelper::dpiSpecificImageFile(QStringLiteral(":/core/images/inputfield_disabled.png"))),
- extButtonPixmap(ThemeHelper::themedIconPixmap(QLatin1String(":/core/images/extension.png"))),
- closeButtonPixmap(QLatin1String(Core::Constants::ICON_CLOSE_BUTTON))
+ extButtonPixmap(Core::Icons::TOOLBAR_EXTENSION.pixmap()),
+ closeButtonPixmap(Core::Icons::CLOSE_BUTTON.pixmap())
{
}
diff --git a/src/plugins/coreplugin/navigationsubwidget.cpp b/src/plugins/coreplugin/navigationsubwidget.cpp
index 80ad67c0a9..ce1b20a43b 100644
--- a/src/plugins/coreplugin/navigationsubwidget.cpp
+++ b/src/plugins/coreplugin/navigationsubwidget.cpp
@@ -31,13 +31,12 @@
#include "navigationsubwidget.h"
#include "navigationwidget.h"
-#include "coreconstants.h"
+#include "coreicons.h"
#include "inavigationwidgetfactory.h"
#include "actionmanager/command.h"
#include "id.h"
#include <utils/styledbar.h>
-#include <utils/themehelper.h>
#include <QDebug>
@@ -75,8 +74,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget, int pos
toolBarLayout->addWidget(m_navigationComboBox);
QToolButton *splitAction = new QToolButton();
- splitAction->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)));
+ splitAction->setIcon(Icons::SPLIT_HORIZONTAL.icon());
splitAction->setToolTip(tr("Split"));
splitAction->setPopupMode(QToolButton::InstantPopup);
splitAction->setProperty("noArrow", true);
@@ -85,8 +83,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget, int pos
connect(m_splitMenu, &QMenu::aboutToShow, this, &NavigationSubWidget::populateSplitMenu);
m_closeButton = new QToolButton();
- m_closeButton->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
+ m_closeButton->setIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
m_closeButton->setToolTip(tr("Close"));
toolBarLayout->addWidget(splitAction);
diff --git a/src/plugins/coreplugin/navigationwidget.cpp b/src/plugins/coreplugin/navigationwidget.cpp
index dd07140744..15e8e27d3a 100644
--- a/src/plugins/coreplugin/navigationwidget.cpp
+++ b/src/plugins/coreplugin/navigationwidget.cpp
@@ -32,7 +32,7 @@
#include "navigationsubwidget.h"
#include "icontext.h"
#include "icore.h"
-#include "coreconstants.h"
+#include "coreicons.h"
#include "inavigationwidgetfactory.h"
#include "modemanager.h"
#include "actionmanager/actionmanager.h"
@@ -40,8 +40,6 @@
#include "id.h"
#include "imode.h"
-#include <utils/themehelper.h>
-
#include <QCoreApplication>
#include <QDebug>
#include <QSettings>
@@ -250,8 +248,7 @@ Internal::NavigationSubWidget *NavigationWidget::insertSubItem(int position,int
}
if (!d->m_subWidgets.isEmpty()) // Make all icons the bottom icon
- d->m_subWidgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
+ d->m_subWidgets.at(0)->setCloseIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
Internal::NavigationSubWidget *nsw = new Internal::NavigationSubWidget(this, position, index);
connect(nsw, &Internal::NavigationSubWidget::splitMe,
@@ -259,12 +256,9 @@ Internal::NavigationSubWidget *NavigationWidget::insertSubItem(int position,int
connect(nsw, SIGNAL(closeMe()), this, SLOT(closeSubWidget()));
insertWidget(position, nsw);
d->m_subWidgets.insert(position, nsw);
- if (d->m_subWidgets.size() == 1)
- d->m_subWidgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
- else
- d->m_subWidgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
+ d->m_subWidgets.at(0)->setCloseIcon(d->m_subWidgets.size() == 1
+ ? Icons::CLOSE_SPLIT_LEFT.icon()
+ : Icons::CLOSE_SPLIT_TOP.icon());
return nsw;
}
@@ -313,11 +307,9 @@ void NavigationWidget::closeSubWidget()
subWidget->deleteLater();
// update close button of top item
if (d->m_subWidgets.size() == 1)
- d->m_subWidgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
- else
- d->m_subWidgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
+ d->m_subWidgets.at(0)->setCloseIcon(d->m_subWidgets.size() == 1
+ ? Icons::CLOSE_SPLIT_LEFT.icon()
+ : Icons::CLOSE_SPLIT_TOP.icon());
} else {
setShown(false);
}
diff --git a/src/plugins/coreplugin/opendocumentstreeview.cpp b/src/plugins/coreplugin/opendocumentstreeview.cpp
index 6f4066591b..4cc3032e82 100644
--- a/src/plugins/coreplugin/opendocumentstreeview.cpp
+++ b/src/plugins/coreplugin/opendocumentstreeview.cpp
@@ -30,7 +30,7 @@
#include "opendocumentstreeview.h"
-#include "coreconstants.h"
+#include "coreicons.h"
#include <QApplication>
#include <QHeaderView>
@@ -87,8 +87,9 @@ void OpenDocumentsDelegate::paint(QPainter *painter, const QStyleOptionViewItem
QStyledItemDelegate::paint(painter, option, index);
if (closeButtonVisible && index.column() == 1 && option.state & QStyle::State_MouseOver) {
- const QIcon icon(QLatin1String((option.state & QStyle::State_Selected) ?
- Constants::ICON_CLOSE_BUTTON : Constants::ICON_DARK_CLOSE_BUTTON));
+ const QIcon icon = (option.state & QStyle::State_Selected) ?
+ Icons::CLOSE_BUTTON.icon()
+ : Icons::DARK_CLOSE_BUTTON.icon();
QRect iconRect(option.rect.right() - option.rect.height(),
option.rect.top(),
diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp
index f1950c2b69..7ec7d9e513 100644
--- a/src/plugins/coreplugin/outputpanemanager.cpp
+++ b/src/plugins/coreplugin/outputpanemanager.cpp
@@ -30,7 +30,7 @@
#include "outputpanemanager.h"
#include "outputpane.h"
-#include "coreconstants.h"
+#include "coreicons.h"
#include "findplaceholder.h"
#include "icore.h"
@@ -51,7 +51,6 @@
#include <utils/stylehelper.h>
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
-#include <utils/themehelper.h>
#include <QDebug>
@@ -124,8 +123,8 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
m_prevAction(0),
m_outputWidgetPane(new QStackedWidget),
m_opToolBarWidgets(new QStackedWidget),
- m_minimizeIcon(ThemeHelper::themedIcon(QLatin1String(":/core/images/arrowdown.png"))),
- m_maximizeIcon(ThemeHelper::themedIcon(QLatin1String(":/core/images/arrowup.png"))),
+ m_minimizeIcon(Icons::ARROW_DOWN.icon()),
+ m_maximizeIcon(Icons::ARROW_UP.icon()),
m_maximised(false),
m_outputPaneHeight(0)
{
@@ -134,17 +133,17 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
m_titleLabel->setContentsMargins(5, 0, 5, 0);
m_clearAction = new QAction(this);
- m_clearAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLEAN_PANE)));
+ m_clearAction->setIcon(Icons::CLEAN_PANE.icon());
m_clearAction->setText(tr("Clear"));
connect(m_clearAction, SIGNAL(triggered()), this, SLOT(clearPage()));
m_nextAction = new QAction(this);
- m_nextAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_NEXT)));
+ m_nextAction->setIcon(Icons::NEXT.icon());
m_nextAction->setText(tr("Next Item"));
connect(m_nextAction, SIGNAL(triggered()), this, SLOT(slotNext()));
m_prevAction = new QAction(this);
- m_prevAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_PREV)));
+ m_prevAction->setIcon(Icons::PREV.icon());
m_prevAction->setText(tr("Previous Item"));
connect(m_prevAction, SIGNAL(triggered()), this, SLOT(slotPrev()));
@@ -152,8 +151,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
m_minMaxAction->setIcon(m_maximizeIcon);
m_minMaxAction->setText(tr("Maximize Output Pane"));
- m_closeButton->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
+ m_closeButton->setIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
connect(m_closeButton, SIGNAL(clicked()), this, SLOT(slotHide()));
connect(ICore::instance(), SIGNAL(saveSettingsRequested()), this, SLOT(saveSettings()));
diff --git a/src/plugins/coreplugin/sidebar.cpp b/src/plugins/coreplugin/sidebar.cpp
index 69ab9a5ebf..df0f54d830 100644
--- a/src/plugins/coreplugin/sidebar.cpp
+++ b/src/plugins/coreplugin/sidebar.cpp
@@ -30,12 +30,11 @@
#include "sidebar.h"
#include "sidebarwidget.h"
-#include "coreconstants.h"
+#include "coreicons.h"
#include "actionmanager/command.h"
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QSettings>
#include <QPointer>
@@ -205,8 +204,7 @@ SideBarItem *SideBar::item(const QString &id)
Internal::SideBarWidget *SideBar::insertSideBarWidget(int position, const QString &id)
{
if (!d->m_widgets.isEmpty())
- d->m_widgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
+ d->m_widgets.at(0)->setCloseIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
Internal::SideBarWidget *item = new Internal::SideBarWidget(this, id);
connect(item, SIGNAL(splitMe()), this, SLOT(splitSubWidget()));
@@ -215,11 +213,9 @@ Internal::SideBarWidget *SideBar::insertSideBarWidget(int position, const QStrin
insertWidget(position, item);
d->m_widgets.insert(position, item);
if (d->m_widgets.size() == 1)
- d->m_widgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
- else
- d->m_widgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
+ d->m_widgets.at(0)->setCloseIcon(d->m_widgets.size() == 1
+ ? Icons::CLOSE_SPLIT_LEFT.icon()
+ : Icons::CLOSE_SPLIT_TOP.icon());
updateWidgets();
return item;
}
@@ -249,11 +245,9 @@ void SideBar::closeSubWidget()
removeSideBarWidget(widget);
// update close button of top item
if (d->m_widgets.size() == 1)
- d->m_widgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_LEFT)));
- else
- d->m_widgets.at(0)->setCloseIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
+ d->m_widgets.at(0)->setCloseIcon(d->m_widgets.size() == 1
+ ? Icons::CLOSE_SPLIT_LEFT.icon()
+ : Icons::CLOSE_SPLIT_TOP.icon());
updateWidgets();
} else {
if (d->m_closeWhenEmpty) {
diff --git a/src/plugins/coreplugin/sidebarwidget.cpp b/src/plugins/coreplugin/sidebarwidget.cpp
index 3b5c3be752..8dd6976dea 100644
--- a/src/plugins/coreplugin/sidebarwidget.cpp
+++ b/src/plugins/coreplugin/sidebarwidget.cpp
@@ -32,9 +32,9 @@
#include "sidebar.h"
#include "navigationsubwidget.h"
-#include <coreplugin/coreconstants.h>
+#include "coreicons.h"
+
#include <utils/algorithm.h>
-#include <utils/themehelper.h>
#include <QToolBar>
#include <QToolButton>
@@ -77,15 +77,13 @@ SideBarWidget::SideBarWidget(SideBar *sideBar, const QString &id)
m_splitAction = new QAction(tr("Split"), m_toolbar);
m_splitAction->setToolTip(tr("Split"));
- m_splitAction->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)));
+ m_splitAction->setIcon(Icons::SPLIT_HORIZONTAL.icon());
connect(m_splitAction, SIGNAL(triggered()), this, SIGNAL(splitMe()));
m_toolbar->addAction(m_splitAction);
m_closeAction = new QAction(tr("Close"), m_toolbar);
m_closeAction->setToolTip(tr("Close"));
- m_closeAction->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
+ m_closeAction->setIcon(Icons::CLOSE_SPLIT_BOTTOM.icon());
connect(m_closeAction, SIGNAL(triggered()), this, SIGNAL(closeMe()));
m_toolbar->addAction(m_closeAction);
diff --git a/src/plugins/coreplugin/versiondialog.cpp b/src/plugins/coreplugin/versiondialog.cpp
index 26e7c9271b..0605fd0990 100644
--- a/src/plugins/coreplugin/versiondialog.cpp
+++ b/src/plugins/coreplugin/versiondialog.cpp
@@ -31,7 +31,7 @@
#include "versiondialog.h"
#include <app/app_version.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
@@ -52,7 +52,7 @@ VersionDialog::VersionDialog(QWidget *parent)
// We need to set the window icon explicitly here since for some reason the
// application icon isn't used when the size of the dialog is fixed (at least not on X11/GNOME)
if (Utils::HostOsInfo::isLinuxHost())
- setWindowIcon(QIcon(QLatin1String(Constants::ICON_QTLOGO_128)));
+ setWindowIcon(Icons::QTLOGO_128.icon());
setWindowTitle(tr("About Qt Creator"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
@@ -106,7 +106,7 @@ VersionDialog::VersionDialog(QWidget *parent)
connect(buttonBox , SIGNAL(rejected()), this, SLOT(reject()));
QLabel *logoLabel = new QLabel;
- logoLabel->setPixmap(QPixmap(QLatin1String(Constants::ICON_QTLOGO_128)));
+ logoLabel->setPixmap(Icons::QTLOGO_128.pixmap());
layout->addWidget(logoLabel , 0, 0, 1, 1);
layout->addWidget(copyRightLabel, 0, 1, 4, 4);
layout->addWidget(buttonBox, 4, 0, 1, 5);
diff --git a/src/plugins/cppeditor/cppinsertvirtualmethods.cpp b/src/plugins/cppeditor/cppinsertvirtualmethods.cpp
index 55ac472eec..4e6a6172f7 100644
--- a/src/plugins/cppeditor/cppinsertvirtualmethods.cpp
+++ b/src/plugins/cppeditor/cppinsertvirtualmethods.cpp
@@ -31,7 +31,7 @@
#include "cppinsertvirtualmethods.h"
#include "cppquickfixassistant.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <cpptools/cppcodestylesettings.h>
#include <cpptools/cpptoolsreuse.h>
@@ -44,7 +44,6 @@
#include <cplusplus/Overview.h>
#include <utils/changeset.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QAction>
#include <QCheckBox>
@@ -1029,7 +1028,7 @@ void InsertVirtualMethodsDialog::initGui()
m_overrideReplacementComboBox, &QComboBox::setEnabled);
QAction *clearUserAddedReplacements = new QAction(this);
- clearUserAddedReplacements->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_CLEAN_PANE)));
+ clearUserAddedReplacements->setIcon(Core::Icons::CLEAN_PANE.icon());
clearUserAddedReplacements->setText(tr("Clear Added \"override\" Equivalents"));
connect(clearUserAddedReplacements, &QAction::triggered, [this]() {
m_availableOverrideReplacements = defaultOverrideReplacements();
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 6f913f5a1c..5629c9bee8 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -33,6 +33,7 @@
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerengine.h"
+#include "debuggericons.h"
#include "debuggerinternalconstants.h"
#include "debuggerstringutils.h"
#include "simplifytype.h"
@@ -265,39 +266,39 @@ BreakHandler::BreakHandler()
QIcon BreakHandler::breakpointIcon()
{
- static QIcon icon(_(":/debugger/images/breakpoint_16.png"));
+ static QIcon icon = Icons::BREAKPOINT.icon();
return icon;
}
QIcon BreakHandler::disabledBreakpointIcon()
{
- static QIcon icon(_(":/debugger/images/breakpoint_disabled_16.png"));
+ static QIcon icon = Icons::BREAKPOINT_DISABLED.icon();
return icon;
}
QIcon BreakHandler::pendingBreakpointIcon()
{
- static QIcon icon(_(":/debugger/images/breakpoint_pending_16.png"));
+ static QIcon icon = Icons::BREAKPOINT_PENDING.icon();
return icon;
}
QIcon BreakHandler::watchpointIcon()
{
- static QIcon icon(_(":/debugger/images/watchpoint.png"));
+ static QIcon icon = Icons::WATCHPOINT.icon();
return icon;
}
QIcon BreakHandler::tracepointIcon()
{
- static QIcon icon(_(":/debugger/images/tracepoint.png"));
+ static QIcon icon = Icons::TRACEPOINT.icon();
return icon;
}
QIcon BreakHandler::emptyIcon()
{
- static QIcon icon(_(":/debugger/images/breakpoint_pending_16.png"));
- //static QIcon icon(_(":/debugger/images/watchpoint.png"));
- //static QIcon icon(_(":/debugger/images/debugger_empty_14.png"));
+ static QIcon icon = Icons::BREAKPOINT_PENDING.icon();
+ //static QIcon icon = Icons::WATCHPOINT.icon();
+ //static QIcon icon = Icons::EMPTY.icon();
return icon;
}
diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp
index 53dc281ff9..9b54316e79 100644
--- a/src/plugins/debugger/breakwindow.cpp
+++ b/src/plugins/debugger/breakwindow.cpp
@@ -33,6 +33,7 @@
#include "debuggerengine.h"
#include "debuggeractions.h"
#include "debuggercore.h"
+#include "debuggericons.h"
#include <coreplugin/mainwindow.h>
#include <utils/checkablemessagebox.h>
@@ -683,7 +684,7 @@ MultiBreakPointsDialog::MultiBreakPointsDialog(QWidget *parent) :
BreakTreeView::BreakTreeView()
{
- setWindowIcon(QIcon(QLatin1String(":/debugger/images/debugger_breakpoints.png")));
+ setWindowIcon(Icons::BREAKPOINTS.icon());
setSelectionMode(QAbstractItemView::ExtendedSelection);
connect(action(UseAddressInBreakpointsView), &QAction::toggled,
this, &BreakTreeView::showAddressColumn);
diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro
index c40bd63222..be0c5a7de7 100644
--- a/src/plugins/debugger/debugger.pro
+++ b/src/plugins/debugger/debugger.pro
@@ -69,7 +69,8 @@ HEADERS += \
localsandexpressionswindow.h \
imageviewer.h \
simplifytype.h \
- unstartedappwatcherdialog.h
+ unstartedappwatcherdialog.h \
+ debuggericons.h
SOURCES += \
breakhandler.cpp \
diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs
index 24aa2dc43c..aa6cefd93e 100644
--- a/src/plugins/debugger/debugger.qbs
+++ b/src/plugins/debugger/debugger.qbs
@@ -35,6 +35,7 @@ QtcPlugin {
"debugger_global.h",
"debuggeractions.cpp", "debuggeractions.h",
"debuggerconstants.h",
+ "debuggericons.h",
"debuggercore.h",
"debuggerdialogs.cpp", "debuggerdialogs.h",
"debuggerengine.cpp", "debuggerengine.h",
diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp
index dd2bd488c2..d3788703f1 100644
--- a/src/plugins/debugger/debuggeractions.cpp
+++ b/src/plugins/debugger/debuggeractions.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "debuggeractions.h"
+#include "debuggericons.h"
#ifdef Q_OS_WIN
#include "registerpostmortemaction.h"
@@ -38,7 +39,6 @@
#include <coreplugin/icore.h>
#include <utils/savedaction.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QDebug>
#include <QSettings>
@@ -177,8 +177,7 @@ DebuggerSettings::DebuggerSettings()
item->setText(tr("Operate by Instruction"));
item->setCheckable(true);
item->setDefaultValue(false);
- item->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(":/debugger/images/debugger_singleinstructionmode.png")));
+ item->setIcon(Debugger::Icons::SINGLE_INSTRUCTION_MODE.icon());
item->setToolTip(tr("<p>This switches the debugger to instruction-wise "
"operation mode. In this mode, stepping operates on single "
"instructions and the source location view also shows the "
diff --git a/src/plugins/debugger/debuggericons.h b/src/plugins/debugger/debuggericons.h
new file mode 100644
index 0000000000..2fc4e69577
--- /dev/null
+++ b/src/plugins/debugger/debuggericons.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms and
+** conditions see http://www.qt.io/terms-conditions. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef DEBUGGERICONS_H
+#define DEBUGGERICONS_H
+
+#include <utils/icon.h>
+
+namespace Debugger {
+namespace Icons {
+
+const Utils::Icon BREAKPOINT(
+ QLatin1String(":/debugger/images/breakpoint_16.png"));
+const Utils::Icon BREAKPOINT_DISABLED(
+ QLatin1String(":/debugger/images/breakpoint_disabled_16.png"));
+const Utils::Icon BREAKPOINT_PENDING(
+ QLatin1String(":/debugger/images/breakpoint_pending_16.png"));
+const Utils::Icon BREAKPOINTS(
+ QLatin1String(":/debugger/images/debugger_breakpoints.png"));
+const Utils::Icon WATCHPOINT(
+ QLatin1String(":/debugger/images/watchpoint.png"));
+const Utils::Icon TRACEPOINT(
+ QLatin1String(":/debugger/images/tracepoint.png"));
+const Utils::Icon CONTINUE(
+ QLatin1String(":/debugger/images/debugger_continue.png"));
+const Utils::Icon INTERRUPT(
+ QLatin1String(":/debugger/images/debugger_interrupt.png"));
+const Utils::Icon LOCATION(
+ QLatin1String(":/debugger/images/location_16.png"));
+const Utils::Icon SNAPSHOT(
+ QLatin1String(":/debugger/images/debugger_snapshot_small.png"));
+const Utils::Icon REVERSE_MODE(
+ QLatin1String(":/debugger/images/debugger_reversemode_16.png"));
+const Utils::Icon APPLY_ON_SAVE(
+ QLatin1String(":/debugger/images/qml/apply-on-save.png"));
+const Utils::Icon APP_ON_TOP(
+ QLatin1String(":/debugger/images/qml/app-on-top.png"));
+const Utils::Icon SELECT(
+ QLatin1String(":/debugger/images/qml/select.png"));
+const Utils::Icon EMPTY(
+ QLatin1String(":/debugger/images/debugger_empty_14.png"));
+
+const Utils::Icon STEP_OVER({
+ {QLatin1String(":/debugger/images/debugger_stepover_small.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon STEP_OVER_TOOLBUTTON({
+ {QLatin1String(":/debugger/images/debugger_stepover_small.png"), Utils::Theme::TextColorNormal}}, Utils::Icon::Style::Tinted);
+const Utils::Icon STEP_INTO({
+ {QLatin1String(":/debugger/images/debugger_stepinto_small.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon STEP_OUT({
+ {QLatin1String(":/debugger/images/debugger_stepout_small.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon RESTART({
+ {QLatin1String(":/debugger/images/debugger_restart_small.png"), Utils::Theme::IconsRunColor}});
+const Utils::Icon SINGLE_INSTRUCTION_MODE({
+ {QLatin1String(":/debugger/images/debugger_singleinstructionmode.png"), Utils::Theme::IconsBaseColor}});
+
+} // namespace Icons
+} // namespace Debugger
+
+#endif // DEBUGGERICONS_H
diff --git a/src/plugins/debugger/debuggeroptionspage.cpp b/src/plugins/debugger/debuggeroptionspage.cpp
index ea310b1a54..b76adb4c50 100644
--- a/src/plugins/debugger/debuggeroptionspage.cpp
+++ b/src/plugins/debugger/debuggeroptionspage.cpp
@@ -32,7 +32,7 @@
#include "debuggeritemmanager.h"
#include "debuggeritem.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -70,7 +70,7 @@ public:
QVariant data(int column, int role) const
{
- static QIcon errorIcon(QString::fromLatin1(Core::Constants::ICON_ERROR));
+ static const QIcon errorIcon = Core::Icons::ERROR.icon();
switch (role) {
case Qt::DisplayRole:
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 62295da7b5..743793ef5e 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -37,6 +37,7 @@
#include "debuggerkitconfigwidget.h"
#include "debuggerdialogs.h"
#include "debuggerengine.h"
+#include "debuggericons.h"
#include "debuggeritemmanager.h"
#include "debuggermainwindow.h"
#include "debuggerrunconfigurationaspect.h"
@@ -77,7 +78,7 @@
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/find/itemviewfind.h>
#include <coreplugin/imode.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/messagebox.h>
#include <coreplugin/messagemanager.h>
@@ -97,6 +98,7 @@
#include <projectexplorer/devicesupport/deviceprocesslist.h>
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
#include <projectexplorer/projectexplorer.h>
+#include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/projecttree.h>
#include <projectexplorer/projectexplorersettings.h>
#include <projectexplorer/project.h>
@@ -116,7 +118,6 @@
#include <utils/savedaction.h>
#include <utils/statuslabel.h>
#include <utils/styledbar.h>
-#include <utils/themehelper.h>
#include <utils/winutils.h>
#include <QApplication>
@@ -2346,14 +2347,14 @@ void DebuggerPluginPrivate::extensionsInitialized()
const Context cppDebuggercontext(C_CPPDEBUGGER);
const Context cppeditorcontext(CppEditor::Constants::CPPEDITOR_ID);
- m_startIcon = ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_START_SMALL));
- m_exitIcon = ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_EXIT_SMALL));
- m_continueIcon = ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_CONTINUE_SMALL));
- m_continueIcon.addFile(_(":/debugger/images/debugger_continue.png"));
- m_interruptIcon = ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_INTERRUPT_SMALL));
- m_interruptIcon.addFile(_(":/debugger/images/debugger_interrupt.png"));
- m_locationMarkIcon = QIcon(_(":/debugger/images/location_16.png"));
- m_resetIcon = ThemeHelper::themedIcon(_(":/debugger/images/debugger_restart_small.png|IconsRunColor"));
+ m_startIcon = Core::Icons::DEBUG_START_SMALL.icon();
+ m_exitIcon = Core::Icons::DEBUG_EXIT_SMALL.icon();
+ m_continueIcon = Core::Icons::DEBUG_CONTINUE_SMALL.icon();
+ m_continueIcon.addPixmap(Icons::CONTINUE.pixmap());
+ m_interruptIcon = Core::Icons::DEBUG_INTERRUPT_SMALL.icon();
+ m_interruptIcon.addPixmap(Icons::INTERRUPT.pixmap());
+ m_locationMarkIcon = Icons::LOCATION.icon();
+ m_resetIcon = Icons::RESTART.icon();
m_busy = false;
@@ -2443,15 +2444,15 @@ void DebuggerPluginPrivate::extensionsInitialized()
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleReset);
act = m_nextAction = new QAction(tr("Step Over"), this);
- act->setIcon(ThemeHelper::themedIcon(_(":/debugger/images/debugger_stepover_small.png")));
+ act->setIcon(Icons::STEP_OVER.icon());
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecNext);
act = m_stepAction = new QAction(tr("Step Into"), this);
- act->setIcon(ThemeHelper::themedIcon(_(":/debugger/images/debugger_stepinto_small.png")));
+ act->setIcon(Icons::STEP_INTO.icon());
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecStep);
act = m_stepOutAction = new QAction(tr("Step Out"), this);
- act->setIcon(ThemeHelper::themedIcon(_(":/debugger/images/debugger_stepout_small.png")));
+ act->setIcon(Icons::STEP_OUT.icon());
connect(act, &QAction::triggered, this, &DebuggerPluginPrivate::handleExecStepOut);
act = m_runToLineAction = new QAction(tr("Run to Line"), this);
@@ -2478,14 +2479,13 @@ void DebuggerPluginPrivate::extensionsInitialized()
//m_snapshotAction = new QAction(tr("Create Snapshot"), this);
//m_snapshotAction->setProperty(Role, RequestCreateSnapshotRole);
- //m_snapshotAction->setIcon(
- // QIcon(__(":/debugger/images/debugger_snapshot_small.png")));
+ //m_snapshotAction->setIcon(Icons::SNAPSHOT.icon());
act = m_reverseDirectionAction = new QAction(tr("Reverse Direction"), this);
act->setCheckable(true);
act->setChecked(false);
act->setCheckable(false);
- act->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_reversemode_16.png")));
+ act->setIcon(Icons::REVERSE_MODE.icon());
act->setIconVisibleInMenu(false);
act = m_frameDownAction = new QAction(tr("Move to Called Frame"), this);
@@ -2536,8 +2536,8 @@ void DebuggerPluginPrivate::extensionsInitialized()
// The main "Start Debugging" action.
act = m_startAction = new QAction(this);
- QIcon debuggerIcon(ThemeHelper::themedIcon(_(Core::Constants::ICON_DEBUG_START_SMALL)));
- debuggerIcon.addFile(QLatin1String(":/projectexplorer/images/debugger_start.png"));
+ QIcon debuggerIcon(Core::Icons::DEBUG_START_SMALL.icon());
+ debuggerIcon.addPixmap(ProjectExplorer::Icons::DEBUG_START.pixmap());
act->setIcon(debuggerIcon);
act->setText(tr("Start Debugging"));
connect(act, &QAction::triggered, [] { ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DEBUG_RUN_MODE); });
@@ -2766,28 +2766,28 @@ void DebuggerPluginPrivate::extensionsInitialized()
// currently broken
// QAction *qmlUpdateOnSaveDummyAction = new QAction(tr("Apply Changes on Save"), this);
// qmlUpdateOnSaveDummyAction->setCheckable(true);
-// qmlUpdateOnSaveDummyAction->setIcon(QIcon(_(":/debugger/images/qml/apply-on-save.png")));
+// qmlUpdateOnSaveDummyAction->setIcon(Icons::APPLY_ON_SAVE.icon());
// qmlUpdateOnSaveDummyAction->setEnabled(false);
// cmd = ActionManager::registerAction(qmlUpdateOnSaveDummyAction, Constants::QML_UPDATE_ON_SAVE);
// debugMenu->addAction(cmd);
QAction *qmlShowAppOnTopDummyAction = new QAction(tr("Show Application on Top"), this);
qmlShowAppOnTopDummyAction->setCheckable(true);
- qmlShowAppOnTopDummyAction->setIcon(QIcon(_(":/debugger/images/qml/app-on-top.png")));
+ qmlShowAppOnTopDummyAction->setIcon(Icons::APP_ON_TOP.icon());
qmlShowAppOnTopDummyAction->setEnabled(false);
cmd = ActionManager::registerAction(qmlShowAppOnTopDummyAction, Constants::QML_SHOW_APP_ON_TOP);
debugMenu->addAction(cmd);
QAction *qmlSelectDummyAction = new QAction(tr("Select"), this);
qmlSelectDummyAction->setCheckable(true);
- qmlSelectDummyAction->setIcon(QIcon(_(":/debugger/images/qml/select.png")));
+ qmlSelectDummyAction->setIcon(Icons::SELECT.icon());
qmlSelectDummyAction->setEnabled(false);
cmd = ActionManager::registerAction(qmlSelectDummyAction, Constants::QML_SELECTTOOL);
debugMenu->addAction(cmd);
QAction *qmlZoomDummyAction = new QAction(tr("Zoom"), this);
qmlZoomDummyAction->setCheckable(true);
- qmlZoomDummyAction->setIcon(ThemeHelper::themedIcon(_(Core::Constants::ICON_ZOOM)));
+ qmlZoomDummyAction->setIcon(Core::Icons::ZOOM.icon());
qmlZoomDummyAction->setEnabled(false);
cmd = ActionManager::registerAction(qmlZoomDummyAction, Constants::QML_ZOOMTOOL);
debugMenu->addAction(cmd);
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index d4bbe51327..e2a4a561b6 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -58,6 +58,7 @@
#include <utils/qtcprocess.h>
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <qmldebug/qmldebugcommandlinearguments.h>
#include <qtsupport/qtkitinformation.h>
@@ -114,7 +115,7 @@ DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfig, DebuggerEngi
m_engine(engine),
m_running(false)
{
- setIcon(QLatin1String(Core::Constants::ICON_DEBUG_START_SMALL));
+ setIcon(Core::Icons::DEBUG_START_SMALL);
connect(this, &RunControl::finished, this, &DebuggerRunControl::handleFinished);
connect(engine, &DebuggerEngine::requestRemoteSetup,
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index e498dcebde..91a02ac3f2 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -41,6 +41,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
@@ -511,7 +512,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget()
auto copyButton = new QToolButton;
copyButton->setToolTip(DebuggerToolTipManager::tr("Copy Contents to Clipboard"));
- copyButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_COPY)));
+ copyButton->setIcon(Core::Icons::COPY.icon());
titleLabel = new DraggableLabel(this);
titleLabel->setMinimumWidth(40); // Ensure a draggable area even if text is empty.
diff --git a/src/plugins/debugger/logwindow.cpp b/src/plugins/debugger/logwindow.cpp
index 4d0c76fde7..8b1d4c6ea7 100644
--- a/src/plugins/debugger/logwindow.cpp
+++ b/src/plugins/debugger/logwindow.cpp
@@ -33,6 +33,7 @@
#include "debuggeractions.h"
#include "debuggercore.h"
#include "debuggerengine.h"
+#include "debuggericons.h"
#include <QDebug>
#include <QTime>
@@ -379,8 +380,8 @@ LogWindow::LogWindow(QWidget *parent)
m_commandEdit->setHistoryCompleter(QLatin1String("DebuggerInput"));
auto repeatButton = new QToolButton(this);
- repeatButton->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_stepover_small.png")));
- repeatButton->setIconSize(QSize(12, 12));
+ repeatButton->setIcon(Icons::STEP_OVER_TOOLBUTTON.icon());
+ repeatButton->setFixedSize(QSize(18, 18));
repeatButton->setToolTip(tr("Repeat last command for debug reasons."));
auto commandBox = new QHBoxLayout;
diff --git a/src/plugins/debugger/snapshothandler.cpp b/src/plugins/debugger/snapshothandler.cpp
index 11f9bcbcf8..bf689b4396 100644
--- a/src/plugins/debugger/snapshothandler.cpp
+++ b/src/plugins/debugger/snapshothandler.cpp
@@ -31,6 +31,7 @@
#include "snapshothandler.h"
#include "debuggerinternalconstants.h"
+#include "debuggericons.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggerstartparameters.h"
@@ -123,8 +124,8 @@ QDebug operator<<(QDebug d, const SnapshotData &f)
*/
SnapshotHandler::SnapshotHandler()
- : m_positionIcon(QIcon(QLatin1String(":/debugger/images/location_16.png"))),
- m_emptyIcon(QIcon(QLatin1String(":/debugger/images/debugger_empty_14.png")))
+ : m_positionIcon(Icons::LOCATION.icon()),
+ m_emptyIcon(Icons::EMPTY.icon())
{
m_currentIndex = -1;
}
diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp
index a792718d96..0d578870d3 100644
--- a/src/plugins/debugger/stackhandler.cpp
+++ b/src/plugins/debugger/stackhandler.cpp
@@ -32,6 +32,7 @@
#include "debuggeractions.h"
#include "debuggercore.h"
+#include "debuggericons.h"
#include "debuggerengine.h"
#include "debuggerprotocol.h"
#include "simplifytype.h"
@@ -59,8 +60,8 @@ namespace Internal {
StackHandler::StackHandler(DebuggerEngine *engine)
: m_engine(engine),
- m_positionIcon(QIcon(QLatin1String(":/debugger/images/location_16.png"))),
- m_emptyIcon(QIcon(QLatin1String(":/debugger/images/debugger_empty_14.png")))
+ m_positionIcon(Icons::LOCATION.icon()),
+ m_emptyIcon(Icons::EMPTY.icon())
{
setObjectName(QLatin1String("StackModel"));
m_resetLocationScheduled = false;
diff --git a/src/plugins/debugger/threadshandler.cpp b/src/plugins/debugger/threadshandler.cpp
index 2ba066ec2c..e595bcb081 100644
--- a/src/plugins/debugger/threadshandler.cpp
+++ b/src/plugins/debugger/threadshandler.cpp
@@ -31,6 +31,7 @@
#include "threadshandler.h"
#include "debuggercore.h"
+#include "debuggericons.h"
#include "debuggerprotocol.h"
#include "watchutils.h"
@@ -54,13 +55,13 @@ namespace Internal {
static const QIcon &positionIcon()
{
- static QIcon icon(QLatin1String(":/debugger/images/location_16.png"));
+ static QIcon icon = Icons::LOCATION.icon();
return icon;
}
static const QIcon &emptyIcon()
{
- static QIcon icon(QLatin1String(":/debugger/images/debugger_empty_14.png"));
+ static QIcon icon = Icons::EMPTY.icon();
return icon;
}
diff --git a/src/plugins/diffeditor/diffeditor.cpp b/src/plugins/diffeditor/diffeditor.cpp
index 7a9d9d0091..f01be54dec 100644
--- a/src/plugins/diffeditor/diffeditor.cpp
+++ b/src/plugins/diffeditor/diffeditor.cpp
@@ -30,11 +30,13 @@
#include "diffeditor.h"
#include "diffeditorconstants.h"
+#include "diffeditoricons.h"
#include "diffeditordocument.h"
#include "diffview.h"
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/minisplitter.h>
#include <texteditor/texteditor.h>
@@ -45,7 +47,6 @@
#include <utils/algorithm.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QAction>
#include <QStackedWidget>
@@ -283,16 +284,13 @@ DiffEditor::DiffEditor()
m_whitespaceButtonAction = m_toolBar->addAction(tr("Ignore Whitespace"));
m_whitespaceButtonAction->setCheckable(true);
- m_toggleDescriptionAction = m_toolBar->addAction(
- Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_TOP_BAR)), QString());
+ m_toggleDescriptionAction = m_toolBar->addAction(Icons::TOP_BAR.icon(), QString());
m_toggleDescriptionAction->setCheckable(true);
- m_reloadAction = m_toolBar->addAction(QIcon(QLatin1String(Core::Constants::ICON_RELOAD_GRAY)),
- tr("Reload Diff"));
+ m_reloadAction = m_toolBar->addAction(Core::Icons::RELOAD_GRAY.icon(), tr("Reload Diff"));
m_reloadAction->setToolTip(tr("Reload Diff"));
- m_toggleSyncAction = m_toolBar->addAction(
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_LINK)), QString());
+ m_toggleSyncAction = m_toolBar->addAction(Core::Icons::LINK.icon(), QString());
m_toggleSyncAction->setCheckable(true);
m_viewSwitcherAction = m_toolBar->addAction(QIcon(), QString());
diff --git a/src/plugins/diffeditor/diffeditor.pro b/src/plugins/diffeditor/diffeditor.pro
index 829e7367f5..1f5873626d 100644
--- a/src/plugins/diffeditor/diffeditor.pro
+++ b/src/plugins/diffeditor/diffeditor.pro
@@ -13,7 +13,8 @@ HEADERS += diffeditor_global.h \
diffview.h \
selectabletexteditorwidget.h \
sidebysidediffeditorwidget.h \
- unifieddiffeditorwidget.h
+ unifieddiffeditorwidget.h \
+ diffeditoricons.h
SOURCES += diffeditor.cpp \
diffeditorcontroller.cpp \
diff --git a/src/plugins/diffeditor/diffeditor.qbs b/src/plugins/diffeditor/diffeditor.qbs
index d7266c7dfc..b8f6c42c76 100644
--- a/src/plugins/diffeditor/diffeditor.qbs
+++ b/src/plugins/diffeditor/diffeditor.qbs
@@ -19,6 +19,7 @@ QtcPlugin {
"diffeditor.qrc",
"diffeditor_global.h",
"diffeditorconstants.h",
+ "diffeditoricons.h",
"diffeditorcontroller.cpp",
"diffeditorcontroller.h",
"diffeditordocument.cpp",
diff --git a/src/plugins/diffeditor/diffeditorconstants.h b/src/plugins/diffeditor/diffeditorconstants.h
index cb492cdd4e..7037417492 100644
--- a/src/plugins/diffeditor/diffeditorconstants.h
+++ b/src/plugins/diffeditor/diffeditorconstants.h
@@ -41,8 +41,6 @@ const char DIFF_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("DiffEditor", "Diff Ed
const char DIFF_EDITOR_MIMETYPE[] = "text/x-patch";
const char G_TOOLS_DIFF[] = "QtCreator.Group.Tools.Options";
-const char ICON_TOP_BAR[] = ":/diffeditor/images/topbar.png";
-
const char EXPAND_BRANCHES[] = "Branches: <Expand>";
} // namespace Constants
diff --git a/src/plugins/diffeditor/diffeditoricons.h b/src/plugins/diffeditor/diffeditoricons.h
new file mode 100644
index 0000000000..b3d0eb25e7
--- /dev/null
+++ b/src/plugins/diffeditor/diffeditoricons.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms and
+** conditions see http://www.qt.io/terms-conditions. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef DIFFEDITORICONS_H
+#define DIFFEDITORICONS_H
+
+#include <utils/icon.h>
+
+namespace DiffEditor {
+namespace Icons {
+
+const Utils::Icon TOP_BAR({
+ {QLatin1String(":/diffeditor/images/topbar.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon UNIFIED_DIFF({
+ {QLatin1String(":/diffeditor/images/unifieddiff.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon SIDEBYSIDE_DIFF({
+ {QLatin1String(":/diffeditor/images/sidebysidediff.png"), Utils::Theme::IconsBaseColor}});
+
+} // namespace Icons
+} // namespace DiffEditor
+
+#endif // DIFFEDITORICONS_H
diff --git a/src/plugins/diffeditor/diffview.cpp b/src/plugins/diffeditor/diffview.cpp
index bb70085c90..0a43518c9f 100644
--- a/src/plugins/diffeditor/diffview.cpp
+++ b/src/plugins/diffeditor/diffview.cpp
@@ -30,11 +30,11 @@
#include "diffview.h"
+#include "diffeditoricons.h"
#include "unifieddiffeditorwidget.h"
#include "sidebysidediffeditorwidget.h"
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QCoreApplication>
@@ -97,8 +97,7 @@ void IDiffView::setSyncToolTip(const QString &text)
UnifiedView::UnifiedView() : m_widget(0)
{
setId(UNIFIED_VIEW_ID);
- setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(":/diffeditor/images/unifieddiff.png")));
+ setIcon(Icons::UNIFIED_DIFF.icon());
setToolTip(QCoreApplication::translate("DiffEditor::UnifiedView", "Switch to Unified Diff Editor"));
}
@@ -154,8 +153,7 @@ void UnifiedView::setSync(bool sync)
SideBySideView::SideBySideView() : m_widget(0)
{
setId(SIDE_BY_SIDE_VIEW_ID);
- setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(":/diffeditor/images/sidebysidediff.png")));
+ setIcon(Icons::UNIFIED_DIFF.icon());
setToolTip(QCoreApplication::translate("DiffEditor::SideBySideView",
"Switch to Side By Side Diff Editor"));
setSupportsSync(true);
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index e78e2df06a..07394e79c1 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -49,6 +49,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
@@ -721,7 +722,7 @@ class RebaseItemDelegate : public IconItemDelegate
{
public:
RebaseItemDelegate(LogChangeWidget *widget)
- : IconItemDelegate(widget, QLatin1String(Core::Constants::ICON_UNDO))
+ : IconItemDelegate(widget, Core::Icons::UNDO.imageFileName())
{
}
diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp
index 19bfdfe888..eabd61e319 100644
--- a/src/plugins/git/gitsubmiteditorwidget.cpp
+++ b/src/plugins/git/gitsubmiteditorwidget.cpp
@@ -34,8 +34,8 @@
#include "logchangedialog.h"
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/completingtextedit.h>
-#include <utils/themehelper.h>
#include <QRegExpValidator>
#include <QTextEdit>
@@ -61,8 +61,7 @@ GitSubmitEditorWidget::GitSubmitEditorWidget() :
new GitSubmitHighlighter(descriptionEdit());
m_emailValidator = new QRegExpValidator(QRegExp(QLatin1String("[^@ ]+@[^@ ]+\\.[a-zA-Z]+")), this);
- const QPixmap error =
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_ERROR));
+ const QPixmap error = Core::Icons::ERROR.pixmap();
m_gitSubmitPanelUi.invalidAuthorLabel->setPixmap(error);
m_gitSubmitPanelUi.invalidEmailLabel->setToolTip(tr("Provide a valid email to commit."));
m_gitSubmitPanelUi.invalidEmailLabel->setPixmap(error);
diff --git a/src/plugins/help/help.qbs b/src/plugins/help/help.qbs
index 20d225ae6d..56ab475655 100644
--- a/src/plugins/help/help.qbs
+++ b/src/plugins/help/help.qbs
@@ -41,6 +41,7 @@ QtcPlugin {
"generalsettingspage.cpp", "generalsettingspage.h", "generalsettingspage.ui",
"help.qrc",
"helpconstants.h",
+ "helpicons.h",
"helpfindsupport.cpp", "helpfindsupport.h",
"helpindexfilter.cpp", "helpindexfilter.h",
"helpmode.cpp", "helpmode.h",
diff --git a/src/plugins/help/helpindexfilter.cpp b/src/plugins/help/helpindexfilter.cpp
index d3d9f2f074..b45ad46643 100644
--- a/src/plugins/help/helpindexfilter.cpp
+++ b/src/plugins/help/helpindexfilter.cpp
@@ -31,6 +31,7 @@
#include "helpindexfilter.h"
#include "centralwidget.h"
+#include "helpicons.h"
#include <topicchooser.h>
@@ -58,7 +59,7 @@ HelpIndexFilter::HelpIndexFilter()
setIncludedByDefault(false);
setShortcutString(QString(QLatin1Char('?')));
- m_icon = QIcon(QLatin1String(":/help/images/bookmark.png"));
+ m_icon = Icons::BOOKMARK.icon();
connect(HelpManager::instance(), &HelpManager::setupFinished,
this, &HelpIndexFilter::invalidateCache);
connect(HelpManager::instance(), &HelpManager::documentationChanged,
diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp
index 873a8a3c2c..6ecaa9c362 100644
--- a/src/plugins/help/helpwidget.cpp
+++ b/src/plugins/help/helpwidget.cpp
@@ -33,6 +33,7 @@
#include "bookmarkmanager.h"
#include "contentwindow.h"
#include "helpconstants.h"
+#include "helpicons.h"
#include "helpplugin.h"
#include "helpviewer.h"
#include "indexwindow.h"
@@ -45,6 +46,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/findplaceholder.h>
#include <coreplugin/minisplitter.h>
@@ -52,7 +54,6 @@
#include <texteditor/texteditorconstants.h>
#include <utils/qtcassert.h>
#include <utils/styledbar.h>
-#include <utils/themehelper.h>
#include <QCoreApplication>
#include <QHBoxLayout>
@@ -132,7 +133,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
setAttribute(Qt::WA_QuitOnClose, false); // don't prevent Qt Creator from closing
}
if (style != SideBarWidget) {
- m_toggleSideBarAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_TOGGLE_SIDEBAR)),
+ m_toggleSideBarAction = new QAction(Core::Icons::TOGGLE_SIDEBAR.icon(),
QCoreApplication::translate("Core", Core::Constants::TR_SHOW_SIDEBAR),
toolBar);
m_toggleSideBarAction->setCheckable(true);
@@ -163,14 +164,12 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
layout->addWidget(Core::Command::toolButtonWithAppendedShortcut(m_switchToHelp, cmd));
}
- m_homeAction = new QAction(QIcon(QLatin1String(":/help/images/home.png")),
- tr("Home"), this);
+ m_homeAction = new QAction(Icons::HOME.icon(), tr("Home"), this);
cmd = Core::ActionManager::registerAction(m_homeAction, Constants::HELP_HOME, context);
connect(m_homeAction, &QAction::triggered, this, &HelpWidget::goHome);
layout->addWidget(Core::Command::toolButtonWithAppendedShortcut(m_homeAction, cmd));
- m_backAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_PREV)),
- tr("Back"), toolBar);
+ m_backAction = new QAction(Core::Icons::PREV.icon(), tr("Back"), toolBar);
connect(m_backAction, &QAction::triggered, this, &HelpWidget::backward);
m_backMenu = new QMenu(toolBar);
connect(m_backMenu, &QMenu::aboutToShow, this, &HelpWidget::updateBackMenu);
@@ -181,8 +180,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
button->setPopupMode(QToolButton::DelayedPopup);
layout->addWidget(button);
- m_forwardAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_NEXT)),
- tr("Forward"), toolBar);
+ m_forwardAction = new QAction(Core::Icons::NEXT.icon(), tr("Forward"), toolBar);
connect(m_forwardAction, &QAction::triggered, this, &HelpWidget::forward);
m_forwardMenu = new QMenu(toolBar);
connect(m_forwardMenu, &QMenu::aboutToShow, this, &HelpWidget::updateForwardMenu);
@@ -193,8 +191,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
button->setPopupMode(QToolButton::DelayedPopup);
layout->addWidget(button);
- m_addBookmarkAction = new QAction(QIcon(QLatin1String(":/help/images/bookmark.png")),
- tr("Add Bookmark"), this);
+ m_addBookmarkAction = new QAction(Icons::BOOKMARK.icon(), tr("Add Bookmark"), this);
cmd = Core::ActionManager::registerAction(m_addBookmarkAction, Constants::HELP_ADDBOOKMARK, context);
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
connect(m_addBookmarkAction, &QAction::triggered, this, &HelpWidget::addBookmark);
@@ -253,8 +250,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
}
if (style != ExternalWindow) {
- m_closeAction = new QAction(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_BUTTON_CLOSE)),
- QString(), toolBar);
+ m_closeAction = new QAction(Core::Icons::BUTTON_CLOSE.icon(), QString(), toolBar);
connect(m_closeAction, SIGNAL(triggered()), this, SIGNAL(closeButtonClicked()));
button = new QToolButton;
button->setDefaultAction(m_closeAction);
diff --git a/src/plugins/help/searchwidget.cpp b/src/plugins/help/searchwidget.cpp
index 8a993eb942..c69935b803 100644
--- a/src/plugins/help/searchwidget.cpp
+++ b/src/plugins/help/searchwidget.cpp
@@ -35,6 +35,7 @@
#include "openpagesmanager.h"
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <utils/styledbar.h>
@@ -312,7 +313,7 @@ SearchSideBarItem::SearchSideBarItem()
QList<QToolButton *> SearchSideBarItem::createToolBarWidgets()
{
QToolButton *reindexButton = new QToolButton;
- reindexButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RELOAD_GRAY)));
+ reindexButton->setIcon(Core::Icons::RELOAD_GRAY.icon());
reindexButton->setToolTip(tr("Regenerate Index"));
connect(reindexButton, SIGNAL(clicked()),
widget(), SLOT(reindexDocumentation()));
diff --git a/src/plugins/help/xbelsupport.cpp b/src/plugins/help/xbelsupport.cpp
index 478ff29f74..5aa2bf8443 100644
--- a/src/plugins/help/xbelsupport.cpp
+++ b/src/plugins/help/xbelsupport.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "xbelsupport.h"
+#include "helpicons.h"
#include <bookmarkmanager.h>
@@ -101,7 +102,7 @@ XbelReader::XbelReader(BookmarkModel *tree, BookmarkModel *list)
, treeModel(tree)
, listModel(list)
{
- bookmarkIcon = QIcon(QLatin1String(":/help/images/bookmark.png"));
+ bookmarkIcon = Icons::BOOKMARK.icon();
folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon);
}
diff --git a/src/plugins/imageviewer/imageviewer.cpp b/src/plugins/imageviewer/imageviewer.cpp
index 1614ea3032..a629a6d729 100644
--- a/src/plugins/imageviewer/imageviewer.cpp
+++ b/src/plugins/imageviewer/imageviewer.cpp
@@ -36,12 +36,12 @@
#include "imageview.h"
#include "ui_imageviewertoolbar.h"
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QMap>
#include <QFileInfo>
@@ -106,12 +106,9 @@ void ImageViewer::ctor()
// toolbar
d->toolbar = new QWidget();
d->ui_toolbar.setupUi(d->toolbar);
- d->ui_toolbar.toolButtonZoomIn->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_PLUS)));
- d->ui_toolbar.toolButtonZoomOut->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_MINUS)));
- d->ui_toolbar.toolButtonFitToScreen->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_ZOOM)));
+ d->ui_toolbar.toolButtonZoomIn->setIcon(Core::Icons::PLUS.icon());
+ d->ui_toolbar.toolButtonZoomOut->setIcon(Core::Icons::MINUS.icon());
+ d->ui_toolbar.toolButtonFitToScreen->setIcon(Core::Icons::ZOOM.icon());
// icons update - try to use system theme
updateButtonIconByTheme(d->ui_toolbar.toolButtonZoomIn, QLatin1String("zoom-in"));
diff --git a/src/plugins/ios/iosruncontrol.cpp b/src/plugins/ios/iosruncontrol.cpp
index b4ce5689fc..722d9e0840 100644
--- a/src/plugins/ios/iosruncontrol.cpp
+++ b/src/plugins/ios/iosruncontrol.cpp
@@ -33,7 +33,7 @@
#include "iosrunconfiguration.h"
#include "iosrunner.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <projectexplorer/projectexplorerconstants.h>
using namespace ProjectExplorer;
@@ -46,7 +46,7 @@ IosRunControl::IosRunControl(IosRunConfiguration *rc)
, m_runner(new IosRunner(this, rc, false, QmlDebug::NoQmlDebugServices))
, m_running(false)
{
- setIcon(QLatin1String(Core::Constants::ICON_DEBUG_START_SMALL));
+ setIcon(Core::Icons::DEBUG_START_SMALL);
}
IosRunControl::~IosRunControl()
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp
index 237bea2a61..473ad56951 100644
--- a/src/plugins/projectexplorer/appoutputpane.cpp
+++ b/src/plugins/projectexplorer/appoutputpane.cpp
@@ -30,6 +30,7 @@
#include "appoutputpane.h"
#include "projectexplorer.h"
+#include "projectexplorericons.h"
#include "projectexplorersettings.h"
#include "runconfiguration.h"
#include "session.h"
@@ -37,7 +38,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/outputwindow.h>
#include <coreplugin/find/basetextfind.h>
#include <coreplugin/coreconstants.h>
@@ -51,7 +52,6 @@
#include <utils/algorithm.h>
#include <utils/outputformatter.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QAction>
#include <QVBoxLayout>
@@ -164,7 +164,7 @@ AppOutputPane::AppOutputPane() :
setObjectName(QLatin1String("AppOutputPane")); // Used in valgrind engine
// Rerun
- m_reRunButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_RUN_SMALL)));
+ m_reRunButton->setIcon(Icons::RUN_SMALL.icon());
m_reRunButton->setToolTip(tr("Re-run this run-configuration"));
m_reRunButton->setAutoRaise(true);
m_reRunButton->setEnabled(false);
@@ -172,7 +172,7 @@ AppOutputPane::AppOutputPane() :
this, SLOT(reRunRunControl()));
// Stop
- m_stopAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_STOP_SMALL)));
+ m_stopAction->setIcon(Icons::STOP_SMALL.icon());
m_stopAction->setToolTip(tr("Stop"));
m_stopAction->setEnabled(false);
@@ -187,24 +187,21 @@ AppOutputPane::AppOutputPane() :
// Attach
m_attachButton->setToolTip(msgAttachDebuggerTooltip());
m_attachButton->setEnabled(false);
- m_attachButton->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_DEBUG_START_SMALL)));
+ m_attachButton->setIcon(Core::Icons::DEBUG_START_SMALL.icon());
m_attachButton->setAutoRaise(true);
connect(m_attachButton, SIGNAL(clicked()),
this, SLOT(attachToRunControl()));
m_zoomInButton->setToolTip(tr("Increase Font Size"));
- m_zoomInButton->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_PLUS)));
+ m_zoomInButton->setIcon(Core::Icons::PLUS.icon());
m_zoomInButton->setAutoRaise(true);
connect(m_zoomInButton, &QToolButton::clicked,
this, &AppOutputPane::zoomIn);
m_zoomOutButton->setToolTip(tr("Decrease Font Size"));
- m_zoomOutButton->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_MINUS)));
+ m_zoomOutButton->setIcon(Core::Icons::MINUS.icon());
m_zoomOutButton->setAutoRaise(true);
connect(m_zoomOutButton, &QToolButton::clicked,
@@ -422,7 +419,7 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
Core::Context context(contextId);
Core::OutputWindow *ow = new Core::OutputWindow(context, m_tabWidget);
ow->setWindowTitle(tr("Application Output Window"));
- ow->setWindowIcon(QIcon(QLatin1String(Constants::ICON_WINDOW)));
+ ow->setWindowIcon(Icons::WINDOW.icon());
ow->setFormatter(formatter);
ow->setWordWrapEnabled(ProjectExplorerPlugin::projectExplorerSettings().wrapAppOutput);
ow->setMaxLineCount(ProjectExplorerPlugin::projectExplorerSettings().maxAppOutputLines);
@@ -642,7 +639,7 @@ void AppOutputPane::enableButtons(const RunControl *rc /* = 0 */, bool isRunning
{
if (rc) {
m_reRunButton->setEnabled(!isRunning && rc->supportsReRunning());
- m_reRunButton->setIcon(Utils::ThemeHelper::themedIcon(rc->icon()));
+ m_reRunButton->setIcon(rc->icon().icon());
m_stopAction->setEnabled(isRunning);
if (isRunning && debuggerPlugin() && rc->applicationProcessHandle().isValid()) {
m_attachButton->setEnabled(true);
@@ -655,7 +652,7 @@ void AppOutputPane::enableButtons(const RunControl *rc /* = 0 */, bool isRunning
m_zoomOutButton->setEnabled(true);
} else {
m_reRunButton->setEnabled(false);
- m_reRunButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_RUN_SMALL)));
+ m_reRunButton->setIcon(Icons::RUN_SMALL.icon());
m_attachButton->setEnabled(false);
m_attachButton->setToolTip(msgAttachDebuggerTooltip());
m_stopAction->setEnabled(false);
diff --git a/src/plugins/projectexplorer/buildprogress.cpp b/src/plugins/projectexplorer/buildprogress.cpp
index c44194a952..219fbbff1c 100644
--- a/src/plugins/projectexplorer/buildprogress.cpp
+++ b/src/plugins/projectexplorer/buildprogress.cpp
@@ -31,9 +31,8 @@
#include "buildprogress.h"
#include "projectexplorerconstants.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/stylehelper.h>
-#include <utils/themehelper.h>
#include <QVBoxLayout>
#include <QHBoxLayout>
@@ -88,10 +87,8 @@ BuildProgress::BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation
m_errorIcon->setAlignment(Qt::AlignRight);
m_warningIcon->setAlignment(Qt::AlignRight);
- m_errorIcon->setPixmap(Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_ERROR)));
- m_warningIcon->setPixmap(Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ m_errorIcon->setPixmap(Core::Icons::ERROR.pixmap());
+ m_warningIcon->setPixmap(Core::Icons::WARNING.pixmap());
m_contentWidget->hide();
diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp
index 72a5b009b8..2a90abdc55 100644
--- a/src/plugins/projectexplorer/buildstepspage.cpp
+++ b/src/plugins/projectexplorer/buildstepspage.cpp
@@ -35,7 +35,7 @@
#include "projectexplorerconstants.h"
#include <coreplugin/icore.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h>
#include <utils/detailswidget.h>
@@ -109,7 +109,7 @@ ToolWidget::ToolWidget(QWidget *parent)
m_removeButton->setToolTip(BuildStepListWidget::tr("Remove Item"));
m_removeButton->setFixedSize(buttonSize);
m_removeButton->setIcon(QIcon(creatorTheme()->imageFile(Theme::BuildStepRemove,
- QLatin1String(Core::Constants::ICON_DARK_CLOSE))));
+ Core::Icons::DARK_CLOSE.imageFileName())));
hbox->addWidget(m_removeButton);
layout->addWidget(m_secondWidget);
diff --git a/src/plugins/projectexplorer/compileoutputwindow.cpp b/src/plugins/projectexplorer/compileoutputwindow.cpp
index 14559bc1b2..6f04097b71 100644
--- a/src/plugins/projectexplorer/compileoutputwindow.cpp
+++ b/src/plugins/projectexplorer/compileoutputwindow.cpp
@@ -33,20 +33,20 @@
#include "showoutputtaskhandler.h"
#include "task.h"
#include "projectexplorer.h"
+#include "projectexplorericons.h"
#include "projectexplorersettings.h"
#include "taskhub.h"
#include <coreplugin/outputwindow.h>
#include <coreplugin/find/basetextfind.h>
#include <coreplugin/icore.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <extensionsystem/pluginmanager.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h>
#include <texteditor/behaviorsettings.h>
#include <utils/ansiescapecodehandler.h>
#include <utils/theme/theme.h>
-#include <utils/themehelper.h>
#include <QIcon>
#include <QTextCharFormat>
@@ -156,7 +156,7 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
Core::Context context(Constants::C_COMPILE_OUTPUT);
m_outputWindow = new CompileOutputTextEdit(context);
m_outputWindow->setWindowTitle(tr("Compile Output"));
- m_outputWindow->setWindowIcon(QIcon(QLatin1String(Constants::ICON_WINDOW)));
+ m_outputWindow->setWindowIcon(Icons::WINDOW.icon());
m_outputWindow->setReadOnly(true);
m_outputWindow->setUndoRedoEnabled(false);
m_outputWindow->setMaxLineCount(MAX_LINECOUNT);
@@ -172,11 +172,9 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
m_cancelBuildButton->setDefaultAction(cancelBuildAction);
m_zoomInButton->setToolTip(tr("Increase Font Size"));
- m_zoomInButton->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_PLUS)));
+ m_zoomInButton->setIcon(Core::Icons::PLUS.icon());
m_zoomOutButton->setToolTip(tr("Decrease Font Size"));
- m_zoomOutButton->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_MINUS)));
+ m_zoomOutButton->setIcon(Core::Icons::MINUS.icon());
updateZoomEnabled();
diff --git a/src/plugins/projectexplorer/devicesupport/desktopdeviceconfigurationwidget.cpp b/src/plugins/projectexplorer/devicesupport/desktopdeviceconfigurationwidget.cpp
index 63257945b1..e2a53ae9bb 100644
--- a/src/plugins/projectexplorer/devicesupport/desktopdeviceconfigurationwidget.cpp
+++ b/src/plugins/projectexplorer/devicesupport/desktopdeviceconfigurationwidget.cpp
@@ -32,10 +32,9 @@
#include "ui_desktopdeviceconfigurationwidget.h"
#include <projectexplorer/projectexplorerconstants.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/portlist.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
using namespace ProjectExplorer::Constants;
@@ -75,8 +74,7 @@ void DesktopDeviceConfigurationWidget::initGui()
m_ui->machineTypeValueLabel->setText(tr("Physical Device"));
m_ui->freePortsLineEdit->setPlaceholderText(
QString::fromLatin1("eg: %1-%2").arg(DESKTOP_PORT_START).arg(DESKTOP_PORT_END));
- m_ui->portsWarningLabel->setPixmap(
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
+ m_ui->portsWarningLabel->setPixmap(Core::Icons::WARNING.pixmap());
m_ui->portsWarningLabel->setToolTip(QLatin1String("<font color=\"red\">")
+ tr("You will need at least one port for QML debugging.")
+ QLatin1String("</font>"));
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp
index 6dbcc602da..b46d5802f4 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.cpp
+++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp
@@ -39,7 +39,7 @@
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/fileutils.h>
#include <coreplugin/find/findplugin.h>
@@ -50,7 +50,6 @@
#include <utils/qtcassert.h>
#include <utils/elidinglabel.h>
#include <utils/itemviews.h>
-#include <utils/themehelper.h>
#include <QDebug>
#include <QSize>
@@ -168,8 +167,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent)
layout->setContentsMargins(0, 0, 0, 0);
setLayout(layout);
- m_toggleSync->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_LINK)));
+ m_toggleSync->setIcon(Core::Icons::LINK.icon());
m_toggleSync->setCheckable(true);
m_toggleSync->setToolTip(tr("Synchronize with Editor"));
setAutoSynchronization(true);
@@ -448,7 +446,7 @@ Core::NavigationView FolderNavigationWidgetFactory::createWidget()
FolderNavigationWidget *fnw = new FolderNavigationWidget;
n.widget = fnw;
QToolButton *filter = new QToolButton;
- filter->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
+ filter->setIcon(Core::Icons::FILTER.icon());
filter->setToolTip(tr("Filter Files"));
filter->setPopupMode(QToolButton::InstantPopup);
filter->setProperty("noArrow", true);
diff --git a/src/plugins/projectexplorer/kitmodel.cpp b/src/plugins/projectexplorer/kitmodel.cpp
index 29cdb2ca19..131e43df2b 100644
--- a/src/plugins/projectexplorer/kitmodel.cpp
+++ b/src/plugins/projectexplorer/kitmodel.cpp
@@ -34,10 +34,9 @@
#include "kitmanagerconfigwidget.h"
#include "kitmanager.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QApplication>
#include <QLayout>
@@ -85,13 +84,11 @@ public:
}
if (role == Qt::DecorationRole) {
if (!widget->isValid()) {
- static const QIcon errorIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_ERROR)));
+ static const QIcon errorIcon(Core::Icons::ERROR.icon());
return errorIcon;
}
if (widget->hasWarning()) {
- static const QIcon warningIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ static const QIcon warningIcon(Core::Icons::WARNING.icon());
return warningIcon;
}
return QIcon();
diff --git a/src/plugins/projectexplorer/localapplicationruncontrol.cpp b/src/plugins/projectexplorer/localapplicationruncontrol.cpp
index ad131c7742..f6abd2f3c8 100644
--- a/src/plugins/projectexplorer/localapplicationruncontrol.cpp
+++ b/src/plugins/projectexplorer/localapplicationruncontrol.cpp
@@ -33,6 +33,7 @@
#include "environmentaspect.h"
#include <projectexplorer/projectexplorerconstants.h>
+#include <projectexplorer/projectexplorericons.h>
#include <utils/qtcassert.h>
#include <utils/environment.h>
@@ -76,7 +77,7 @@ RunControl *LocalApplicationRunControlFactory::create(RunConfiguration *runConfi
LocalApplicationRunControl::LocalApplicationRunControl(RunConfiguration *rc, Core::Id mode)
: RunControl(rc, mode), m_runMode(ApplicationLauncher::Console), m_running(false)
{
- setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
+ setIcon(Icons::RUN_SMALL);
EnvironmentAspect *environment = rc->extraAspect<EnvironmentAspect>();
Utils::Environment env;
if (environment)
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 3f501c1e64..bd6aaa3af8 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -92,6 +92,7 @@
#include "targetsettingspanel.h"
#include "projectpanelfactory.h"
#include "waitforstopdialog.h"
+#include "projectexplorericons.h"
#ifdef Q_OS_WIN
# include "windebuginterface.h"
@@ -131,7 +132,6 @@
#include <utils/parameteraction.h>
#include <utils/qtcassert.h>
#include <utils/stringutils.h>
-#include <utils/themehelper.h>
#include <QtPlugin>
#include <QDebug>
@@ -704,8 +704,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
ActionContainer *runMenu = ActionManager::createMenu(Constants::RUNMENUCONTEXTMENU);
runMenu->setOnAllDisabledBehavior(ActionContainer::Hide);
- QIcon runIcon = QIcon(QLatin1String(Constants::ICON_RUN));
- runIcon.addPixmap(Utils::ThemeHelper::themedIconPixmap(QLatin1String(Constants::ICON_RUN_SMALL)));
+ QIcon runIcon = Icons::RUN.icon();
+ runIcon.addPixmap(Icons::RUN_SMALL.pixmap());
runMenu->menu()->setIcon(runIcon);
runMenu->menu()->setTitle(tr("Run"));
msubProjectContextMenu->addMenu(runMenu, ProjectExplorer::Constants::G_PROJECT_RUN);
@@ -839,8 +839,8 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
// build session action
- QIcon buildIcon = QIcon(QLatin1String(Constants::ICON_BUILD));
- buildIcon.addFile(QLatin1String(Constants::ICON_BUILD_SMALL));
+ QIcon buildIcon = Icons::BUILD.icon();
+ buildIcon.addPixmap(Icons::BUILD_SMALL.pixmap());
dd->m_buildSessionAction = new QAction(buildIcon, tr("Build All"), this);
cmd = ActionManager::registerAction(dd->m_buildSessionAction, Constants::BUILDSESSION);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+B")));
@@ -854,16 +854,16 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
msessionContextMenu->addAction(cmd, Constants::G_SESSION_BUILD);
// rebuild session action
- QIcon rebuildIcon = QIcon(QLatin1String(Constants::ICON_REBUILD));
- rebuildIcon.addFile(QLatin1String(Constants::ICON_REBUILD_SMALL));
+ QIcon rebuildIcon = Icons::REBUILD.icon();
+ rebuildIcon.addPixmap(Icons::REBUILD_SMALL.pixmap());
dd->m_rebuildSessionAction = new QAction(rebuildIcon, tr("Rebuild All"), this);
cmd = ActionManager::registerAction(dd->m_rebuildSessionAction, Constants::REBUILDSESSION);
mbuild->addAction(cmd, Constants::G_BUILD_REBUILD);
msessionContextMenu->addAction(cmd, Constants::G_SESSION_REBUILD);
// clean session
- QIcon cleanIcon = QIcon(QLatin1String(Constants::ICON_CLEAN));
- cleanIcon.addFile(QLatin1String(Constants::ICON_CLEAN_SMALL));
+ QIcon cleanIcon = Icons::CLEAN.icon();
+ cleanIcon.addPixmap(Icons::CLEAN_SMALL.pixmap());
dd->m_cleanSessionAction = new QAction(cleanIcon, tr("Clean All"), this);
cmd = ActionManager::registerAction(dd->m_cleanSessionAction, Constants::CLEANSESSION);
mbuild->addAction(cmd, Constants::G_BUILD_CLEAN);
@@ -907,8 +907,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
mbuild->addAction(cmd, Constants::G_BUILD_CLEAN);
// cancel build action
- const QIcon stopIcon = Utils::ThemeHelper::themedIcon(QLatin1String(Constants::ICON_STOP_SMALL));
- dd->m_cancelBuildAction = new QAction(stopIcon, tr("Cancel Build"), this);
+ dd->m_cancelBuildAction = new QAction(Icons::STOP_SMALL.icon(), tr("Cancel Build"), this);
cmd = ActionManager::registerAction(dd->m_cancelBuildAction, Constants::CANCELBUILD);
mbuild->addAction(cmd, Constants::G_BUILD_CANCEL);
diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro
index 9f776e6797..49833ae4e6 100644
--- a/src/plugins/projectexplorer/projectexplorer.pro
+++ b/src/plugins/projectexplorer/projectexplorer.pro
@@ -153,7 +153,8 @@ HEADERS += projectexplorer.h \
projectpanelfactory.h \
projecttree.h \
expanddata.h \
- waitforstopdialog.h
+ waitforstopdialog.h \
+ projectexplorericons.h
SOURCES += projectexplorer.cpp \
abi.cpp \
diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs
index c64178865e..a5511ec8dd 100644
--- a/src/plugins/projectexplorer/projectexplorer.qbs
+++ b/src/plugins/projectexplorer/projectexplorer.qbs
@@ -111,6 +111,7 @@ QtcPlugin {
"projectexplorer.qrc",
"projectexplorer_export.h",
"projectexplorerconstants.h",
+ "projectexplorericons.h",
"projectexplorersettings.h",
"projectexplorersettingspage.cpp", "projectexplorersettingspage.h", "projectexplorersettingspage.ui",
"projectfilewizardextension.cpp", "projectfilewizardextension.h",
diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h
index 394190fcfc..289ffeadfc 100644
--- a/src/plugins/projectexplorer/projectexplorerconstants.h
+++ b/src/plugins/projectexplorer/projectexplorerconstants.h
@@ -155,19 +155,6 @@ const char RUNMENUCONTEXTMENU[] = "Project.RunMenu";
// File factory
const char FILE_FACTORY_ID[] = "ProjectExplorer.FileFactoryId";
-// Icons
-const char ICON_BUILD[] = ":/projectexplorer/images/build.png";
-const char ICON_BUILD_SMALL[] = ":/projectexplorer/images/build_small.png";
-const char ICON_CLEAN[] = ":/projectexplorer/images/clean.png";
-const char ICON_CLEAN_SMALL[] = ":/projectexplorer/images/clean_small.png";
-const char ICON_REBUILD[] = ":/projectexplorer/images/rebuild.png";
-const char ICON_REBUILD_SMALL[] = ":/projectexplorer/images/rebuild_small.png";
-const char ICON_RUN[] = ":/projectexplorer/images/run.png";
-const char ICON_RUN_SMALL[] = ":/projectexplorer/images/run_small.png|IconsRunColor";
-const char ICON_STOP[] = ":/projectexplorer/images/stop.png";
-const char ICON_STOP_SMALL[] = ":/projectexplorer/images/stop_small.png|IconsStopColor";
-const char ICON_WINDOW[] = ":/projectexplorer/images/window.png";
-
// Mime types
const char C_SOURCE_MIMETYPE[] = "text/x-csrc";
const char C_HEADER_MIMETYPE[] = "text/x-chdr";
diff --git a/src/plugins/projectexplorer/projectexplorericons.h b/src/plugins/projectexplorer/projectexplorericons.h
new file mode 100644
index 0000000000..604bddd024
--- /dev/null
+++ b/src/plugins/projectexplorer/projectexplorericons.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms and
+** conditions see http://www.qt.io/terms-conditions. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef PROJECTEXPLORERICONS_H
+#define PROJECTEXPLORERICONS_H
+
+#include <utils/icon.h>
+
+namespace ProjectExplorer {
+namespace Icons {
+
+const Utils::Icon BUILD(
+ QLatin1String(":/projectexplorer/images/build.png"));
+const Utils::Icon BUILD_SMALL(
+ QLatin1String(":/projectexplorer/images/build_small.png"));
+const Utils::Icon CLEAN(
+ QLatin1String(":/projectexplorer/images/clean.png"));
+const Utils::Icon CLEAN_SMALL(
+ QLatin1String(":/projectexplorer/images/clean_small.png"));
+const Utils::Icon REBUILD(
+ QLatin1String(":/projectexplorer/images/rebuild.png"));
+const Utils::Icon REBUILD_SMALL(
+ QLatin1String(":/projectexplorer/images/rebuild_small.png"));
+const Utils::Icon RUN(
+ QLatin1String(":/projectexplorer/images/run.png"));
+const Utils::Icon WINDOW(
+ QLatin1String(":/projectexplorer/images/window.png"));
+const Utils::Icon DEBUG_START(
+ QLatin1String(":/projectexplorer/images/debugger_start.png"));
+
+const Utils::Icon RUN_SMALL({
+ {QLatin1String(":/projectexplorer/images/run_small.png"), Utils::Theme::IconsRunColor}});
+const Utils::Icon STOP_SMALL({
+ {QLatin1String(":/projectexplorer/images/stop_small.png"), Utils::Theme::IconsStopColor}});
+
+} // namespace Icons
+} // namespace ProjectExplorer
+
+#endif // PROJECTEXPLORERICONS_H
diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp
index 1d596ecdb8..584c9e3764 100644
--- a/src/plugins/projectexplorer/projecttreewidget.cpp
+++ b/src/plugins/projectexplorer/projecttreewidget.cpp
@@ -38,7 +38,7 @@
#include "projecttree.h"
#include <coreplugin/actionmanager/command.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
@@ -49,7 +49,6 @@
#include <utils/navigationtreeview.h>
#include <utils/algorithm.h>
#include <utils/tooltip/tooltip.h>
-#include <utils/themehelper.h>
#include <QDebug>
#include <QSettings>
@@ -234,8 +233,7 @@ ProjectTreeWidget::ProjectTreeWidget(QWidget *parent)
this, SLOT(saveExpandData()));
m_toggleSync = new QToolButton;
- m_toggleSync->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_LINK)));
+ m_toggleSync->setIcon(Core::Icons::LINK.icon());
m_toggleSync->setCheckable(true);
m_toggleSync->setChecked(autoSynchronization());
m_toggleSync->setToolTip(tr("Synchronize with Editor"));
@@ -589,7 +587,7 @@ NavigationView ProjectTreeWidgetFactory::createWidget()
n.widget = ptw;
QToolButton *filter = new QToolButton;
- filter->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
+ filter->setIcon(Core::Icons::FILTER.icon());
filter->setToolTip(tr("Filter Tree"));
filter->setPopupMode(QToolButton::InstantPopup);
filter->setProperty("noArrow", true);
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index abb506f70d..cd8561ff14 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -551,6 +551,16 @@ QString RunControl::displayName() const
return m_displayName;
}
+void RunControl::setIcon(const Utils::Icon &icon)
+{
+ m_icon = icon;
+}
+
+Utils::Icon RunControl::icon() const
+{
+ return m_icon;
+}
+
Abi RunControl::abi() const
{
if (const RunConfiguration *rc = m_runConfiguration.data())
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index bfdbe01db9..acca0b08b0 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -37,6 +37,7 @@
#include <utils/outputformat.h>
#include <utils/qtcassert.h>
+#include <utils/icon.h>
#include <QPointer>
#include <QWidget>
@@ -293,8 +294,8 @@ public:
virtual QString displayName() const;
virtual bool supportsReRunning() const { return true; }
- void setIcon(const QString &icon) { m_icon = icon; }
- QString icon() const { return m_icon; }
+ void setIcon(const Utils::Icon &icon);
+ Utils::Icon icon() const;
ProcessHandle applicationProcessHandle() const;
void setApplicationProcessHandle(const ProcessHandle &handle);
@@ -330,7 +331,7 @@ protected:
private:
QString m_displayName;
Core::Id m_runMode;
- QString m_icon;
+ Utils::Icon m_icon;
const QPointer<RunConfiguration> m_runConfiguration;
QPointer<Project> m_project;
Utils::OutputFormatter *m_outputFormatter;
diff --git a/src/plugins/projectexplorer/runconfigurationaspects.cpp b/src/plugins/projectexplorer/runconfigurationaspects.cpp
index 1afd840c8c..165d209ffc 100644
--- a/src/plugins/projectexplorer/runconfigurationaspects.cpp
+++ b/src/plugins/projectexplorer/runconfigurationaspects.cpp
@@ -34,7 +34,7 @@
#include "runconfiguration.h"
#include "environmentaspect.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/fancylineedit.h>
#include <utils/pathchooser.h>
@@ -169,7 +169,7 @@ void WorkingDirectoryAspect::addToMainConfigurationWidget(QWidget *parent, QForm
auto resetButton = new QToolButton(parent);
resetButton->setToolTip(tr("Reset to Default"));
- resetButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RESET)));
+ resetButton->setIcon(Core::Icons::RESET.icon());
connect(resetButton, &QAbstractButton::clicked, this, &WorkingDirectoryAspect::resetPath);
if (auto envAspect = runConfiguration()->extraAspect<EnvironmentAspect>()) {
diff --git a/src/plugins/projectexplorer/task.cpp b/src/plugins/projectexplorer/task.cpp
index 2f9c2ba92e..cc6957bc37 100644
--- a/src/plugins/projectexplorer/task.cpp
+++ b/src/plugins/projectexplorer/task.cpp
@@ -30,9 +30,8 @@
#include "task.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include "projectexplorerconstants.h"
@@ -42,8 +41,8 @@ namespace ProjectExplorer
static QIcon taskTypeIcon(Task::TaskType t)
{
static QIcon icons[3] = { QIcon(),
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_ERROR)),
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING))};
+ Core::Icons::ERROR.icon(),
+ Core::Icons::WARNING.icon()};
if (t < 0 || t > 2)
t = Task::Unknown;
diff --git a/src/plugins/projectexplorer/taskhub.cpp b/src/plugins/projectexplorer/taskhub.cpp
index 5f2650a005..c791a00c72 100644
--- a/src/plugins/projectexplorer/taskhub.cpp
+++ b/src/plugins/projectexplorer/taskhub.cpp
@@ -31,11 +31,10 @@
#include "taskhub.h"
#include "projectexplorerconstants.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/ioutputpane.h>
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
-#include <utils/themehelper.h>
using namespace ProjectExplorer;
@@ -102,8 +101,8 @@ void TaskMark::clicked()
}
TaskHub::TaskHub()
- : m_errorIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_ERROR))),
- m_warningIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING)))
+ : m_errorIcon(Core::Icons::ERROR.icon()),
+ m_warningIcon(Core::Icons::WARNING.icon())
{
m_instance = this;
qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task");
diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp
index 55c03c2e48..e3b6a21917 100644
--- a/src/plugins/projectexplorer/taskwindow.cpp
+++ b/src/plugins/projectexplorer/taskwindow.cpp
@@ -32,6 +32,7 @@
#include "itaskhandler.h"
#include "projectexplorerconstants.h"
+#include "projectexplorericons.h"
#include "session.h"
#include "task.h"
#include "taskhub.h"
@@ -39,14 +40,13 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/icontext.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
#include <utils/itemviews.h>
-#include <utils/themehelper.h>
#include <QDir>
#include <QPainter>
@@ -244,7 +244,7 @@ TaskWindow::TaskWindow() : d(new TaskWindowPrivate)
d->m_listview->setSelectionMode(QAbstractItemView::SingleSelection);
Internal::TaskDelegate *tld = new Internal::TaskDelegate(this);
d->m_listview->setItemDelegate(tld);
- d->m_listview->setWindowIcon(QIcon(QLatin1String(Constants::ICON_WINDOW)));
+ d->m_listview->setWindowIcon(Icons::WINDOW.icon());
d->m_listview->setContextMenuPolicy(Qt::ActionsContextMenu);
d->m_listview->setAttribute(Qt::WA_MacShowFocusRect, false);
@@ -265,12 +265,11 @@ TaskWindow::TaskWindow() : d(new TaskWindowPrivate)
d->m_listview->setContextMenuPolicy(Qt::ActionsContextMenu);
d->m_filterWarningsButton = createFilterButton(
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING)),
+ Core::Icons::WARNING.icon(),
tr("Show Warnings"), this, [this](bool show) { setShowWarnings(show); });
d->m_categoriesButton = new QToolButton;
- d->m_categoriesButton->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
+ d->m_categoriesButton->setIcon(Core::Icons::FILTER.icon());
d->m_categoriesButton->setToolTip(tr("Filter by categories"));
d->m_categoriesButton->setProperty("noArrow", true);
d->m_categoriesButton->setAutoRaise(true);
diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp
index b9afaa69c4..bff1edbcbd 100644
--- a/src/plugins/pythoneditor/pythoneditorplugin.cpp
+++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp
@@ -51,6 +51,7 @@
#include <projectexplorer/target.h>
#include <projectexplorer/iprojectmanager.h>
#include <projectexplorer/projectnodes.h>
+#include <projectexplorer/projectexplorericons.h>
#include <texteditor/texteditorconstants.h>
@@ -1096,7 +1097,7 @@ RunControl *PythonRunControlFactory::create(RunConfiguration *runConfiguration,
PythonRunControl::PythonRunControl(PythonRunConfiguration *rc, Core::Id mode)
: RunControl(rc, mode), m_running(false)
{
- setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
+ setIcon(ProjectExplorer::Icons::RUN_SMALL);
EnvironmentAspect *environment = rc->extraAspect<EnvironmentAspect>();
Utils::Environment env;
if (environment)
diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
index 16273afac2..4ad8051ff9 100644
--- a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
+++ b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
@@ -38,7 +38,7 @@
#include "ui_qbsbuildstepconfigwidget.h"
#include <coreplugin/icore.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -47,7 +47,6 @@
#include <qtsupport/qtversionmanager.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
-#include <utils/themehelper.h>
#include <qbs.h>
@@ -485,8 +484,7 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) :
QString *errorMessage) {
return validateProperties(edit, errorMessage);
});
- m_ui->qmlDebuggingWarningText->setPixmap(
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
+ m_ui->qmlDebuggingWarningText->setPixmap(Core::Icons::WARNING.pixmap());
connect(m_ui->buildVariantComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(changeBuildVariant(int)));
diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
index eddbaf1dc0..b09b88afca 100644
--- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
+++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
@@ -34,7 +34,7 @@
#include "qbsinstallstep.h"
#include "qbsproject.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/buildsteplist.h>
@@ -49,7 +49,6 @@
#include <utils/detailswidget.h>
#include <utils/stringutils.h>
#include <utils/persistentsettings.h>
-#include <utils/themehelper.h>
#include <qtsupport/qtoutputformatter.h>
#include <qtsupport/qtsupportconstants.h>
#include <qtsupport/qtkitinformation.h>
@@ -342,8 +341,7 @@ QbsRunConfigurationWidget::QbsRunConfigurationWidget(QbsRunConfiguration *rc, QW
QHBoxLayout *hl = new QHBoxLayout();
hl->addStretch();
m_disabledIcon = new QLabel(this);
- m_disabledIcon->setPixmap(Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ m_disabledIcon->setPixmap(Core::Icons::WARNING.pixmap());
hl->addWidget(m_disabledIcon);
m_disabledReason = new QLabel(this);
m_disabledReason->setVisible(false);
diff --git a/src/plugins/qmakeandroidsupport/createandroidmanifestwizard.cpp b/src/plugins/qmakeandroidsupport/createandroidmanifestwizard.cpp
index f41ae06c8e..2ca4ab4449 100644
--- a/src/plugins/qmakeandroidsupport/createandroidmanifestwizard.cpp
+++ b/src/plugins/qmakeandroidsupport/createandroidmanifestwizard.cpp
@@ -36,7 +36,7 @@
#include <android/androidqtsupport.h>
#include <coreplugin/editormanager/editormanager.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <projectexplorer/target.h>
@@ -130,7 +130,7 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
m_sourceDirectoryWarning->setWordWrap(true);
m_warningIcon = new QLabel(this);
m_warningIcon->setVisible(false);
- m_warningIcon->setPixmap(QPixmap(QLatin1String(Core::Constants::ICON_ERROR)));
+ m_warningIcon->setPixmap(Core::Icons::ERROR.pixmap());
m_warningIcon->setWordWrap(true);
m_warningIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkwidget.cpp b/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkwidget.cpp
index 9ff70cfda4..39c9ed1245 100644
--- a/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkwidget.cpp
+++ b/src/plugins/qmakeandroidsupport/qmakeandroidbuildapkwidget.cpp
@@ -35,10 +35,9 @@
#include <android/androidbuildapkwidget.h>
#include <android/androidmanager.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <qmakeprojectmanager/qmakenodes.h>
#include <qmakeprojectmanager/qmakeproject.h>
-#include <utils/themehelper.h>
#include <QFileDialog>
#include <QLabel>
@@ -66,8 +65,7 @@ QmakeAndroidBuildApkWidget::QmakeAndroidBuildApkWidget(QmakeAndroidBuildApkStep
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(oldFilesWarningIcon->sizePolicy().hasHeightForWidth());
oldFilesWarningIcon->setSizePolicy(sizePolicy);
- oldFilesWarningIcon->setPixmap(
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING)));
+ oldFilesWarningIcon->setPixmap(Core::Icons::WARNING.pixmap());
oldFilesWarningIcon->setAlignment(Qt::Alignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop));
qt51WarningLayout->addWidget(oldFilesWarningIcon);
diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp
index 8ef77ddd2f..c119874ae5 100644
--- a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp
+++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetwidgetswizardpage.cpp
@@ -32,10 +32,9 @@
#include "ui_customwidgetwidgetswizardpage.h"
#include "classdefinition.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/wizard.h>
-#include <utils/themehelper.h>
#include <QTimer>
@@ -53,11 +52,9 @@ CustomWidgetWidgetsWizardPage::CustomWidgetWidgetsWizardPage(QWidget *parent) :
{
m_ui->setupUi(this);
m_ui->tabStackWidget->setLayout(m_tabStackLayout);
- m_ui->addButton->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_PLUS)));
+ m_ui->addButton->setIcon(Core::Icons::PLUS.icon());
connect(m_ui->addButton, SIGNAL(clicked()), m_ui->classList, SLOT(startEditingNewClassItem()));
- m_ui->deleteButton->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_MINUS)));
+ m_ui->deleteButton->setIcon(Core::Icons::MINUS.icon());
connect(m_ui->deleteButton, SIGNAL(clicked()), m_ui->classList, SLOT(removeCurrentClass()));
m_ui->deleteButton->setEnabled(false);
diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
index 774f0b51cb..b2ef75e1b7 100644
--- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
+++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
@@ -34,7 +34,7 @@
#include "qmakeproject.h"
#include "qmakebuildconfiguration.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/variablechooser.h>
#include <projectexplorer/localenvironmentaspect.h>
#include <projectexplorer/target.h>
@@ -49,7 +49,6 @@
#include <utils/persistentsettings.h>
#include <utils/qtcprocess.h>
#include <utils/stringutils.h>
-#include <utils/themehelper.h>
#include <QCheckBox>
#include <QComboBox>
@@ -180,8 +179,7 @@ DesktopQmakeRunConfigurationWidget::DesktopQmakeRunConfigurationWidget(DesktopQm
QHBoxLayout *hl = new QHBoxLayout();
hl->addStretch();
m_disabledIcon = new QLabel(this);
- m_disabledIcon->setPixmap(Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ m_disabledIcon->setPixmap(Core::Icons::WARNING.pixmap());
hl->addWidget(m_disabledIcon);
m_disabledReason = new QLabel(this);
m_disabledReason->setVisible(false);
@@ -221,7 +219,7 @@ DesktopQmakeRunConfigurationWidget::DesktopQmakeRunConfigurationWidget(DesktopQm
QToolButton *resetButton = new QToolButton(this);
resetButton->setToolTip(tr("Reset to Default"));
- resetButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RESET)));
+ resetButton->setIcon(Core::Icons::RESET.icon());
QHBoxLayout *boxlayout = new QHBoxLayout();
boxlayout->setMargin(0);
diff --git a/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp
index cd28781d40..3ac0858f17 100644
--- a/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakeprojectconfigwidget.cpp
@@ -35,13 +35,12 @@
#include "qmakenodes.h"
#include "ui_qmakeprojectconfigwidget.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <projectexplorer/target.h>
#include <qtsupport/qtkitinformation.h>
#include <utils/algorithm.h>
#include <utils/detailswidget.h>
-#include <utils/themehelper.h>
using namespace QmakeProjectManager;
using namespace QmakeProjectManager::Internal;
@@ -69,8 +68,7 @@ QmakeProjectConfigWidget::QmakeProjectConfigWidget(QmakeBuildConfiguration *bc)
m_browseButton = m_ui->shadowBuildDirEdit->buttonAtIndex(0);
- m_ui->warningLabel->setPixmap(Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ m_ui->warningLabel->setPixmap(Core::Icons::WARNING.pixmap());
m_ui->shadowBuildDirEdit->setPromptDialogTitle(tr("Shadow Build Directory"));
m_ui->shadowBuildDirEdit->setExpectedKind(Utils::PathChooser::ExistingDirectory);
m_ui->shadowBuildDirEdit->setHistoryCompleter(QLatin1String("Qmake.BuildDir.History"));
diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp
index a11657c92f..cdddbfd3c1 100644
--- a/src/plugins/qmakeprojectmanager/qmakestep.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp
@@ -44,7 +44,7 @@
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/icontext.h>
#include <qtsupport/debugginghelperbuildtask.h>
@@ -54,7 +54,6 @@
#include <utils/algorithm.h>
#include <utils/hostosinfo.h>
#include <utils/qtcprocess.h>
-#include <utils/themehelper.h>
#include <QDir>
#include <QMessageBox>
@@ -444,7 +443,7 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
m_ui->qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
m_ui->qtQuickCompilerCheckBox->setChecked(m_step->useQtQuickCompiler());
m_ui->separateDebugInfoCheckBox->setChecked(m_step->separateDebugInfo());
- const QPixmap warning = Utils::ThemeHelper::themedIconPixmap(QLatin1String(Core::Constants::ICON_WARNING));
+ const QPixmap warning = Core::Icons::WARNING.pixmap();
m_ui->qmlDebuggingWarningIcon->setPixmap(warning);
m_ui->qtQuickCompilerWarningIcon->setPixmap(warning);
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp
index 8bebd76d9f..df7d744948 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp
@@ -26,6 +26,8 @@
#include "formeditorwidget.h"
#include "qmldesignerplugin.h"
#include "designersettings.h"
+#include "qmldesignerconstants.h"
+#include "qmldesignericons.h"
#include <QWheelEvent>
#include <QVBoxLayout>
@@ -39,7 +41,6 @@
#include <backgroundaction.h>
#include <utils/fileutils.h>
-#include <utils/themehelper.h>
namespace QmlDesigner {
@@ -66,21 +67,21 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
m_noSnappingAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
m_noSnappingAction->setCheckable(true);
m_noSnappingAction->setChecked(true);
- m_noSnappingAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/icon/layout/no_snapping.png")));
+ m_noSnappingAction->setIcon(Icons::NO_SNAPPING.icon());
m_snappingAndAnchoringAction = layoutActionGroup->addAction(tr("Snap to parent or sibling items and generate anchors (W)."));
m_snappingAndAnchoringAction->setShortcut(Qt::Key_W);
m_snappingAndAnchoringAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
m_snappingAndAnchoringAction->setCheckable(true);
m_snappingAndAnchoringAction->setChecked(true);
- m_snappingAndAnchoringAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/icon/layout/snapping_and_anchoring.png")));
+ m_snappingAndAnchoringAction->setIcon(Icons::NO_SNAPPING_AND_ANCHORING.icon());
m_snappingAction = layoutActionGroup->addAction(tr("Snap to parent or sibling items but do not generate anchors (E)."));
m_snappingAction->setShortcut(Qt::Key_E);
m_snappingAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
m_snappingAction->setCheckable(true);
m_snappingAction->setChecked(true);
- m_snappingAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/icon/layout/snapping.png")));
+ m_snappingAction->setIcon(Icons::SNAPPING.icon());
addActions(layoutActionGroup->actions());
@@ -96,7 +97,7 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
m_showBoundingRectAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
m_showBoundingRectAction->setCheckable(true);
m_showBoundingRectAction->setChecked(true);
- m_showBoundingRectAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/icon/layout/boundingrect.png")));
+ m_showBoundingRectAction->setIcon(Icons::BOUNDING_RECT.icon());
addAction(m_showBoundingRectAction.data());
upperActions.append(m_showBoundingRectAction.data());
@@ -135,7 +136,7 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
m_resetAction = new QAction(tr("Reset view (R)."), this);
m_resetAction->setShortcut(Qt::Key_R);
m_resetAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
- m_resetAction->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/icon/reset.png")));
+ m_resetAction->setIcon(Icons::RESET.icon());
connect(m_resetAction.data(), SIGNAL(triggered(bool)), this, SLOT(resetNodeInstanceView()));
addAction(m_resetAction.data());
upperActions.append(m_resetAction.data());
diff --git a/src/plugins/qmldesigner/components/importmanager/importlabel.cpp b/src/plugins/qmldesigner/components/importmanager/importlabel.cpp
index bc0c9026dd..76240d3cec 100644
--- a/src/plugins/qmldesigner/components/importmanager/importlabel.cpp
+++ b/src/plugins/qmldesigner/components/importmanager/importlabel.cpp
@@ -24,7 +24,7 @@
****************************************************************************/
#include "importlabel.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <QHBoxLayout>
#include <QPushButton>
@@ -40,7 +40,7 @@ ImportLabel::ImportLabel(QWidget *parent) :
m_removeButton = new QPushButton(this);
- m_removeButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_BUTTON_CLOSE)));
+ m_removeButton->setIcon(Core::Icons::BUTTON_CLOSE.icon());
m_removeButton->setFlat(true);
m_removeButton->setMaximumWidth(20);
m_removeButton->setMaximumHeight(20);
@@ -71,10 +71,8 @@ const Import ImportLabel::import() const
void ImportLabel::setReadOnly(bool readOnly) const
{
m_removeButton->setDisabled(readOnly);
- if (readOnly)
- m_removeButton->setIcon(QIcon());
- else
- m_removeButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_BUTTON_CLOSE)));
+ m_removeButton->setIcon(readOnly ? QIcon()
+ : Core::Icons::BUTTON_CLOSE.icon());
}
void ImportLabel::emitRemoveImport()
diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
index 134893481c..1765cfaac0 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
+++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
@@ -39,8 +39,7 @@
#include <qmlitemnode.h>
#include <coreplugin/icore.h>
-#include <coreplugin/coreconstants.h>
-#include <utils/themehelper.h>
+#include <coreplugin/coreicons.h>
#include <QMimeData>
#include <QMessageBox>
@@ -381,8 +380,7 @@ void NavigatorTreeModel::updateItemRow(const ModelNode &modelNode, ItemRow items
if (currentQmlObjectNode.hasError()) {
items.idItem->setData(true, ErrorRole);
items.idItem->setToolTip(currentQmlObjectNode.error());
- items.idItem->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ items.idItem->setIcon(Core::Icons::WARNING.icon());
} else {
items.idItem->setData(false, ErrorRole);
if (modelNode.metaInfo().isValid())
diff --git a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp
index 11ad039003..d5e6085cab 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp
+++ b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp
@@ -28,11 +28,13 @@
#include "navigatorwidget.h"
#include "nameitemdelegate.h"
#include "iconcheckboxitemdelegate.h"
+#include "qmldesignerconstants.h"
+#include "qmldesignericons.h"
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
-#include <utils/themehelper.h>
+#include <utils/icon.h>
#include <bindingproperty.h>
#include <designmodecontext.h>
@@ -84,14 +86,14 @@ NavigatorView::NavigatorView(QObject* parent) :
m_treeModel.data());
IconCheckboxItemDelegate *showDelegate =
new IconCheckboxItemDelegate(this,
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(":/navigator/icon/eye_open.png")),
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(":/navigator/icon/eye_closed.png")),
+ Icons::EYE_OPEN.pixmap(),
+ Icons::EYE_CLOSED.pixmap(),
m_treeModel.data());
IconCheckboxItemDelegate *exportDelegate =
new IconCheckboxItemDelegate(this,
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(":/navigator/icon/export_checked.png")),
- Utils::ThemeHelper::themedIconPixmap(QLatin1String(":/navigator/icon/export_unchecked.png")),
+ Icons::EXPORT_CHECKED.pixmap(),
+ Icons::EXPORT_UNCHECKED.pixmap(),
m_treeModel.data());
#ifdef _LOCK_ITEMS_
diff --git a/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp b/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp
index 7c6bca74eb..23d572db0b 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp
+++ b/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp
@@ -25,6 +25,8 @@
#include "navigatorwidget.h"
#include "navigatorview.h"
+#include "qmldesignerconstants.h"
+#include "qmldesignericons.h"
#include <QBoxLayout>
#include <QToolButton>
@@ -32,7 +34,6 @@
#include <QHeaderView>
#include <QtDebug>
#include <utils/fileutils.h>
-#include <utils/themehelper.h>
namespace QmlDesigner {
@@ -77,25 +78,25 @@ QList<QToolButton *> NavigatorWidget::createToolBarWidgets()
QList<QToolButton *> buttons;
buttons.append(new QToolButton());
- buttons.last()->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/navigator/icon/arrowleft.png")));
+ buttons.last()->setIcon(Icons::ARROW_LEFT.icon());
buttons.last()->setToolTip(tr("Become last sibling of parent (CTRL + Left)."));
buttons.last()->setShortcut(QKeySequence(Qt::Key_Left | Qt::CTRL));
connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(leftButtonClicked()));
buttons.append(new QToolButton());
- buttons.last()->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/navigator/icon/arrowright.png")));
+ buttons.last()->setIcon(Icons::ARROW_RIGHT.icon());
buttons.last()->setToolTip(tr("Become child of last sibling (CTRL + Right)."));
buttons.last()->setShortcut(QKeySequence(Qt::Key_Right | Qt::CTRL));
connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(rightButtonClicked()));
buttons.append(new QToolButton());
- buttons.last()->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/navigator/icon/arrowdown.png")));
+ buttons.last()->setIcon(Icons::ARROW_DOWN.icon());
buttons.last()->setToolTip(tr("Move down (CTRL + Down)."));
buttons.last()->setShortcut(QKeySequence(Qt::Key_Down | Qt::CTRL));
connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(downButtonClicked()));
buttons.append(new QToolButton());
- buttons.last()->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(":/navigator/icon/arrowup.png")));
+ buttons.last()->setIcon(Icons::ARROW_UP.icon());
buttons.last()->setToolTip(tr("Move up (CTRL + Up)."));
buttons.last()->setShortcut(QKeySequence(Qt::Key_Up | Qt::CTRL));
connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(upButtonClicked()));
diff --git a/src/plugins/qmldesigner/qmldesigner.qbs b/src/plugins/qmldesigner/qmldesigner.qbs
index afb04097e9..ecf863b08e 100644
--- a/src/plugins/qmldesigner/qmldesigner.qbs
+++ b/src/plugins/qmldesigner/qmldesigner.qbs
@@ -463,6 +463,7 @@ QtcPlugin {
"designmodewidget.cpp",
"designmodewidget.h",
"qmldesignerconstants.h",
+ "qmldesignericons.h",
"qmldesignerplugin.cpp",
"qmldesignerplugin.h",
"settingspage.cpp",
diff --git a/src/plugins/qmldesigner/qmldesignericons.h b/src/plugins/qmldesigner/qmldesignericons.h
new file mode 100644
index 0000000000..7814460f49
--- /dev/null
+++ b/src/plugins/qmldesigner/qmldesignericons.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms and
+** conditions see http://www.qt.io/terms-conditions. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+****************************************************************************/
+
+#ifndef QMLDESIGNERICONS_H
+#define QMLDESIGNERICONS_H
+
+#include <utils/icon.h>
+
+namespace QmlDesigner {
+namespace Icons {
+
+const Utils::Icon ARROW_UP({
+ {QLatin1String(":/navigator/icon/arrowup.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon ARROW_RIGHT({
+ {QLatin1String(":/navigator/icon/arrowright.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon ARROW_DOWN({
+ {QLatin1String(":/navigator/icon/arrowdown.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon ARROW_LEFT({
+ {QLatin1String(":/navigator/icon/arrowleft.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon EYE_OPEN({
+ {QLatin1String(":/navigator/icon/eye_open.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon EYE_CLOSED({
+ {QLatin1String(":/navigator/icon/eye_closed.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon EXPORT_CHECKED({
+ {QLatin1String(":/navigator/icon/export_checked.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon EXPORT_UNCHECKED({
+ {QLatin1String(":/navigator/icon/export_unchecked.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon BOUNDING_RECT({
+ {QLatin1String(":/icon/layout/boundingrect.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon SNAPPING({
+ {QLatin1String(":/icon/layout/snapping.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon NO_SNAPPING({
+ {QLatin1String(":/icon/layout/no_snapping.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon NO_SNAPPING_AND_ANCHORING({
+ {QLatin1String(":/icon/layout/snapping_and_anchoring.png"), Utils::Theme::IconsBaseColor}});
+const Utils::Icon RESET({
+ {QLatin1String(":/icon/reset.png"), Utils::Theme::IconsBaseColor}});
+
+} // Icons
+} // QmlDesigner
+
+#endif // QMLDESIGNERICONS_H
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.pri b/src/plugins/qmldesigner/qmldesignerplugin.pri
index 7c52f0aaf4..f5a94926fa 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.pri
+++ b/src/plugins/qmldesigner/qmldesignerplugin.pri
@@ -6,7 +6,8 @@ HEADERS += $$PWD/qmldesignerconstants.h \
$$PWD/settingspage.h \
$$PWD/designmodecontext.h \
$$PWD/documentmanager.h \
- $$PWD/styledoutputpaneplaceholder.h
+ $$PWD/styledoutputpaneplaceholder.h \
+ $$PWD/qmldesignericons.h
SOURCES += $$PWD/qmldesignerplugin.cpp \
$$PWD/shortcutmanager.cpp \
diff --git a/src/plugins/qmljstools/qmlconsoleitemdelegate.cpp b/src/plugins/qmljstools/qmlconsoleitemdelegate.cpp
index 1caae45e3d..a12221f897 100644
--- a/src/plugins/qmljstools/qmlconsoleitemdelegate.cpp
+++ b/src/plugins/qmljstools/qmlconsoleitemdelegate.cpp
@@ -32,7 +32,7 @@
#include "qmlconsoleedit.h"
#include <coreplugin/coreconstants.h>
-#include <utils/themehelper.h>
+#include <coreplugin/coreicons.h>
#include <QPainter>
#include <QTreeView>
@@ -72,9 +72,9 @@ namespace Internal {
QmlConsoleItemDelegate::QmlConsoleItemDelegate(QObject *parent) :
QStyledItemDelegate(parent),
- m_logIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_INFO))),
- m_warningIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING))),
- m_errorIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_ERROR))),
+ m_logIcon(Core::Icons::INFO.icon()),
+ m_warningIcon(Core::Icons::WARNING.icon()),
+ m_errorIcon(Core::Icons::ERROR.icon()),
m_expandIcon(QLatin1String(":/qmljstools/images/expand.png")),
m_collapseIcon(QLatin1String(":/qmljstools/images/collapse.png")),
m_prompt(QLatin1String(":/qmljstools/images/prompt.png")),
diff --git a/src/plugins/qmljstools/qmlconsolepane.cpp b/src/plugins/qmljstools/qmlconsolepane.cpp
index a8a61dcd73..85ffc6333f 100644
--- a/src/plugins/qmljstools/qmlconsolepane.cpp
+++ b/src/plugins/qmljstools/qmlconsolepane.cpp
@@ -34,10 +34,10 @@
#include "qmlconsoleitemdelegate.h"
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/findplaceholder.h>
#include <utils/savedaction.h>
-#include <utils/themehelper.h>
#include <aggregation/aggregate.h>
#include <coreplugin/find/itemviewfind.h>
@@ -113,8 +113,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
m_showDebugButtonAction->setToolTip(tr("Show debug, log, and info messages."));
m_showDebugButtonAction->setCheckable(true);
m_showDebugButtonAction->setChecked(true);
- m_showDebugButtonAction->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_INFO)));
+ m_showDebugButtonAction->setIcon(Core::Icons::INFO.icon());
connect(m_showDebugButtonAction, &Utils::SavedAction::toggled,
m_proxyModel, &QmlConsoleProxyModel::setShowLogs);
m_showDebugButton->setDefaultAction(m_showDebugButtonAction);
@@ -128,8 +127,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
m_showWarningButtonAction->setToolTip(tr("Show warning messages."));
m_showWarningButtonAction->setCheckable(true);
m_showWarningButtonAction->setChecked(true);
- m_showWarningButtonAction->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ m_showWarningButtonAction->setIcon(Core::Icons::WARNING.icon());
connect(m_showWarningButtonAction, &Utils::SavedAction::toggled,
m_proxyModel, &QmlConsoleProxyModel::setShowWarnings);
m_showWarningButton->setDefaultAction(m_showWarningButtonAction);
@@ -143,8 +141,7 @@ QmlConsolePane::QmlConsolePane(QObject *parent)
m_showErrorButtonAction->setToolTip(tr("Show error messages."));
m_showErrorButtonAction->setCheckable(true);
m_showErrorButtonAction->setChecked(true);
- m_showErrorButtonAction->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_ERROR)));
+ m_showErrorButtonAction->setIcon(Core::Icons::ERROR.icon());
connect(m_showErrorButtonAction, &Utils::SavedAction::toggled, m_proxyModel, &QmlConsoleProxyModel::setShowErrors);
m_showErrorButton->setDefaultAction(m_showErrorButtonAction);
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index c94337526c..cdd8bbd308 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -48,7 +48,6 @@
#include <utils/fancymainwindow.h>
#include <utils/fileinprojectfinder.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/project.h>
@@ -59,6 +58,7 @@
#include <texteditor/texteditor.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/find/findplugin.h>
#include <coreplugin/icore.h>
@@ -289,7 +289,7 @@ QWidget *QmlProfilerTool::createWidgets()
layout->addWidget(d->m_recordButton);
d->m_clearButton = new QToolButton(toolbarWidget);
- d->m_clearButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(ICON_CLEAN_PANE)));
+ d->m_clearButton->setIcon(Icons::CLEAN_PANE.icon());
d->m_clearButton->setToolTip(tr("Discard data"));
connect(d->m_clearButton, &QAbstractButton::clicked, [this](){
@@ -300,14 +300,14 @@ QWidget *QmlProfilerTool::createWidgets()
layout->addWidget(d->m_clearButton);
d->m_searchButton = new QToolButton;
- d->m_searchButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(ICON_ZOOM)));
+ d->m_searchButton->setIcon(Icons::ZOOM.icon());
d->m_searchButton->setToolTip(tr("Search timeline event notes."));
layout->addWidget(d->m_searchButton);
connect(d->m_searchButton, &QToolButton::clicked, this, &QmlProfilerTool::showTimeLineSearch);
d->m_displayFeaturesButton = new QToolButton;
- d->m_displayFeaturesButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(ICON_FILTER)));
+ d->m_displayFeaturesButton->setIcon(Icons::FILTER.icon());
d->m_displayFeaturesButton->setToolTip(tr("Hide or show event categories."));
d->m_displayFeaturesButton->setPopupMode(QToolButton::InstantPopup);
d->m_displayFeaturesButton->setProperty("noArrow", true);
diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp
index e1c67b415c..2b282834e0 100644
--- a/src/plugins/qtsupport/qtoptionspage.cpp
+++ b/src/plugins/qtsupport/qtoptionspage.cpp
@@ -41,6 +41,7 @@
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/variablechooser.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchainmanager.h>
@@ -50,7 +51,6 @@
#include <utils/qtcassert.h>
#include <utils/runextensions.h>
#include <utils/algorithm.h>
-#include <utils/themehelper.h>
#include <utils/treemodel.h>
#include <QDir>
@@ -207,8 +207,8 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent)
, m_versionUi(new Internal::Ui::QtVersionInfo())
, m_debuggingHelperUi(new Internal::Ui::DebuggingHelper())
, m_infoBrowser(new QTextBrowser)
- , m_invalidVersionIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_ERROR)))
- , m_warningVersionIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_WARNING)))
+ , m_invalidVersionIcon(Core::Icons::ERROR.icon())
+ , m_warningVersionIcon(Core::Icons::WARNING.icon())
, m_configurationWidget(0)
, m_autoItem(0)
, m_manualItem(0)
diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp
index fc52da5a44..e666ef83d1 100644
--- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp
+++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp
@@ -32,6 +32,7 @@
#include "ui_genericlinuxdeviceconfigurationwidget.h"
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/portlist.h>
#include <utils/fancylineedit.h>
#include <ssh/sshconnection.h>
@@ -191,7 +192,7 @@ void GenericLinuxDeviceConfigurationWidget::initGui()
m_ui->machineTypeValueLabel->setText(tr("Physical Device"));
else
m_ui->machineTypeValueLabel->setText(tr("Emulator"));
- m_ui->portsWarningLabel->setPixmap(QPixmap(QLatin1String(Core::Constants::ICON_ERROR)));
+ m_ui->portsWarningLabel->setPixmap(Core::Icons::ERROR.pixmap());
m_ui->portsWarningLabel->setToolTip(QLatin1String("<font color=\"red\">")
+ tr("You will need at least one port.") + QLatin1String("</font>"));
m_ui->keyFileLineEdit->setExpectedKind(PathChooser::File);
diff --git a/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp b/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp
index ddffcf06f2..0ceb27626e 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.cpp
@@ -31,10 +31,9 @@
#include "remotelinuxrunconfiguration.h"
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <utils/detailswidget.h>
#include <utils/qtcprocess.h>
-#include <utils/themehelper.h>
#include <QCoreApplication>
#include <QDir>
@@ -112,8 +111,7 @@ void RemoteLinuxRunConfigurationWidget::addDisabledLabel(QVBoxLayout *topLayout)
{
QHBoxLayout * const hl = new QHBoxLayout;
hl->addStretch();
- d->disabledIcon.setPixmap(Utils::ThemeHelper::themedIconPixmap(
- QLatin1String(Core::Constants::ICON_WARNING)));
+ d->disabledIcon.setPixmap(Core::Icons::WARNING.pixmap());
hl->addWidget(&d->disabledIcon);
d->disabledReason.setVisible(false);
hl->addWidget(&d->disabledReason);
diff --git a/src/plugins/remotelinux/remotelinuxruncontrol.cpp b/src/plugins/remotelinux/remotelinuxruncontrol.cpp
index 7525ba93b2..2c2ea189aa 100644
--- a/src/plugins/remotelinux/remotelinuxruncontrol.cpp
+++ b/src/plugins/remotelinux/remotelinuxruncontrol.cpp
@@ -34,6 +34,7 @@
#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/target.h>
#include <utils/environment.h>
@@ -59,7 +60,7 @@ public:
RemoteLinuxRunControl::RemoteLinuxRunControl(RunConfiguration *rc)
: RunControl(rc, ProjectExplorer::Constants::NORMAL_RUN_MODE), d(new RemoteLinuxRunControlPrivate)
{
- setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
+ setIcon(ProjectExplorer::Icons::RUN_SMALL);
d->running = false;
d->device = DeviceKitInformation::device(rc->target()->kit());
diff --git a/src/plugins/texteditor/circularclipboardassist.cpp b/src/plugins/texteditor/circularclipboardassist.cpp
index 79e9d7ab96..90e19f5133 100644
--- a/src/plugins/texteditor/circularclipboardassist.cpp
+++ b/src/plugins/texteditor/circularclipboardassist.cpp
@@ -39,7 +39,7 @@
#include "circularclipboard.h"
#include <coreplugin/coreconstants.h>
-
+#include <coreplugin/coreicons.h>
#include <QApplication>
#include <QClipboard>
@@ -93,7 +93,7 @@ public:
return 0;
const QScopedPointer<const AssistInterface> AssistInterface(interface);
- QIcon icon = QIcon::fromTheme(QLatin1String("edit-paste"), QIcon(QLatin1String(Core::Constants::ICON_PASTE))).pixmap(16);
+ QIcon icon = QIcon::fromTheme(QLatin1String("edit-paste"), Core::Icons::PASTE.icon()).pixmap(16);
CircularClipboard * clipboard = CircularClipboard::instance();
QList<AssistProposalItem *> items;
for (int i = 0; i < clipboard->size(); ++i) {
diff --git a/src/plugins/texteditor/outlinefactory.cpp b/src/plugins/texteditor/outlinefactory.cpp
index c73b88c440..7daca4a895 100644
--- a/src/plugins/texteditor/outlinefactory.cpp
+++ b/src/plugins/texteditor/outlinefactory.cpp
@@ -30,9 +30,9 @@
#include "outlinefactory.h"
#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
-#include <utils/themehelper.h>
#include <QToolButton>
#include <QLabel>
@@ -58,16 +58,14 @@ OutlineWidgetStack::OutlineWidgetStack(OutlineFactory *factory) :
addWidget(label);
m_toggleSync = new QToolButton;
- m_toggleSync->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_LINK)));
+ m_toggleSync->setIcon(Core::Icons::LINK.icon());
m_toggleSync->setCheckable(true);
m_toggleSync->setChecked(true);
m_toggleSync->setToolTip(tr("Synchronize with Editor"));
connect(m_toggleSync, SIGNAL(clicked(bool)), this, SLOT(toggleCursorSynchronization()));
m_filterButton = new QToolButton;
- m_filterButton->setIcon(
- Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
+ m_filterButton->setIcon(Core::Icons::FILTER.icon());
m_filterButton->setToolTip(tr("Filter tree"));
m_filterButton->setPopupMode(QToolButton::InstantPopup);
m_filterButton->setProperty("noArrow", true);
diff --git a/src/plugins/todo/keyword.cpp b/src/plugins/todo/keyword.cpp
index 22ccd27301..49ee2c1140 100644
--- a/src/plugins/todo/keyword.cpp
+++ b/src/plugins/todo/keyword.cpp
@@ -31,9 +31,6 @@
#include "keyword.h"
-#include <coreplugin/coreconstants.h>
-#include <utils/themehelper.h>
-
namespace Todo {
namespace Internal {
diff --git a/src/plugins/todo/keyworddialog.cpp b/src/plugins/todo/keyworddialog.cpp
index 9fb9f2022a..3296db4ed9 100644
--- a/src/plugins/todo/keyworddialog.cpp
+++ b/src/plugins/todo/keyworddialog.cpp
@@ -35,9 +35,6 @@
#include "constants.h"
#include "lineparser.h"
-#include <coreplugin/coreconstants.h>
-#include <utils/themehelper.h>
-
#include <QColorDialog>
namespace Todo {
diff --git a/src/plugins/todo/optionsdialog.cpp b/src/plugins/todo/optionsdialog.cpp
index 481f236003..3b71fa228d 100644
--- a/src/plugins/todo/optionsdialog.cpp
+++ b/src/plugins/todo/optionsdialog.cpp
@@ -36,8 +36,6 @@
#include "settings.h"
#include "constants.h"
-#include <utils/themehelper.h>
-
namespace Todo {
namespace Internal {
diff --git a/src/plugins/todo/todoicons.cpp b/src/plugins/todo/todoicons.cpp
index 0ae9fd95ad..c30eb25e9d 100644
--- a/src/plugins/todo/todoicons.cpp
+++ b/src/plugins/todo/todoicons.cpp
@@ -29,8 +29,7 @@
**
****************************************************************************/
-#include <coreplugin/coreconstants.h>
-#include <utils/themehelper.h>
+#include <coreplugin/coreicons.h>
#include "todoicons.h"
@@ -41,19 +40,16 @@ QIcon icon(IconType type)
{
switch (type) {
case IconType::Info: {
- const static QIcon icon = Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_INFO));
+ const static QIcon icon = Core::Icons::INFO.icon();
return icon;
}
case IconType::Warning: {
- const static QIcon icon = Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_WARNING));
+ const static QIcon icon = Core::Icons::WARNING.icon();
return icon;
}
default:
case IconType::Error: {
- const static QIcon icon = Utils::ThemeHelper::themedIcon(
- QLatin1String(Core::Constants::ICON_ERROR));
+ const static QIcon icon = Core::Icons::ERROR.icon();
return icon;
}
}
diff --git a/src/plugins/todo/todoitemsmodel.cpp b/src/plugins/todo/todoitemsmodel.cpp
index 2179f010f3..1c85e690aa 100644
--- a/src/plugins/todo/todoitemsmodel.cpp
+++ b/src/plugins/todo/todoitemsmodel.cpp
@@ -35,7 +35,6 @@
#include <utils/algorithm.h>
#include <utils/theme/theme.h>
-#include <utils/themehelper.h>
#include <QIcon>
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp
index b612996563..da050dc58a 100644
--- a/src/plugins/valgrind/callgrindtool.cpp
+++ b/src/plugins/valgrind/callgrindtool.cpp
@@ -52,7 +52,7 @@
#include <analyzerbase/analyzerutils.h>
#include <analyzerbase/analyzerconstants.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
@@ -68,7 +68,6 @@
#include <utils/qtcassert.h>
#include <utils/fancymainwindow.h>
#include <utils/styledbar.h>
-#include <utils/themehelper.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
@@ -656,7 +655,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
// load external log file
action = new QAction(this);
- action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_OPENFILE)));
+ action->setIcon(Core::Icons::OPENFILE.icon());
action->setToolTip(tr("Load External Log File"));
connect(action, &QAction::triggered, this, &CallgrindToolPrivate::loadExternalLogFile);
layout->addWidget(createToolButton(action));
@@ -665,7 +664,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
// dump action
action = new QAction(this);
action->setDisabled(true);
- action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_REDO)));
+ action->setIcon(Core::Icons::REDO.icon());
//action->setText(tr("Dump"));
action->setToolTip(tr("Request the dumping of profile information. This will update the Callgrind visualization."));
connect(action, &QAction::triggered, this, &CallgrindToolPrivate::slotRequestDump);
@@ -675,7 +674,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
// reset action
action = new QAction(this);
action->setDisabled(true);
- action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_CLEAR)));
+ action->setIcon(Core::Icons::CLEAR.icon());
//action->setText(tr("Reset"));
action->setToolTip(tr("Reset all event counters."));
connect(action, &QAction::triggered, this, &CallgrindToolPrivate::resetRequested);
@@ -685,7 +684,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
// pause action
action = new QAction(this);
action->setCheckable(true);
- action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_PAUSE)));
+ action->setIcon(Core::Icons::PAUSE.icon());
//action->setText(tr("Ignore"));
action->setToolTip(tr("Pause event logging. No events are counted which will speed up program execution during profiling."));
connect(action, &QAction::toggled, this, &CallgrindToolPrivate::pauseToggled);
@@ -696,7 +695,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
// go back
action = new QAction(this);
action->setDisabled(true);
- action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_PREV)));
+ action->setIcon(Core::Icons::PREV.icon());
action->setToolTip(tr("Go back one step in history. This will select the previously selected item."));
connect(action, &QAction::triggered, m_stackBrowser, &StackBrowser::goBack);
layout->addWidget(createToolButton(action));
@@ -705,7 +704,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
// go forward
action = new QAction(this);
action->setDisabled(true);
- action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_NEXT)));
+ action->setIcon(Core::Icons::NEXT.icon());
action->setToolTip(tr("Go forward one step in history."));
connect(action, &QAction::triggered, m_stackBrowser, &StackBrowser::goNext);
layout->addWidget(createToolButton(action));
@@ -783,7 +782,7 @@ QWidget *CallgrindToolPrivate::createWidgets()
// filtering
action = new QAction(tr("Show Project Costs Only"), this);
- action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
+ action->setIcon(Core::Icons::FILTER.icon());
action->setToolTip(tr("Show only profiling info that originated from this project source."));
action->setCheckable(true);
connect(action, &QAction::toggled, this, &CallgrindToolPrivate::handleFilterProjectCosts);
diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp
index 21bbce0cc8..69b63928dd 100644
--- a/src/plugins/valgrind/memchecktool.cpp
+++ b/src/plugins/valgrind/memchecktool.cpp
@@ -61,7 +61,7 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/id.h>
@@ -69,7 +69,6 @@
#include <utils/fancymainwindow.h>
#include <utils/styledbar.h>
#include <utils/qtcassert.h>
-#include <utils/themehelper.h>
#include <QString>
#include <QLatin1String>
@@ -376,7 +375,7 @@ QWidget *MemcheckTool::createWidgets()
// Load external XML log file
action = new QAction(this);
- action->setIcon(QIcon(QLatin1String(Core::Constants::ICON_OPENFILE)));
+ action->setIcon(Core::Icons::OPENFILE.icon());
action->setToolTip(tr("Load External XML Log File"));
connect(action, &QAction::triggered, this, &MemcheckTool::loadExternalXmlLogFile);
button = new QToolButton;
@@ -387,7 +386,7 @@ QWidget *MemcheckTool::createWidgets()
// Go to previous leak.
action = new QAction(this);
action->setDisabled(true);
- action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_PREV)));
+ action->setIcon(Core::Icons::PREV.icon());
action->setToolTip(tr("Go to previous leak."));
connect(action, &QAction::triggered, m_errorView, &MemcheckErrorView::goBack);
button = new QToolButton;
@@ -398,7 +397,7 @@ QWidget *MemcheckTool::createWidgets()
// Go to next leak.
action = new QAction(this);
action->setDisabled(true);
- action->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_NEXT)));
+ action->setIcon(Core::Icons::NEXT.icon());
action->setToolTip(tr("Go to next leak."));
connect(action, &QAction::triggered, m_errorView, &MemcheckErrorView::goNext);
button = new QToolButton;
@@ -407,7 +406,7 @@ QWidget *MemcheckTool::createWidgets()
m_goNext = action;
QToolButton *filterButton = new QToolButton;
- filterButton->setIcon(Utils::ThemeHelper::themedIcon(QLatin1String(Core::Constants::ICON_FILTER)));
+ filterButton->setIcon(Core::Icons::FILTER.icon());
filterButton->setText(tr("Error Filter"));
filterButton->setPopupMode(QToolButton::InstantPopup);
filterButton->setProperty("noArrow", true);
diff --git a/src/plugins/valgrind/valgrindplugin.cpp b/src/plugins/valgrind/valgrindplugin.cpp
index 9a41f6d27e..47a918384d 100644
--- a/src/plugins/valgrind/valgrindplugin.cpp
+++ b/src/plugins/valgrind/valgrindplugin.cpp
@@ -38,6 +38,7 @@
#include "valgrindsettings.h"
#include "valgrindconfigwidget.h"
+#include <analyzerbase/analyzericons.h>
#include <analyzerbase/analyzermanager.h>
#include <analyzerbase/analyzerruncontrol.h>
#include <analyzerbase/analyzerstartparameters.h>
@@ -56,7 +57,6 @@
#include <projectexplorer/projectexplorer.h>
#include <utils/hostosinfo.h>
-#include <utils/themehelper.h>
#include <QtPlugin>
#include <QCoreApplication>
@@ -249,8 +249,7 @@ void ValgrindPlugin::extensionsInitialized()
editorContextMenu->addSeparator(analyzerContext);
QAction *action = new QAction(tr("Profile Costs of This Function and Its Callees"), this);
- action->setIcon(Utils::ThemeHelper::themedIcon(
- QLatin1String(Analyzer::Constants::ANALYZER_CONTROL_START_ICON)));
+ action->setIcon(Analyzer::Icons::ANALYZER_CONTROL_START.icon());
connect(action, &QAction::triggered, cgTool,
&CallgrindTool::handleShowCostsOfFunction);
Command *cmd = ActionManager::registerAction(action, "Analyzer.Callgrind.ShowCostsOfFunction",
diff --git a/src/plugins/winrt/winrtpackagedeploymentstepwidget.cpp b/src/plugins/winrt/winrtpackagedeploymentstepwidget.cpp
index 619b3453e3..c98a7eb6c2 100644
--- a/src/plugins/winrt/winrtpackagedeploymentstepwidget.cpp
+++ b/src/plugins/winrt/winrtpackagedeploymentstepwidget.cpp
@@ -30,7 +30,7 @@
#include "winrtpackagedeploymentstepwidget.h"
#include <ui_winrtpackagedeploymentstepwidget.h>
-#include <coreplugin/coreconstants.h>
+#include <coreplugin/coreicons.h>
#include <QIcon>
namespace WinRt {
@@ -42,7 +42,7 @@ WinRtPackageDeploymentStepWidget::WinRtPackageDeploymentStepWidget(WinRtPackageD
{
m_ui->setupUi(this);
m_ui->leArguments->setText(m_step->winDeployQtArguments());
- m_ui->btnRestoreDefaultArgs->setIcon(QIcon(QLatin1String(Core::Constants::ICON_RESET)));
+ m_ui->btnRestoreDefaultArgs->setIcon(Core::Icons::RESET.icon());
}
WinRtPackageDeploymentStepWidget::~WinRtPackageDeploymentStepWidget()
diff --git a/src/plugins/winrt/winrtruncontrol.cpp b/src/plugins/winrt/winrtruncontrol.cpp
index fed9db9635..8c4b400b6d 100644
--- a/src/plugins/winrt/winrtruncontrol.cpp
+++ b/src/plugins/winrt/winrtruncontrol.cpp
@@ -41,6 +41,7 @@
#include <projectexplorer/target.h>
#include <projectexplorer/project.h>
#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/projectexplorericons.h>
#include <qtsupport/qtkitinformation.h>
#include <QTimer>
@@ -60,7 +61,7 @@ WinRtRunControl::WinRtRunControl(WinRtRunConfiguration *runConfiguration, Core::
, m_state(StoppedState)
, m_runner(0)
{
- setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
+ setIcon(ProjectExplorer::Icons::RUN_SMALL);
}
void WinRtRunControl::start()
diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp
index 361ee4e947..be59bb4a5e 100644
--- a/src/shared/help/bookmarkmanager.cpp
+++ b/src/shared/help/bookmarkmanager.cpp
@@ -29,6 +29,7 @@
****************************************************************************/
#include "bookmarkmanager.h"
+#include "helpicons.h"
#include <localhelpmanager.h>
@@ -579,7 +580,7 @@ Qt::ItemFlags BookmarkModel::flags(const QModelIndex &index) const
BookmarkManager::BookmarkManager()
: m_folderIcon(QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon))
- , m_bookmarkIcon(QLatin1String(":/help/images/bookmark.png"))
+ , m_bookmarkIcon(Help::Icons::BOOKMARK.icon())
, treeModel(new BookmarkModel(0, 1, this))
, listModel(new BookmarkModel(0, 1, this))
{
diff --git a/src/shared/help/help.pri b/src/shared/help/help.pri
index edd42b3b9a..6cc8f52aeb 100644
--- a/src/shared/help/help.pri
+++ b/src/shared/help/help.pri
@@ -9,7 +9,8 @@ HEADERS += \
$$PWD/contentwindow.h \
$$PWD/filternamedialog.h \
$$PWD/indexwindow.h \
- $$PWD/topicchooser.h
+ $$PWD/topicchooser.h \
+ $$PWD/helpicons.h
SOURCES += \
$$PWD/bookmarkmanager.cpp \
diff --git a/src/shared/help/helpicons.h b/src/shared/help/helpicons.h
new file mode 100644
index 0000000000..4cd72deb33
--- /dev/null
+++ b/src/shared/help/helpicons.h
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms and
+** conditions see http://www.qt.io/terms-conditions. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+#ifndef HELPICONS_H
+#define HELPICONS_H
+
+#include <utils/icon.h>
+
+namespace Help {
+namespace Icons {
+
+const Utils::Icon BOOKMARK(
+ QLatin1String(":/help/images/bookmark.png"));
+const Utils::Icon HOME(
+ QLatin1String(":/help/images/home.png"));
+
+} // namespace Icons
+} // namespace Help
+
+#endif // HELPICONS_H
diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg
index 413d3f1fe8..6b3645aba5 100644
--- a/src/tools/icons/qtcreatoricons.svg
+++ b/src/tools/icons/qtcreatoricons.svg
@@ -1789,8 +1789,7 @@
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
- id="src/plugins/coreplugin/images/reload_reset_gray"
- style=""
+ id="src/plugins/coreplugin/images/reload_gray"
clip-path="url(#clipPath3204)">
<rect
style="fill:#ffffff"