forked from qt-creator/qt-creator
Analyzer: Move tool startup code closer to the action setup
The code sharing in the base was along a somewhat unfortunate boundary. Moving it into the only user also removes some of the wrong local/remote separation. Change-Id: I0be9636ea448d123f9f5105a52d56f47ff7871c3 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
@@ -422,8 +422,7 @@ bool AnalyzerManagerPrivate::showPromptDialog(const QString &title, const QStrin
|
|||||||
void AnalyzerManagerPrivate::startTool()
|
void AnalyzerManagerPrivate::startTool()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_currentAction, return);
|
QTC_ASSERT(m_currentAction, return);
|
||||||
TaskHub::clearTasks(Constants::ANALYZERTASK_ID);
|
m_currentAction->startTool();
|
||||||
m_currentAction->toolStarter()();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnalyzerManagerPrivate::modeChanged(IMode *mode)
|
void AnalyzerManagerPrivate::modeChanged(IMode *mode)
|
||||||
|
@@ -33,7 +33,6 @@
|
|||||||
|
|
||||||
#include "analyzermanager.h"
|
#include "analyzermanager.h"
|
||||||
#include "analyzerruncontrol.h"
|
#include "analyzerruncontrol.h"
|
||||||
#include "startremotedialog.h"
|
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/imode.h>
|
#include <coreplugin/imode.h>
|
||||||
@@ -44,6 +43,7 @@
|
|||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/session.h>
|
#include <projectexplorer/session.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
#include <projectexplorer/taskhub.h>
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/checkablemessagebox.h>
|
#include <utils/checkablemessagebox.h>
|
||||||
@@ -59,12 +59,12 @@ using namespace ProjectExplorer;
|
|||||||
namespace Analyzer {
|
namespace Analyzer {
|
||||||
|
|
||||||
AnalyzerAction::AnalyzerAction(QObject *parent)
|
AnalyzerAction::AnalyzerAction(QObject *parent)
|
||||||
: QAction(parent), m_useStartupProject(true)
|
: QAction(parent), m_useStartupProject(true), m_toolMode(AnyMode)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
bool AnalyzerAction::isRunnable(QString *reason) const
|
bool AnalyzerAction::isRunnable(QString *reason) const
|
||||||
{
|
{
|
||||||
if (!m_useStartupProject)
|
if (m_toolStarter) // Something special. Pretend we can always run it.
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return ProjectExplorerPlugin::canRun(SessionManager::startupProject(), m_runMode, reason);
|
return ProjectExplorerPlugin::canRun(SessionManager::startupProject(), m_runMode, reason);
|
||||||
@@ -90,11 +90,19 @@ static bool buildTypeAccepted(ToolMode toolMode, BuildConfiguration::BuildType b
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool checkForLocalStart(ToolMode toolMode)
|
void AnalyzerAction::startTool()
|
||||||
{
|
{
|
||||||
// Make sure mode is shown.
|
// Make sure mode is shown.
|
||||||
AnalyzerManager::showMode();
|
AnalyzerManager::showMode();
|
||||||
|
|
||||||
|
TaskHub::clearTasks(Constants::ANALYZERTASK_ID);
|
||||||
|
|
||||||
|
// Custom start.
|
||||||
|
if (m_toolStarter) {
|
||||||
|
m_toolStarter();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// ### not sure if we're supposed to check if the RunConFiguration isEnabled
|
// ### not sure if we're supposed to check if the RunConFiguration isEnabled
|
||||||
Project *pro = SessionManager::startupProject();
|
Project *pro = SessionManager::startupProject();
|
||||||
BuildConfiguration::BuildType buildType = BuildConfiguration::Unknown;
|
BuildConfiguration::BuildType buildType = BuildConfiguration::Unknown;
|
||||||
@@ -108,13 +116,13 @@ bool checkForLocalStart(ToolMode toolMode)
|
|||||||
|
|
||||||
// Check the project for whether the build config is in the correct mode
|
// Check the project for whether the build config is in the correct mode
|
||||||
// if not, notify the user and urge him to use the correct mode.
|
// if not, notify the user and urge him to use the correct mode.
|
||||||
if (!buildTypeAccepted(toolMode, buildType)) {
|
if (!buildTypeAccepted(m_toolMode, buildType)) {
|
||||||
const QString currentMode = buildType == BuildConfiguration::Debug
|
const QString currentMode = buildType == BuildConfiguration::Debug
|
||||||
? AnalyzerManager::tr("Debug")
|
? AnalyzerManager::tr("Debug")
|
||||||
: AnalyzerManager::tr("Release");
|
: AnalyzerManager::tr("Release");
|
||||||
|
|
||||||
QString toolModeString;
|
QString toolModeString;
|
||||||
switch (toolMode) {
|
switch (m_toolMode) {
|
||||||
case DebugMode:
|
case DebugMode:
|
||||||
toolModeString = AnalyzerManager::tr("Debug");
|
toolModeString = AnalyzerManager::tr("Debug");
|
||||||
break;
|
break;
|
||||||
@@ -138,26 +146,10 @@ bool checkForLocalStart(ToolMode toolMode)
|
|||||||
if (Utils::CheckableMessageBox::doNotAskAgainQuestion(ICore::mainWindow(),
|
if (Utils::CheckableMessageBox::doNotAskAgainQuestion(ICore::mainWindow(),
|
||||||
title, message, ICore::settings(), QLatin1String("AnalyzerCorrectModeWarning"))
|
title, message, ICore::settings(), QLatin1String("AnalyzerCorrectModeWarning"))
|
||||||
!= QDialogButtonBox::Yes)
|
!= QDialogButtonBox::Yes)
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
ProjectExplorerPlugin::runStartupProject(m_runMode);
|
||||||
}
|
|
||||||
|
|
||||||
bool checkForRemoteStart(AnalyzerStartParameters *sp)
|
|
||||||
{
|
|
||||||
StartRemoteDialog dlg;
|
|
||||||
if (dlg.exec() != QDialog::Accepted)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
sp->useStartupProject = false;
|
|
||||||
sp->connParams = dlg.sshParams();
|
|
||||||
sp->debuggee = dlg.executable();
|
|
||||||
sp->debuggeeArgs = dlg.arguments();
|
|
||||||
sp->displayName = dlg.executable();
|
|
||||||
sp->workingDirectory = dlg.workingDirectory();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Analyzer
|
} // namespace Analyzer
|
||||||
|
@@ -63,10 +63,6 @@ enum ToolMode {
|
|||||||
AnyMode
|
AnyMode
|
||||||
};
|
};
|
||||||
|
|
||||||
ANALYZER_EXPORT bool checkForLocalStart(ToolMode toolMode);
|
|
||||||
ANALYZER_EXPORT bool checkForRemoteStart(AnalyzerStartParameters *sp);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents an analyzation action, i.e. a tool that runs in a specific mode.
|
* This class represents an analyzation action, i.e. a tool that runs in a specific mode.
|
||||||
*
|
*
|
||||||
@@ -90,6 +86,7 @@ public:
|
|||||||
|
|
||||||
Core::Id toolId() const { return m_toolId; }
|
Core::Id toolId() const { return m_toolId; }
|
||||||
void setToolId(Core::Id id) { m_toolId = id; }
|
void setToolId(Core::Id id) { m_toolId = id; }
|
||||||
|
void setToolMode(ToolMode mode) { m_toolMode = mode; }
|
||||||
|
|
||||||
void setRunMode(ProjectExplorer::RunMode mode) { m_runMode = mode; }
|
void setRunMode(ProjectExplorer::RunMode mode) { m_runMode = mode; }
|
||||||
bool isRunnable(QString *reason = 0) const;
|
bool isRunnable(QString *reason = 0) const;
|
||||||
@@ -110,7 +107,7 @@ public:
|
|||||||
void setRunControlCreator(const RunControlCreator &creator) { m_runControlCreator = creator; }
|
void setRunControlCreator(const RunControlCreator &creator) { m_runControlCreator = creator; }
|
||||||
|
|
||||||
typedef std::function<void()> ToolStarter;
|
typedef std::function<void()> ToolStarter;
|
||||||
ToolStarter toolStarter() const { return m_toolStarter; }
|
void startTool();
|
||||||
void setToolStarter(const ToolStarter &toolStarter) { m_toolStarter = toolStarter; }
|
void setToolStarter(const ToolStarter &toolStarter) { m_toolStarter = toolStarter; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -118,6 +115,7 @@ protected:
|
|||||||
Core::Id m_menuGroup;
|
Core::Id m_menuGroup;
|
||||||
Core::Id m_actionId;
|
Core::Id m_actionId;
|
||||||
Core::Id m_toolId;
|
Core::Id m_toolId;
|
||||||
|
ToolMode m_toolMode;
|
||||||
ProjectExplorer::RunMode m_runMode;
|
ProjectExplorer::RunMode m_runMode;
|
||||||
WidgetCreator m_widgetCreator;
|
WidgetCreator m_widgetCreator;
|
||||||
RunControlCreator m_runControlCreator;
|
RunControlCreator m_runControlCreator;
|
||||||
|
@@ -558,24 +558,6 @@ AnalyzerRunControl *CallgrindToolPrivate::createRunControl(const AnalyzerStartPa
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallgrindTool::startLocalTool()
|
|
||||||
{
|
|
||||||
if (checkForLocalStart(ReleaseMode)) {
|
|
||||||
ProjectExplorerPlugin::runStartupProject(CallgrindRunMode);
|
|
||||||
d->setBusyCursor(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CallgrindTool::startRemoteTool()
|
|
||||||
{
|
|
||||||
AnalyzerStartParameters sp;
|
|
||||||
if (checkForRemoteStart(&sp)) {
|
|
||||||
AnalyzerRunControl *rc = createRunControl(sp, 0);
|
|
||||||
ProjectExplorerPlugin::startRunControl(rc, CallgrindRunMode);
|
|
||||||
d->setBusyCursor(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CallgrindTool::handleShowCostsOfFunction()
|
void CallgrindTool::handleShowCostsOfFunction()
|
||||||
{
|
{
|
||||||
d->handleShowCostsOfFunction();
|
d->handleShowCostsOfFunction();
|
||||||
|
@@ -54,9 +54,6 @@ public:
|
|||||||
ProjectExplorer::RunConfiguration *runConfiguration = 0);
|
ProjectExplorer::RunConfiguration *runConfiguration = 0);
|
||||||
QWidget *createWidgets();
|
QWidget *createWidgets();
|
||||||
|
|
||||||
void startLocalTool();
|
|
||||||
void startRemoteTool();
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void handleShowCostsOfFunction();
|
void handleShowCostsOfFunction();
|
||||||
|
|
||||||
|
@@ -594,42 +594,12 @@ void MemcheckTool::setBusyCursor(bool busy)
|
|||||||
m_errorView->setCursor(cursor);
|
m_errorView->setCursor(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemcheckTool::startLocalTool()
|
|
||||||
{
|
|
||||||
if (checkForLocalStart(DebugMode))
|
|
||||||
ProjectExplorerPlugin::runStartupProject(MemcheckRunMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MemcheckTool::startRemoteTool()
|
|
||||||
{
|
|
||||||
AnalyzerStartParameters sp;
|
|
||||||
if (checkForRemoteStart(&sp)) {
|
|
||||||
AnalyzerRunControl *rc = createRunControl(sp, 0);
|
|
||||||
ProjectExplorerPlugin::startRunControl(rc, MemcheckRunMode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MemcheckWithGdbTool::MemcheckWithGdbTool(QObject *parent) :
|
MemcheckWithGdbTool::MemcheckWithGdbTool(QObject *parent) :
|
||||||
MemcheckTool(parent)
|
MemcheckTool(parent)
|
||||||
{
|
{
|
||||||
setObjectName(QLatin1String("MemcheckWithGdbTool"));
|
setObjectName(QLatin1String("MemcheckWithGdbTool"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemcheckWithGdbTool::startLocalTool()
|
|
||||||
{
|
|
||||||
if (checkForLocalStart(DebugMode))
|
|
||||||
ProjectExplorerPlugin::runStartupProject(MemcheckWithGdbRunMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MemcheckWithGdbTool::startRemoteTool()
|
|
||||||
{
|
|
||||||
AnalyzerStartParameters sp;
|
|
||||||
if (checkForRemoteStart(&sp)) {
|
|
||||||
AnalyzerRunControl *rc = createRunControl(sp, 0);
|
|
||||||
ProjectExplorerPlugin::startRunControl(rc, MemcheckWithGdbRunMode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MemcheckRunControl *MemcheckWithGdbTool::createMemcheckRunControl(const AnalyzerStartParameters &sp,
|
MemcheckRunControl *MemcheckWithGdbTool::createMemcheckRunControl(const AnalyzerStartParameters &sp,
|
||||||
RunConfiguration *runConfiguration)
|
RunConfiguration *runConfiguration)
|
||||||
{
|
{
|
||||||
|
@@ -83,8 +83,6 @@ class MemcheckTool : public QObject
|
|||||||
public:
|
public:
|
||||||
MemcheckTool(QObject *parent);
|
MemcheckTool(QObject *parent);
|
||||||
|
|
||||||
void startLocalTool();
|
|
||||||
void startRemoteTool();
|
|
||||||
QWidget *createWidgets();
|
QWidget *createWidgets();
|
||||||
|
|
||||||
Analyzer::AnalyzerRunControl *createRunControl(const Analyzer::AnalyzerStartParameters &sp,
|
Analyzer::AnalyzerRunControl *createRunControl(const Analyzer::AnalyzerStartParameters &sp,
|
||||||
@@ -140,8 +138,6 @@ class MemcheckWithGdbTool : public MemcheckTool
|
|||||||
public:
|
public:
|
||||||
MemcheckWithGdbTool(QObject *parent);
|
MemcheckWithGdbTool(QObject *parent);
|
||||||
|
|
||||||
void startLocalTool();
|
|
||||||
void startRemoteTool();
|
|
||||||
MemcheckRunControl *createMemcheckRunControl(
|
MemcheckRunControl *createMemcheckRunControl(
|
||||||
const Analyzer::AnalyzerStartParameters &sp,
|
const Analyzer::AnalyzerStartParameters &sp,
|
||||||
ProjectExplorer::RunConfiguration *runConfiguration) override;
|
ProjectExplorer::RunConfiguration *runConfiguration) override;
|
||||||
|
@@ -38,6 +38,9 @@
|
|||||||
#include "valgrindconfigwidget.h"
|
#include "valgrindconfigwidget.h"
|
||||||
|
|
||||||
#include <analyzerbase/analyzermanager.h>
|
#include <analyzerbase/analyzermanager.h>
|
||||||
|
#include <analyzerbase/analyzerruncontrol.h>
|
||||||
|
#include <analyzerbase/analyzerstartparameters.h>
|
||||||
|
#include <analyzerbase/startremotedialog.h>
|
||||||
|
|
||||||
#include <coreplugin/dialogs/ioptionspage.h>
|
#include <coreplugin/dialogs/ioptionspage.h>
|
||||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||||
@@ -49,6 +52,9 @@
|
|||||||
|
|
||||||
#include <cppeditor/cppeditorconstants.h>
|
#include <cppeditor/cppeditorconstants.h>
|
||||||
|
|
||||||
|
#include <projectexplorer/projectexplorer.h>
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
@@ -56,6 +62,7 @@
|
|||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
using namespace Analyzer;
|
using namespace Analyzer;
|
||||||
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace Valgrind {
|
namespace Valgrind {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -101,6 +108,24 @@ ValgrindPlugin::~ValgrindPlugin()
|
|||||||
theGlobalSettings = 0;
|
theGlobalSettings = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void customStart(ProjectExplorer::RunMode runMode)
|
||||||
|
{
|
||||||
|
StartRemoteDialog dlg;
|
||||||
|
if (dlg.exec() != QDialog::Accepted)
|
||||||
|
return;
|
||||||
|
|
||||||
|
AnalyzerStartParameters sp;
|
||||||
|
sp.useStartupProject = false;
|
||||||
|
sp.connParams = dlg.sshParams();
|
||||||
|
sp.debuggee = dlg.executable();
|
||||||
|
sp.debuggeeArgs = dlg.arguments();
|
||||||
|
sp.displayName = dlg.executable();
|
||||||
|
sp.workingDirectory = dlg.workingDirectory();
|
||||||
|
|
||||||
|
AnalyzerRunControl *rc = AnalyzerManager::createRunControl(sp, 0);
|
||||||
|
ProjectExplorerPlugin::startRunControl(rc, runMode);
|
||||||
|
}
|
||||||
|
|
||||||
bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
||||||
{
|
{
|
||||||
theGlobalSettings = new ValgrindGlobalSettings();
|
theGlobalSettings = new ValgrindGlobalSettings();
|
||||||
@@ -151,11 +176,11 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
|||||||
action->setToolId("Memcheck");
|
action->setToolId("Memcheck");
|
||||||
action->setWidgetCreator(mcWidgetCreator);
|
action->setWidgetCreator(mcWidgetCreator);
|
||||||
action->setRunControlCreator(mcRunControlCreator);
|
action->setRunControlCreator(mcRunControlCreator);
|
||||||
action->setToolStarter([mcTool] { mcTool->startLocalTool(); });
|
action->setToolMode(DebugMode);
|
||||||
action->setRunMode(ProjectExplorer::MemcheckRunMode);
|
action->setRunMode(ProjectExplorer::MemcheckRunMode);
|
||||||
action->setText(tr("Valgrind Memory Analyzer"));
|
action->setText(tr("Valgrind Memory Analyzer"));
|
||||||
action->setToolTip(memcheckToolTip);
|
action->setToolTip(memcheckToolTip);
|
||||||
action->setMenuGroup(Constants::G_ANALYZER_TOOLS);
|
action->setMenuGroup(Analyzer::Constants::G_ANALYZER_TOOLS);
|
||||||
action->setEnabled(false);
|
action->setEnabled(false);
|
||||||
AnalyzerManager::addAction(action);
|
AnalyzerManager::addAction(action);
|
||||||
|
|
||||||
@@ -164,11 +189,11 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
|||||||
action->setToolId("MemcheckWithGdb");
|
action->setToolId("MemcheckWithGdb");
|
||||||
action->setWidgetCreator(mcgWidgetCreator);
|
action->setWidgetCreator(mcgWidgetCreator);
|
||||||
action->setRunControlCreator(mcgRunControlCreator);
|
action->setRunControlCreator(mcgRunControlCreator);
|
||||||
action->setToolStarter([mcgTool] { mcgTool->startLocalTool(); });
|
action->setToolMode(DebugMode);
|
||||||
action->setRunMode(ProjectExplorer::MemcheckWithGdbRunMode);
|
action->setRunMode(ProjectExplorer::MemcheckWithGdbRunMode);
|
||||||
action->setText(tr("Valgrind Memory Analyzer with GDB"));
|
action->setText(tr("Valgrind Memory Analyzer with GDB"));
|
||||||
action->setToolTip(memcheckWithGdbToolTip);
|
action->setToolTip(memcheckWithGdbToolTip);
|
||||||
action->setMenuGroup(Constants::G_ANALYZER_TOOLS);
|
action->setMenuGroup(Analyzer::Constants::G_ANALYZER_TOOLS);
|
||||||
action->setEnabled(false);
|
action->setEnabled(false);
|
||||||
AnalyzerManager::addAction(action);
|
AnalyzerManager::addAction(action);
|
||||||
|
|
||||||
@@ -177,11 +202,11 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
|||||||
action->setToolId(CallgrindToolId);
|
action->setToolId(CallgrindToolId);
|
||||||
action->setWidgetCreator(cgWidgetCreator);
|
action->setWidgetCreator(cgWidgetCreator);
|
||||||
action->setRunControlCreator(cgRunControlCreator);
|
action->setRunControlCreator(cgRunControlCreator);
|
||||||
action->setToolStarter([cgTool] { cgTool->startLocalTool(); });
|
action->setToolMode(ReleaseMode);
|
||||||
action->setRunMode(ProjectExplorer::CallgrindRunMode);
|
action->setRunMode(CallgrindRunMode);
|
||||||
action->setText(tr("Valgrind Function Profiler"));
|
action->setText(tr("Valgrind Function Profiler"));
|
||||||
action->setToolTip(callgrindToolTip);
|
action->setToolTip(callgrindToolTip);
|
||||||
action->setMenuGroup(Constants::G_ANALYZER_TOOLS);
|
action->setMenuGroup(Analyzer::Constants::G_ANALYZER_TOOLS);
|
||||||
action->setEnabled(false);
|
action->setEnabled(false);
|
||||||
AnalyzerManager::addAction(action);
|
AnalyzerManager::addAction(action);
|
||||||
}
|
}
|
||||||
@@ -191,11 +216,11 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
|||||||
action->setToolId("Memcheck");
|
action->setToolId("Memcheck");
|
||||||
action->setWidgetCreator(mcWidgetCreator);
|
action->setWidgetCreator(mcWidgetCreator);
|
||||||
action->setRunControlCreator(mcRunControlCreator);
|
action->setRunControlCreator(mcRunControlCreator);
|
||||||
action->setToolStarter([mcTool] { mcTool->startRemoteTool(); });
|
action->setToolStarter([] { customStart(MemcheckRunMode); });
|
||||||
action->setRunMode(ProjectExplorer::MemcheckRunMode);
|
action->setRunMode(MemcheckRunMode);
|
||||||
action->setText(tr("Valgrind Memory Analyzer (External Remote Application)"));
|
action->setText(tr("Valgrind Memory Analyzer (External Remote Application)"));
|
||||||
action->setToolTip(memcheckToolTip);
|
action->setToolTip(memcheckToolTip);
|
||||||
action->setMenuGroup(Constants::G_ANALYZER_REMOTE_TOOLS);
|
action->setMenuGroup(Analyzer::Constants::G_ANALYZER_REMOTE_TOOLS);
|
||||||
action->setUseSpecialStart();
|
action->setUseSpecialStart();
|
||||||
AnalyzerManager::addAction(action);
|
AnalyzerManager::addAction(action);
|
||||||
|
|
||||||
@@ -204,11 +229,11 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
|
|||||||
action->setToolId(CallgrindToolId);
|
action->setToolId(CallgrindToolId);
|
||||||
action->setWidgetCreator(cgWidgetCreator);
|
action->setWidgetCreator(cgWidgetCreator);
|
||||||
action->setRunControlCreator(cgRunControlCreator);
|
action->setRunControlCreator(cgRunControlCreator);
|
||||||
action->setToolStarter([cgTool] { cgTool->startRemoteTool(); });
|
action->setToolStarter([] { customStart(CallgrindRunMode); });
|
||||||
action->setRunMode(ProjectExplorer::CallgrindRunMode);
|
action->setRunMode(CallgrindRunMode);
|
||||||
action->setText(tr("Valgrind Function Profiler (External Remote Application)"));
|
action->setText(tr("Valgrind Function Profiler (External Remote Application)"));
|
||||||
action->setToolTip(callgrindToolTip);
|
action->setToolTip(callgrindToolTip);
|
||||||
action->setMenuGroup(Constants::G_ANALYZER_REMOTE_TOOLS);
|
action->setMenuGroup(Analyzer::Constants::G_ANALYZER_REMOTE_TOOLS);
|
||||||
action->setUseSpecialStart();
|
action->setUseSpecialStart();
|
||||||
AnalyzerManager::addAction(action);
|
AnalyzerManager::addAction(action);
|
||||||
|
|
||||||
@@ -246,4 +271,3 @@ void ValgrindPlugin::extensionsInitialized()
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Valgrind
|
} // namespace Valgrind
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user