Analyzer: Merge ValgrindAction into AnalyzerAction

It was an empty shell.

Change-Id: I8bd915270c2b4b03b1ba638521ec35609a05b512
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-02-18 09:34:50 +01:00
parent 27290abc13
commit 0eba47065f
2 changed files with 8 additions and 14 deletions

View File

@@ -58,7 +58,8 @@ AnalyzerRunControl::AnalyzerRunControl(const AnalyzerStartParameters &sp,
connect(this, &AnalyzerRunControl::finished, connect(this, &AnalyzerRunControl::finished,
this, &AnalyzerRunControl::runControlFinished); this, &AnalyzerRunControl::runControlFinished);
connect(AnalyzerManager::stopAction(), SIGNAL(triggered()), SLOT(stopIt())); connect(AnalyzerManager::stopAction(), &QAction::triggered,
this, &AnalyzerRunControl::stopIt);
} }
void AnalyzerRunControl::stopIt() void AnalyzerRunControl::stopIt()

View File

@@ -95,13 +95,6 @@ private:
QPointer<QWidget> m_widget; QPointer<QWidget> m_widget;
}; };
class ValgrindAction : public AnalyzerAction
{
public:
explicit ValgrindAction(QObject *parent = 0) : AnalyzerAction(parent) { }
};
ValgrindPlugin::~ValgrindPlugin() ValgrindPlugin::~ValgrindPlugin()
{ {
delete theGlobalSettings; delete theGlobalSettings;
@@ -119,7 +112,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
m_memcheckWithGdbTool = new MemcheckWithGdbTool(this); m_memcheckWithGdbTool = new MemcheckWithGdbTool(this);
m_callgrindTool = new CallgrindTool(this); m_callgrindTool = new CallgrindTool(this);
ValgrindAction *action = 0; AnalyzerAction *action = 0;
QString callgrindToolTip = tr("Valgrind Function Profile uses the " QString callgrindToolTip = tr("Valgrind Function Profile uses the "
"\"callgrind\" tool to record function calls when a program runs."); "\"callgrind\" tool to record function calls when a program runs.");
@@ -132,7 +125,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
"When a problem is detected, the application is interrupted and can be debugged"); "When a problem is detected, the application is interrupted and can be debugged");
if (!Utils::HostOsInfo::isWindowsHost()) { if (!Utils::HostOsInfo::isWindowsHost()) {
action = new ValgrindAction(this); action = new AnalyzerAction(this);
action->setId("Memcheck.Local"); action->setId("Memcheck.Local");
action->setTool(m_memcheckTool); action->setTool(m_memcheckTool);
action->setText(tr("Valgrind Memory Analyzer")); action->setText(tr("Valgrind Memory Analyzer"));
@@ -142,7 +135,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
action->setEnabled(false); action->setEnabled(false);
AnalyzerManager::addAction(action); AnalyzerManager::addAction(action);
action = new ValgrindAction(this); action = new AnalyzerAction(this);
action->setId("MemcheckWithGdb.Local"); action->setId("MemcheckWithGdb.Local");
action->setTool(m_memcheckWithGdbTool); action->setTool(m_memcheckWithGdbTool);
action->setText(tr("Valgrind Memory Analyzer with GDB")); action->setText(tr("Valgrind Memory Analyzer with GDB"));
@@ -152,7 +145,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
action->setEnabled(false); action->setEnabled(false);
AnalyzerManager::addAction(action); AnalyzerManager::addAction(action);
action = new ValgrindAction(this); action = new AnalyzerAction(this);
action->setId("Callgrind.Local"); action->setId("Callgrind.Local");
action->setTool(m_callgrindTool); action->setTool(m_callgrindTool);
action->setText(tr("Valgrind Function Profiler")); action->setText(tr("Valgrind Function Profiler"));
@@ -163,7 +156,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
AnalyzerManager::addAction(action); AnalyzerManager::addAction(action);
} }
action = new ValgrindAction(this); action = new AnalyzerAction(this);
action->setId("Memcheck.Remote"); action->setId("Memcheck.Remote");
action->setTool(m_memcheckTool); action->setTool(m_memcheckTool);
action->setText(tr("Valgrind Memory Analyzer (External Remote Application)")); action->setText(tr("Valgrind Memory Analyzer (External Remote Application)"));
@@ -172,7 +165,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
action->setStartMode(StartRemote); action->setStartMode(StartRemote);
AnalyzerManager::addAction(action); AnalyzerManager::addAction(action);
action = new ValgrindAction(this); action = new AnalyzerAction(this);
action->setId("Callgrind.Remote"); action->setId("Callgrind.Remote");
action->setTool(m_callgrindTool); action->setTool(m_callgrindTool);
action->setText(tr("Valgrind Function Profiler (External Remote Application)")); action->setText(tr("Valgrind Function Profiler (External Remote Application)"));