Commit ae19d452 authored by hjk's avatar hjk

Debugger: Move remaining Analyzer overlay icon to ProjectExplorer

It's the only remaining item and loosens the dependencies of
ex-AnalyzerBase based plugins on the the Debugger.

Change-Id: I943ac44401c440dd6d3d5c1f54f8f996accd2b4a
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@theqtcompany.com>
parent addc3970
...@@ -20,8 +20,7 @@ HEADERS += \ ...@@ -20,8 +20,7 @@ HEADERS += \
$$PWD/analyzerutils.h \ $$PWD/analyzerutils.h \
$$PWD/detailederrorview.h \ $$PWD/detailederrorview.h \
$$PWD/diagnosticlocation.h \ $$PWD/diagnosticlocation.h \
$$PWD/startremotedialog.h \ $$PWD/startremotedialog.h
$$PWD/analyzericons.h
RESOURCES += \ RESOURCES += \
$$PWD/analyzerbase.qrc $$PWD/analyzerbase.qrc
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>images/analyzer_category.png</file> <file>images/analyzer_category.png</file>
<file>images/analyzer_overlay_small.png</file>
<file>images/analyzer_overlay_small@2x.png</file>
</qresource> </qresource>
</RCC> </RCC>
/****************************************************************************
**
** 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.
**
****************************************************************************/
#pragma once
#include <utils/icon.h>
namespace Debugger {
namespace Icons {
const Utils::Icon ANALYZER_CONTROL_START({
{QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunColor},
{QLatin1String(":/images/analyzer_overlay_small.png"), Utils::Theme::PanelTextColorMid}},
Utils::Icon::MenuTintedStyle);
const Utils::Icon ANALYZER_CONTROL_START_TOOLBAR({
{QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunToolBarColor},
{QLatin1String(":/images/analyzer_overlay_small.png"), Utils::Theme::IconsBaseColor}});
} // namespace Icons
} // namespace Debugger
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
** **
****************************************************************************/ ****************************************************************************/
#include "analyzericons.h"
#include "analyzermanager.h" #include "analyzermanager.h"
#include "analyzerruncontrol.h" #include "analyzerruncontrol.h"
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/runconfigurationaspects.h> #include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/projectexplorericons.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <QDebug> #include <QDebug>
...@@ -42,7 +42,7 @@ namespace Debugger { ...@@ -42,7 +42,7 @@ namespace Debugger {
AnalyzerRunControl::AnalyzerRunControl(RunConfiguration *runConfiguration, Core::Id runMode) AnalyzerRunControl::AnalyzerRunControl(RunConfiguration *runConfiguration, Core::Id runMode)
: RunControl(runConfiguration, runMode) : RunControl(runConfiguration, runMode)
{ {
setIcon(Icons::ANALYZER_CONTROL_START_TOOLBAR); setIcon(Icons::ANALYZER_START_SMALL_TOOLBAR);
} }
} // namespace Debugger } // namespace Debugger
...@@ -246,7 +246,6 @@ QtcPlugin { ...@@ -246,7 +246,6 @@ QtcPlugin {
files: [ files: [
"analyzerbase.qrc", "analyzerbase.qrc",
"analyzerconstants.h", "analyzerconstants.h",
"analyzericons.h",
"analyzermanager.h", "analyzermanager.h",
"analyzerrunconfigwidget.cpp", "analyzerrunconfigwidget.cpp",
"analyzerrunconfigwidget.h", "analyzerrunconfigwidget.h",
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include "debuggermainwindow.h" #include "debuggermainwindow.h"
#include "debuggerconstants.h" #include "debuggerconstants.h"
#include "debuggerinternalconstants.h" #include "debuggerinternalconstants.h"
#include "analyzer/analyzericons.h"
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
......
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
#include "gdb/startgdbserverdialog.h" #include "gdb/startgdbserverdialog.h"
#include "analyzer/analyzerconstants.h" #include "analyzer/analyzerconstants.h"
#include "analyzer/analyzericons.h"
#include "analyzer/analyzermanager.h" #include "analyzer/analyzermanager.h"
#include "analyzer/analyzerruncontrol.h" #include "analyzer/analyzerruncontrol.h"
#include "analyzer/analyzerstartparameters.h" #include "analyzer/analyzerstartparameters.h"
...@@ -3571,7 +3570,7 @@ void registerToolbar(const QByteArray &perspectiveId, const ToolbarDescription & ...@@ -3571,7 +3570,7 @@ void registerToolbar(const QByteArray &perspectiveId, const ToolbarDescription &
QAction *createStartAction() QAction *createStartAction()
{ {
auto action = new QAction(DebuggerMainWindow::tr("Start"), DebuggerPlugin::instance()); auto action = new QAction(DebuggerMainWindow::tr("Start"), DebuggerPlugin::instance());
action->setIcon(Icons::ANALYZER_CONTROL_START_TOOLBAR.icon()); action->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR.icon());
action->setEnabled(true); action->setEnabled(true);
return action; return action;
} }
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
<file>images/run_mask@2x.png</file> <file>images/run_mask@2x.png</file>
<file>images/debugger_overlay_small.png</file> <file>images/debugger_overlay_small.png</file>
<file>images/debugger_overlay_small@2x.png</file> <file>images/debugger_overlay_small@2x.png</file>
<file>images/analyzer_overlay_small.png</file>
<file>images/analyzer_overlay_small@2x.png</file>
<file>images/session.png</file> <file>images/session.png</file>
<file>images/targetrunselected.png</file> <file>images/targetrunselected.png</file>
<file>images/targetrunselected@2x.png</file> <file>images/targetrunselected@2x.png</file>
......
...@@ -58,6 +58,13 @@ const Utils::Icon DEBUG_START_SMALL({ ...@@ -58,6 +58,13 @@ const Utils::Icon DEBUG_START_SMALL({
const Utils::Icon DEBUG_START_SMALL_TOOLBAR({ const Utils::Icon DEBUG_START_SMALL_TOOLBAR({
{QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunToolBarColor}, {QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunToolBarColor},
{QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}}); {QLatin1String(":/projectexplorer/images/debugger_overlay_small.png"), Utils::Theme::IconsDebugColor}});
const Utils::Icon ANALYZER_START_SMALL({
{QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunColor},
{QLatin1String(":/projectexplorer/images/analyzer_overlay_small.png"), Utils::Theme::PanelTextColorMid}},
Utils::Icon::MenuTintedStyle);
const Utils::Icon ANALYZER_START_SMALL_TOOLBAR({
{QLatin1String(":/core/images/run_small.png"), Utils::Theme::IconsRunToolBarColor},
{QLatin1String(":/projectexplorer/images/analyzer_overlay_small.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon BUILDSTEP_MOVEUP({ const Utils::Icon BUILDSTEP_MOVEUP({
{QLatin1String(":/projectexplorer/images/buildstepmoveup.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint); {QLatin1String(":/projectexplorer/images/buildstepmoveup.png"), Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint);
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
#include <debugger/debuggerconstants.h> #include <debugger/debuggerconstants.h>
#include <debugger/analyzer/analyzerconstants.h> #include <debugger/analyzer/analyzerconstants.h>
#include <debugger/analyzer/analyzericons.h>
#include <debugger/analyzer/analyzermanager.h> #include <debugger/analyzer/analyzermanager.h>
#include <debugger/analyzer/analyzerstartparameters.h> #include <debugger/analyzer/analyzerstartparameters.h>
#include <debugger/analyzer/analyzerutils.h> #include <debugger/analyzer/analyzerutils.h>
...@@ -297,7 +296,7 @@ CallgrindTool::CallgrindTool(QObject *parent) ...@@ -297,7 +296,7 @@ CallgrindTool::CallgrindTool(QObject *parent)
editorContextMenu->addSeparator(analyzerContext); editorContextMenu->addSeparator(analyzerContext);
auto action = new QAction(tr("Profile Costs of This Function and Its Callees"), this); auto action = new QAction(tr("Profile Costs of This Function and Its Callees"), this);
action->setIcon(Debugger::Icons::ANALYZER_CONTROL_START.icon()); action->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL.icon());
connect(action, &QAction::triggered, this, connect(action, &QAction::triggered, this,
&CallgrindTool::handleShowCostsOfFunction); &CallgrindTool::handleShowCostsOfFunction);
Command *cmd = ActionManager::registerAction(action, "Analyzer.Callgrind.ShowCostsOfFunction", Command *cmd = ActionManager::registerAction(action, "Analyzer.Callgrind.ShowCostsOfFunction",
......
...@@ -2416,7 +2416,7 @@ ...@@ -2416,7 +2416,7 @@
y="578.5" /> y="578.5" />
</g> </g>
<g <g
id="src/plugins/debugger/analyzer/images/analyzer_overlay_small" id="src/plugins/projectexplorer/images/analyzer_overlay_small"
transform="translate(16,0)"> transform="translate(16,0)">
<rect <rect
id="rect4959-4-5" id="rect4959-4-5"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment