Commit 2a104dcf authored by hjk's avatar hjk

Debugger: Consolidate icon storage handling

We settled now on global objects being fine for the purpose
in Core and ProjectExplorer, so there's no point in using
something more fancy in the debugger.

Change-Id: I72e45f398c09d22894419c274dfbea77da0fc153
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 5199f84f
...@@ -259,44 +259,6 @@ BreakHandler::BreakHandler() ...@@ -259,44 +259,6 @@ BreakHandler::BreakHandler()
<< tr("Address") << tr("Condition") << tr("Ignore") << tr("Threads")); << tr("Address") << tr("Condition") << tr("Ignore") << tr("Threads"));
} }
QIcon BreakHandler::breakpointIcon()
{
static QIcon icon = Icons::BREAKPOINT.icon();
return icon;
}
QIcon BreakHandler::disabledBreakpointIcon()
{
static QIcon icon = Icons::BREAKPOINT_DISABLED.icon();
return icon;
}
QIcon BreakHandler::pendingBreakpointIcon()
{
static QIcon icon = Icons::BREAKPOINT_PENDING.icon();
return icon;
}
QIcon BreakHandler::watchpointIcon()
{
static QIcon icon = Icons::WATCHPOINT.icon();
return icon;
}
QIcon BreakHandler::tracepointIcon()
{
static QIcon icon = Icons::TRACEPOINT.icon();
return icon;
}
QIcon BreakHandler::emptyIcon()
{
static QIcon icon = Icons::BREAKPOINT_PENDING.icon();
//static QIcon icon = Icons::WATCHPOINT.icon();
//static QIcon icon = Icons::EMPTY.icon();
return icon;
}
static inline bool fileNameMatch(const QString &f1, const QString &f2) static inline bool fileNameMatch(const QString &f1, const QString &f2)
{ {
if (HostOsInfo::fileNameCaseSensitivity() == Qt::CaseInsensitive) if (HostOsInfo::fileNameCaseSensitivity() == Qt::CaseInsensitive)
...@@ -1401,16 +1363,16 @@ QIcon BreakpointItem::icon() const ...@@ -1401,16 +1363,16 @@ QIcon BreakpointItem::icon() const
// FIXME: This seems to be called on each cursor blink as soon as the // FIXME: This seems to be called on each cursor blink as soon as the
// cursor is near a line with a breakpoint marker (+/- 2 lines or so). // cursor is near a line with a breakpoint marker (+/- 2 lines or so).
if (m_params.isTracepoint()) if (m_params.isTracepoint())
return BreakHandler::tracepointIcon(); return Icons::TRACEPOINT.icon();
if (m_params.type == WatchpointAtAddress) if (m_params.type == WatchpointAtAddress)
return BreakHandler::watchpointIcon(); return Icons::WATCHPOINT.icon();
if (m_params.type == WatchpointAtExpression) if (m_params.type == WatchpointAtExpression)
return BreakHandler::watchpointIcon(); return Icons::WATCHPOINT.icon();
if (!m_params.enabled) if (!m_params.enabled)
return BreakHandler::disabledBreakpointIcon(); return Icons::BREAKPOINT_DISABLED.icon();
if (m_state == BreakpointInserted && !m_response.pending) if (m_state == BreakpointInserted && !m_response.pending)
return BreakHandler::breakpointIcon(); return Icons::BREAKPOINT.icon();
return BreakHandler::pendingBreakpointIcon(); return Icons::BREAKPOINT_PENDING.icon();
} }
QString BreakpointItem::toToolTip() const QString BreakpointItem::toToolTip() const
......
...@@ -187,13 +187,6 @@ public: ...@@ -187,13 +187,6 @@ public:
Breakpoints findBreakpointsByIndex(const QList<QModelIndex> &list) const; Breakpoints findBreakpointsByIndex(const QList<QModelIndex> &list) const;
void updateMarkers(); void updateMarkers();
static QIcon breakpointIcon();
static QIcon disabledBreakpointIcon();
static QIcon pendingBreakpointIcon();
static QIcon emptyIcon();
static QIcon watchpointIcon();
static QIcon tracepointIcon();
Breakpoint findBreakpointByFileAndLine(const QString &fileName, Breakpoint findBreakpointByFileAndLine(const QString &fileName,
int lineNumber, bool useMarkerPosition = true); int lineNumber, bool useMarkerPosition = true);
Breakpoint findBreakpointByAddress(quint64 address) const; Breakpoint findBreakpointByAddress(quint64 address) const;
......
...@@ -123,7 +123,8 @@ SOURCES += \ ...@@ -123,7 +123,8 @@ SOURCES += \
localsandexpressionswindow.cpp \ localsandexpressionswindow.cpp \
imageviewer.cpp \ imageviewer.cpp \
simplifytype.cpp \ simplifytype.cpp \
unstartedappwatcherdialog.cpp unstartedappwatcherdialog.cpp \
debuggericons.cpp
RESOURCES += debugger.qrc RESOURCES += debugger.qrc
......
...@@ -49,7 +49,7 @@ Project { ...@@ -49,7 +49,7 @@ Project {
"debugger_global.h", "debugger_global.h",
"debuggeractions.cpp", "debuggeractions.h", "debuggeractions.cpp", "debuggeractions.h",
"debuggerconstants.h", "debuggerconstants.h",
"debuggericons.h", "debuggericons.h", "debuggericons.cpp",
"debuggercore.h", "debuggercore.h",
"debuggerdialogs.cpp", "debuggerdialogs.h", "debuggerdialogs.cpp", "debuggerdialogs.h",
"debuggerengine.cpp", "debuggerengine.h", "debuggerengine.cpp", "debuggerengine.h",
......
...@@ -61,7 +61,6 @@ enum TestCases ...@@ -61,7 +61,6 @@ enum TestCases
// Some convenience. // Some convenience.
void updateState(DebuggerEngine *engine); void updateState(DebuggerEngine *engine);
void updateWatchersWindow(bool showWatch, bool showReturn); void updateWatchersWindow(bool showWatch, bool showReturn);
QIcon locationMarkIcon();
const CPlusPlus::Snapshot &cppCodeModelSnapshot(); const CPlusPlus::Snapshot &cppCodeModelSnapshot();
bool hasSnapshots(); bool hasSnapshots();
void openTextEditor(const QString &titlePattern, const QString &contents); void openTextEditor(const QString &titlePattern, const QString &contents);
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "debuggerinternalconstants.h" #include "debuggerinternalconstants.h"
#include "debuggeractions.h" #include "debuggeractions.h"
#include "debuggercore.h" #include "debuggercore.h"
#include "debuggericons.h"
#include "debuggerruncontrol.h" #include "debuggerruncontrol.h"
#include "debuggerstartparameters.h" #include "debuggerstartparameters.h"
#include "debuggertooltipmanager.h" #include "debuggertooltipmanager.h"
...@@ -131,7 +132,7 @@ Location::Location(const StackFrame &frame, bool marker) ...@@ -131,7 +132,7 @@ Location::Location(const StackFrame &frame, bool marker)
LocationMark::LocationMark(DebuggerEngine *engine, const QString &file, int line) LocationMark::LocationMark(DebuggerEngine *engine, const QString &file, int line)
: TextMark(file, line, Constants::TEXT_MARK_CATEGORY_LOCATION), m_engine(engine) : TextMark(file, line, Constants::TEXT_MARK_CATEGORY_LOCATION), m_engine(engine)
{ {
setIcon(Internal::locationMarkIcon()); setIcon(Icons::LOCATION.icon());
setPriority(TextMark::HighPriority); setPriority(TextMark::HighPriority);
} }
......
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://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 https://www.qt.io/terms-conditions. For further
** information use the contact form at https://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 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "debuggericons.h"
using namespace Utils;
namespace Debugger {
namespace Icons {
const Icon BREAKPOINT({
{":/debugger/images/breakpoint.png", Theme::IconsErrorColor}}, Icon::Tint);
const Icon BREAKPOINT_DISABLED({
{":/debugger/images/breakpoint_disabled.png", Theme::IconsErrorColor}}, Icon::Tint);
const Icon BREAKPOINT_PENDING({
{":/debugger/images/breakpoint.png", Theme::IconsErrorColor},
{":/debugger/images/breakpoint_pending_overlay.png", Theme::PanelTextColorDark}}, Icon::IconStyleOptions(Icon::Tint | Icon::PunchEdges));
const Icon BREAKPOINTS(
":/debugger/images/debugger_breakpoints.png");
const Icon WATCHPOINT({
{":/core/images/eye_open.png", Theme::TextColorNormal}}, Icon::Tint);
const Icon TRACEPOINT({
{":/core/images/eye_open.png", Theme::TextColorNormal},
{":/debugger/images/tracepointoverlay.png", Theme::TextColorNormal}}, Icon::Tint | Icon::PunchEdges);
const Icon CONTINUE(
":/debugger/images/debugger_continue.png");
const Icon CONTINUE_FLAT({
{":/debugger/images/debugger_continue_1_mask.png", Theme::IconsInterruptToolBarColor},
{":/debugger/images/debugger_continue_2_mask.png", Theme::IconsRunToolBarColor},
{":/projectexplorer/images/debugger_beetle_mask.png", Theme::IconsDebugColor}});
const Icon DEBUG_CONTINUE_SMALL({
{":/projectexplorer/images/continue_1_small.png", Theme::IconsInterruptColor},
{":/projectexplorer/images/continue_2_small.png", Theme::IconsRunColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon DEBUG_CONTINUE_SMALL_TOOLBAR({
{":/projectexplorer/images/continue_1_small.png", Theme::IconsInterruptToolBarColor},
{":/projectexplorer/images/continue_2_small.png", Theme::IconsRunToolBarColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::IconsDebugColor}});
const Icon INTERRUPT(
":/debugger/images/debugger_interrupt.png");
const Icon INTERRUPT_FLAT({
{":/debugger/images/debugger_interrupt_mask.png", Theme::IconsInterruptToolBarColor},
{":/projectexplorer/images/debugger_beetle_mask.png", Theme::IconsDebugColor}});
const Icon DEBUG_INTERRUPT_SMALL({
{":/core/images/interrupt_small.png", Theme::IconsInterruptColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon DEBUG_INTERRUPT_SMALL_TOOLBAR({
{":/core/images/interrupt_small.png", Theme::IconsInterruptToolBarColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::IconsDebugColor}});
const Icon DEBUG_EXIT_SMALL({
{":/core/images/stop_small.png", Theme::IconsStopColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon DEBUG_EXIT_SMALL_TOOLBAR({
{":/core/images/stop_small.png", Theme::IconsStopToolBarColor},
{":/projectexplorer/images/debugger_overlay_small.png", Theme::IconsDebugColor}});
const Icon LOCATION({
{":/debugger/images/location_background.png", Theme::IconsCodeModelOverlayForegroundColor},
{":/debugger/images/location.png", Theme::IconsWarningToolBarColor}}, Icon::Tint);
const Icon REVERSE_MODE({
{":/debugger/images/debugger_reversemode_background.png", Theme::IconsCodeModelOverlayForegroundColor},
{":/debugger/images/debugger_reversemode.png", Theme::IconsInfoColor}}, Icon::Tint);
const Icon APP_ON_TOP({
{":/debugger/images/qml/app-on-top.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon APP_ON_TOP_TOOLBAR({
{":/debugger/images/qml/app-on-top.png", Theme::IconsBaseColor}});
const Icon SELECT({
{":/debugger/images/qml/select.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon SELECT_TOOLBAR({
{":/debugger/images/qml/select.png", Theme::IconsBaseColor}});
const Icon EMPTY(
":/debugger/images/debugger_empty_14.png");
const Icon RECORD_ON({
{":/debugger/images/recordfill.png", Theme::IconsStopColor},
{":/debugger/images/recordoutline.png", Theme::IconsBaseColor}}, Icon::Tint | Icon::DropShadow);
const Icon RECORD_OFF({
{":/debugger/images/recordfill.png", Theme::IconsDisabledColor},
{":/debugger/images/recordoutline.png", Theme::IconsBaseColor}}, Icon::Tint | Icon::DropShadow);
const Icon STEP_OVER({
{":/debugger/images/debugger_stepover_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon STEP_OVER_TOOLBAR({
{":/debugger/images/debugger_stepover_small.png", Theme::IconsBaseColor}});
const Icon STEP_INTO({
{":/debugger/images/debugger_stepinto_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon STEP_INTO_TOOLBAR({
{":/debugger/images/debugger_stepinto_small.png", Theme::IconsBaseColor}});
const Icon STEP_OUT({
{":/debugger/images/debugger_stepout_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon STEP_OUT_TOOLBAR({
{":/debugger/images/debugger_stepout_small.png", Theme::IconsBaseColor}});
const Icon RESTART({
{":/debugger/images/debugger_restart_small.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon RESTART_TOOLBAR({
{":/debugger/images/debugger_restart_small.png", Theme::IconsRunToolBarColor}});
const Icon SINGLE_INSTRUCTION_MODE({
{":/debugger/images/debugger_singleinstructionmode.png", Theme::IconsBaseColor}});
const Icon MODE_DEBUGGER_CLASSIC(
":/debugger/images/mode_debug.png");
const Icon MODE_DEBUGGER_FLAT({
{":/debugger/images/mode_debug_mask.png", Theme::IconsBaseColor}});
const Icon MODE_DEBUGGER_FLAT_ACTIVE({
{":/debugger/images/mode_debug_mask.png", Theme::IconsModeDebugActiveColor}});
} // namespace Icons
} // namespace Debugger
...@@ -25,104 +25,54 @@ ...@@ -25,104 +25,54 @@
#pragma once #pragma once
#include "debugger_global.h"
#include <utils/icon.h> #include <utils/icon.h>
namespace Debugger { namespace Debugger {
namespace Icons { namespace Icons {
const Utils::Icon BREAKPOINT({ // Used in QmlProfiler.
{QLatin1String(":/debugger/images/breakpoint.png"), Utils::Theme::IconsErrorColor}}, Utils::Icon::Tint); DEBUGGER_EXPORT extern const Utils::Icon RECORD_ON;
const Utils::Icon BREAKPOINT_DISABLED({ DEBUGGER_EXPORT extern const Utils::Icon RECORD_OFF;
{QLatin1String(":/debugger/images/breakpoint_disabled.png"), Utils::Theme::IconsErrorColor}}, Utils::Icon::Tint);
const Utils::Icon BREAKPOINT_PENDING({ extern const Utils::Icon BREAKPOINT;
{QLatin1String(":/debugger/images/breakpoint.png"), Utils::Theme::IconsErrorColor}, extern const Utils::Icon BREAKPOINT_DISABLED;
{QLatin1String(":/debugger/images/breakpoint_pending_overlay.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::IconStyleOptions(Utils::Icon::Tint | Utils::Icon::PunchEdges)); extern const Utils::Icon BREAKPOINT_PENDING;
const Utils::Icon BREAKPOINTS( extern const Utils::Icon BREAKPOINTS;
QLatin1String(":/debugger/images/debugger_breakpoints.png")); extern const Utils::Icon WATCHPOINT;
const Utils::Icon WATCHPOINT({ extern const Utils::Icon TRACEPOINT;
{QLatin1String(":/core/images/eye_open.png"), Utils::Theme::TextColorNormal}}, Utils::Icon::Tint); extern const Utils::Icon CONTINUE;
const Utils::Icon TRACEPOINT({ extern const Utils::Icon CONTINUE_FLAT;
{QLatin1String(":/core/images/eye_open.png"), Utils::Theme::TextColorNormal}, extern const Utils::Icon DEBUG_CONTINUE_SMALL;
{QLatin1String(":/debugger/images/tracepointoverlay.png"), Utils::Theme::TextColorNormal}}, Utils::Icon::Tint | Utils::Icon::PunchEdges); extern const Utils::Icon DEBUG_CONTINUE_SMALL_TOOLBAR;
const Utils::Icon CONTINUE( extern const Utils::Icon INTERRUPT;
QLatin1String(":/debugger/images/debugger_continue.png")); extern const Utils::Icon INTERRUPT_FLAT;
const Utils::Icon CONTINUE_FLAT({ extern const Utils::Icon DEBUG_INTERRUPT_SMALL;
{QLatin1String(":/debugger/images/debugger_continue_1_mask.png"), Utils::Theme::IconsInterruptToolBarColor}, extern const Utils::Icon DEBUG_INTERRUPT_SMALL_TOOLBAR;
{QLatin1String(":/debugger/images/debugger_continue_2_mask.png"), Utils::Theme::IconsRunToolBarColor}, extern const Utils::Icon DEBUG_EXIT_SMALL;
{QLatin1String(":/projectexplorer/images/debugger_beetle_mask.png"), Utils::Theme::IconsDebugColor}}); extern const Utils::Icon DEBUG_EXIT_SMALL_TOOLBAR;
const Utils::Icon DEBUG_CONTINUE_SMALL({ extern const Utils::Icon LOCATION;
{QLatin1String(":/projectexplorer/images/continue_1_small.png"), Utils::Theme::IconsInterruptColor}, extern const Utils::Icon REVERSE_MODE;
{QLatin1String(":/projectexplorer/images/continue_2_small.png"), Utils::Theme::IconsRunColor}, extern const Utils::Icon APP_ON_TOP;
{QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle); extern const Utils::Icon APP_ON_TOP_TOOLBAR;
const Utils::Icon DEBUG_CONTINUE_SMALL_TOOLBAR({ extern const Utils::Icon SELECT;
{QLatin1String(":/projectexplorer/images/continue_1_small.png"), Utils::Theme::IconsInterruptToolBarColor}, extern const Utils::Icon SELECT_TOOLBAR;
{QLatin1String(":/projectexplorer/images/continue_2_small.png"), Utils::Theme::IconsRunToolBarColor}, extern const Utils::Icon EMPTY;
{QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}});
const Utils::Icon INTERRUPT(
QLatin1String(":/debugger/images/debugger_interrupt.png"));
const Utils::Icon INTERRUPT_FLAT({
{QLatin1String(":/debugger/images/debugger_interrupt_mask.png"), Utils::Theme::IconsInterruptToolBarColor},
{QLatin1String(":/projectexplorer/images/debugger_beetle_mask.png"), Utils::Theme::IconsDebugColor}});
const Utils::Icon DEBUG_INTERRUPT_SMALL({
{QLatin1String(":/core/images/interrupt_small.png"), Utils::Theme::IconsInterruptColor},
{QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle);
const Utils::Icon DEBUG_INTERRUPT_SMALL_TOOLBAR({
{QLatin1String(":/core/images/interrupt_small.png"), Utils::Theme::IconsInterruptToolBarColor},
{QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}});
const Utils::Icon DEBUG_EXIT_SMALL({
{QLatin1String(":/core/images/stop_small.png"), Utils::Theme::IconsStopColor},
{QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle);
const Utils::Icon DEBUG_EXIT_SMALL_TOOLBAR({
{QLatin1String(":/core/images/stop_small.png"), Utils::Theme::IconsStopToolBarColor},
{QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}});
const Utils::Icon LOCATION({
{QLatin1String(":/debugger/images/location_background.png"), Utils::Theme::IconsCodeModelOverlayForegroundColor},
{QLatin1String(":/debugger/images/location.png"), Utils::Theme::IconsWarningToolBarColor}}, Utils::Icon::Tint);
const Utils::Icon REVERSE_MODE({
{QLatin1String(":/debugger/images/debugger_reversemode_background.png"), Utils::Theme::IconsCodeModelOverlayForegroundColor},
{QLatin1String(":/debugger/images/debugger_reversemode.png"), Utils::Theme::IconsInfoColor}}, Utils::Icon::Tint);
const Utils::Icon APP_ON_TOP({
{QLatin1String(":/debugger/images/qml/app-on-top.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle);
const Utils::Icon APP_ON_TOP_TOOLBAR({
{QLatin1String(":/debugger/images/qml/app-on-top.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon SELECT({
{QLatin1String(":/debugger/images/qml/select.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle);
const Utils::Icon SELECT_TOOLBAR({
{QLatin1String(":/debugger/images/qml/select.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon EMPTY(
QLatin1String(":/debugger/images/debugger_empty_14.png"));
const Utils::Icon RECORD_ON({
{QLatin1String(":/debugger/images/recordfill.png"), Utils::Theme::IconsStopColor},
{QLatin1String(":/debugger/images/recordoutline.png"), Utils::Theme::IconsBaseColor}}, Utils::Icon::Tint | Utils::Icon::DropShadow);
const Utils::Icon RECORD_OFF({
{QLatin1String(":/debugger/images/recordfill.png"), Utils::Theme::IconsDisabledColor},
{QLatin1String(":/debugger/images/recordoutline.png"), Utils::Theme::IconsBaseColor}}, Utils::Icon::Tint | Utils::Icon::DropShadow);
const Utils::Icon STEP_OVER({ extern const Utils::Icon STEP_OVER;
{QLatin1String(":/debugger/images/debugger_stepover_small.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle); extern const Utils::Icon STEP_OVER_TOOLBAR;
const Utils::Icon STEP_OVER_TOOLBAR({ extern const Utils::Icon STEP_INTO;
{QLatin1String(":/debugger/images/debugger_stepover_small.png"), Utils::Theme::IconsBaseColor}}); extern const Utils::Icon STEP_INTO_TOOLBAR;
const Utils::Icon STEP_INTO({ extern const Utils::Icon STEP_OUT;
{QLatin1String(":/debugger/images/debugger_stepinto_small.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle); extern const Utils::Icon STEP_OUT_TOOLBAR;
const Utils::Icon STEP_INTO_TOOLBAR({ extern const Utils::Icon RESTART;
{QLatin1String(":/debugger/images/debugger_stepinto_small.png"), Utils::Theme::IconsBaseColor}}); extern const Utils::Icon RESTART_TOOLBAR;
const Utils::Icon STEP_OUT({ extern const Utils::Icon SINGLE_INSTRUCTION_MODE;
{QLatin1String(":/debugger/images/debugger_stepout_small.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle);
const Utils::Icon STEP_OUT_TOOLBAR({
{QLatin1String(":/debugger/images/debugger_stepout_small.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon RESTART({
{QLatin1String(":/debugger/images/debugger_restart_small.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::MenuTintedStyle);
const Utils::Icon RESTART_TOOLBAR({
{QLatin1String(":/debugger/images/debugger_restart_small.png"), Utils::Theme::IconsRunToolBarColor}});
const Utils::Icon SINGLE_INSTRUCTION_MODE({
{QLatin1String(":/debugger/images/debugger_singleinstructionmode.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon MODE_DEBUGGER_CLASSIC( extern const Utils::Icon MODE_DEBUGGER_CLASSIC;
QLatin1String(":/debugger/images/mode_debug.png")); extern const Utils::Icon MODE_DEBUGGER_FLAT;
const Utils::Icon MODE_DEBUGGER_FLAT({ extern const Utils::Icon MODE_DEBUGGER_FLAT_ACTIVE;
{QLatin1String(":/debugger/images/mode_debug_mask.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon MODE_DEBUGGER_FLAT_ACTIVE({
{QLatin1String(":/debugger/images/mode_debug_mask.png"), Utils::Theme::IconsModeDebugActiveColor}});
} // namespace Icons } // namespace Icons
} // namespace Debugger } // namespace Debugger
...@@ -998,8 +998,6 @@ public: ...@@ -998,8 +998,6 @@ public:
QToolButton *m_reverseToolButton = 0; QToolButton *m_reverseToolButton = 0;
QIcon m_locationMarkIcon;
QLabel *m_threadLabel = 0; QLabel *m_threadLabel = 0;
QComboBox *m_threadBox = 0; QComboBox *m_threadBox = 0;
...@@ -1310,8 +1308,6 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, ...@@ -1310,8 +1308,6 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
const Context cppDebuggercontext(C_CPPDEBUGGER); const Context cppDebuggercontext(C_CPPDEBUGGER);
const Context cppeditorcontext(CppEditor::Constants::CPPEDITOR_ID); const Context cppeditorcontext(CppEditor::Constants::CPPEDITOR_ID);
m_locationMarkIcon = Icons::LOCATION.icon();
m_busy = false; m_busy = false;
m_logWindow = new LogWindow; m_logWindow = new LogWindow;
...@@ -3107,11 +3103,6 @@ void updateWatchersWindow(bool showWatch, bool showReturn) ...@@ -3107,11 +3103,6 @@ void updateWatchersWindow(bool showWatch, bool showReturn)
dd->m_returnWindow->setVisible(showReturn); dd->m_returnWindow->setVisible(showReturn);
} }
QIcon locationMarkIcon()
{
return dd->m_locationMarkIcon;
}
bool hasSnapshots() bool hasSnapshots()
{ {
return dd->m_snapshotHandler->size(); return dd->m_snapshotHandler->size();
......
...@@ -119,8 +119,6 @@ QDebug operator<<(QDebug d, const SnapshotData &f) ...@@ -119,8 +119,6 @@ QDebug operator<<(QDebug d, const SnapshotData &f)
*/ */
SnapshotHandler::SnapshotHandler() SnapshotHandler::SnapshotHandler()
: m_positionIcon(Icons::LOCATION.icon()),
m_emptyIcon(Icons::EMPTY.icon())
{ {
m_currentIndex = -1; m_currentIndex = -1;
} }
...@@ -178,8 +176,7 @@ QVariant SnapshotHandler::data(const QModelIndex &index, int role) const ...@@ -178,8 +176,7 @@ QVariant SnapshotHandler::data(const QModelIndex &index, int role) const
case Qt::DecorationRole: case Qt::DecorationRole:
// Return icon that indicates whether this is the active stack frame. // Return icon that indicates whether this is the active stack frame.
if (index.column() == 0) if (index.column() == 0)
return (index.row() == m_currentIndex) ? m_positionIcon : m_emptyIcon; return (index.row() == m_currentIndex) ? Icons::LOCATION.icon() : Icons::EMPTY.icon();
break;
default: default:
break; break;
......
...@@ -65,8 +65,6 @@ private: ...@@ -65,8 +65,6 @@ private:
int m_currentIndex; int m_currentIndex;
QList< QPointer<DebuggerEngine> > m_snapshots; QList< QPointer<DebuggerEngine> > m_snapshots;
const QVariant m_positionIcon;
const QVariant m_emptyIcon;
}; };
} // namespace Internal } // namespace Internal
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
#include "sourceagent.h" #include "sourceagent.h"
#include "debuggerengine.h" #include "debuggerengine.h"
#include "debuggericons.h"
#include "debuggerinternalconstants.h" #include "debuggerinternalconstants.h"
#include "debuggercore.h"
#include "stackhandler.h" #include "stackhandler.h"
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
...@@ -141,7 +141,7 @@ void SourceAgent::updateLocationMarker() ...@@ -141,7 +141,7 @@ void SourceAgent::updateLocationMarker()
d->locationMark = new TextMark(QString(), lineNumber, d->locationMark = new TextMark(QString(), lineNumber,
Constants::TEXT_MARK_CATEGORY_LOCATION); Constants::TEXT_MARK_CATEGORY_LOCATION);
d->locationMark->setIcon(locationMarkIcon()); d->locationMark->setIcon(Icons::LOCATION.icon());
d->locationMark->setPriority(TextMark::HighPriority); d->locationMark->setPriority(TextMark::HighPriority);
d->editor->textDocument()->addMark(d->locationMark); d->editor->textDocument()->addMark(d->locationMark);
......
...@@ -54,9 +54,7 @@ namespace Internal { ...@@ -54,9 +54,7 @@ namespace Internal {
*/ */
StackHandler::StackHandler(DebuggerEngine *engine) StackHandler::StackHandler(DebuggerEngine *engine)
: m_engine(engine), : m_engine(engine)
m_positionIcon(Icons::LOCATION.icon()),
m_emptyIcon(Icons::EMPTY.icon())
{ {
setObjectName(QLatin1String("StackModel")); setObjectName(QLatin1String("StackModel"));
m_resetLocationScheduled = false; m_resetLocationScheduled = false;
...@@ -93,7 +91,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const ...@@ -93,7 +91,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
if (role == Qt::DisplayRole && index.column() == StackFunctionNameColumn) if (role == Qt::DisplayRole && index.column() == StackFunctionNameColumn)
return tr("<More>"); return tr("<More>");
if (role == Qt::DecorationRole && index.column() == StackLevelColumn) if (role == Qt::DecorationRole && index.column() == StackLevelColumn)
return m_emptyIcon; return Icons::EMPTY.icon();
return QVariant(); return QVariant();
} }
...@@ -120,7 +118,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const ...@@ -120,7 +118,7 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const
if (role == Qt::DecorationRole && index.column() == StackLevelColumn) { if (role == Qt::DecorationRole && index.column() == StackLevelColumn) {
// Return icon that indicates whether this is the active stack frame // Return icon that indicates whether this is the active stack frame
return (m_contentsValid && index.row() == m_currentIndex) return (m_contentsValid && index.row() == m_currentIndex)
? m_positionIcon : m_emptyIcon; ? Icons::LOCATION.icon() : Icons::EMPTY.icon();
} }
if (role == Qt::ToolTipRole && boolSetting(UseToolTipsInStackView)) if (role == Qt::ToolTipRole && boolSetting(UseToolTipsInStackView))
......
...@@ -88,8 +88,6 @@ private: ...@@ -88,8 +88,6 @@ private:
DebuggerEngine *m_engine; DebuggerEngine *m_engine;
StackFrames m_stackFrames; StackFrames m_stackFrames;
int m_currentIndex;