From 0eba47065f2d04bb6affceae37f42995bd07e83e Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 18 Feb 2015 09:34:50 +0100 Subject: Analyzer: Merge ValgrindAction into AnalyzerAction It was an empty shell. Change-Id: I8bd915270c2b4b03b1ba638521ec35609a05b512 Reviewed-by: Christian Stenger --- src/plugins/analyzerbase/analyzerruncontrol.cpp | 3 ++- src/plugins/valgrind/valgrindplugin.cpp | 19 ++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/plugins/analyzerbase/analyzerruncontrol.cpp b/src/plugins/analyzerbase/analyzerruncontrol.cpp index 7d05b1efdc..6748220743 100644 --- a/src/plugins/analyzerbase/analyzerruncontrol.cpp +++ b/src/plugins/analyzerbase/analyzerruncontrol.cpp @@ -58,7 +58,8 @@ AnalyzerRunControl::AnalyzerRunControl(const AnalyzerStartParameters &sp, connect(this, &AnalyzerRunControl::finished, this, &AnalyzerRunControl::runControlFinished); - connect(AnalyzerManager::stopAction(), SIGNAL(triggered()), SLOT(stopIt())); + connect(AnalyzerManager::stopAction(), &QAction::triggered, + this, &AnalyzerRunControl::stopIt); } void AnalyzerRunControl::stopIt() diff --git a/src/plugins/valgrind/valgrindplugin.cpp b/src/plugins/valgrind/valgrindplugin.cpp index 8a186137f2..7d15e544b1 100644 --- a/src/plugins/valgrind/valgrindplugin.cpp +++ b/src/plugins/valgrind/valgrindplugin.cpp @@ -95,13 +95,6 @@ private: QPointer m_widget; }; -class ValgrindAction : public AnalyzerAction -{ -public: - explicit ValgrindAction(QObject *parent = 0) : AnalyzerAction(parent) { } -}; - - ValgrindPlugin::~ValgrindPlugin() { delete theGlobalSettings; @@ -119,7 +112,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *) m_memcheckWithGdbTool = new MemcheckWithGdbTool(this); m_callgrindTool = new CallgrindTool(this); - ValgrindAction *action = 0; + AnalyzerAction *action = 0; QString callgrindToolTip = tr("Valgrind Function Profile uses the " "\"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"); if (!Utils::HostOsInfo::isWindowsHost()) { - action = new ValgrindAction(this); + action = new AnalyzerAction(this); action->setId("Memcheck.Local"); action->setTool(m_memcheckTool); action->setText(tr("Valgrind Memory Analyzer")); @@ -142,7 +135,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *) action->setEnabled(false); AnalyzerManager::addAction(action); - action = new ValgrindAction(this); + action = new AnalyzerAction(this); action->setId("MemcheckWithGdb.Local"); action->setTool(m_memcheckWithGdbTool); action->setText(tr("Valgrind Memory Analyzer with GDB")); @@ -152,7 +145,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *) action->setEnabled(false); AnalyzerManager::addAction(action); - action = new ValgrindAction(this); + action = new AnalyzerAction(this); action->setId("Callgrind.Local"); action->setTool(m_callgrindTool); action->setText(tr("Valgrind Function Profiler")); @@ -163,7 +156,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *) AnalyzerManager::addAction(action); } - action = new ValgrindAction(this); + action = new AnalyzerAction(this); action->setId("Memcheck.Remote"); action->setTool(m_memcheckTool); action->setText(tr("Valgrind Memory Analyzer (External Remote Application)")); @@ -172,7 +165,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *) action->setStartMode(StartRemote); AnalyzerManager::addAction(action); - action = new ValgrindAction(this); + action = new AnalyzerAction(this); action->setId("Callgrind.Remote"); action->setTool(m_callgrindTool); action->setText(tr("Valgrind Function Profiler (External Remote Application)")); -- cgit v1.2.1