summaryrefslogtreecommitdiff
path: root/src/plugins/valgrind/valgrindplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/valgrind/valgrindplugin.cpp')
-rw-r--r--src/plugins/valgrind/valgrindplugin.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/plugins/valgrind/valgrindplugin.cpp b/src/plugins/valgrind/valgrindplugin.cpp
index b5bf594965..8a186137f2 100644
--- a/src/plugins/valgrind/valgrindplugin.cpp
+++ b/src/plugins/valgrind/valgrindplugin.cpp
@@ -116,6 +116,7 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
addAutoReleasedObject(new ValgrindOptionsPage());
m_memcheckTool = new MemcheckTool(this);
+ m_memcheckWithGdbTool = new MemcheckWithGdbTool(this);
m_callgrindTool = new CallgrindTool(this);
ValgrindAction *action = 0;
@@ -126,6 +127,10 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
QString memcheckToolTip = tr("Valgrind Analyze Memory uses the "
"\"memcheck\" tool to find memory leaks.");
+ QString memcheckWithGdbToolTip = tr(
+ "Valgrind Analyze Memory with GDB uses the \"memcheck\" tool to find memory leaks.\n"
+ "When a problem is detected, the application is interrupted and can be debugged");
+
if (!Utils::HostOsInfo::isWindowsHost()) {
action = new ValgrindAction(this);
action->setId("Memcheck.Local");
@@ -138,6 +143,16 @@ bool ValgrindPlugin::initialize(const QStringList &, QString *)
AnalyzerManager::addAction(action);
action = new ValgrindAction(this);
+ action->setId("MemcheckWithGdb.Local");
+ action->setTool(m_memcheckWithGdbTool);
+ action->setText(tr("Valgrind Memory Analyzer with GDB"));
+ action->setToolTip(memcheckWithGdbToolTip);
+ action->setMenuGroup(Constants::G_ANALYZER_TOOLS);
+ action->setStartMode(StartLocal);
+ action->setEnabled(false);
+ AnalyzerManager::addAction(action);
+
+ action = new ValgrindAction(this);
action->setId("Callgrind.Local");
action->setTool(m_callgrindTool);
action->setText(tr("Valgrind Function Profiler"));
@@ -188,7 +203,8 @@ void ValgrindPlugin::extensionsInitialized()
QAction *action = new QAction(tr("Profile Costs of This Function and Its Callees"), this);
action->setIcon(QIcon(QLatin1String(Analyzer::Constants::ANALYZER_CONTROL_START_ICON)));
- connect(action, SIGNAL(triggered()), m_callgrindTool, SLOT(handleShowCostsOfFunction()));
+ connect(action, &QAction::triggered, m_callgrindTool,
+ &CallgrindTool::handleShowCostsOfFunction);
Command *cmd = ActionManager::registerAction(action, "Analyzer.Callgrind.ShowCostsOfFunction",
analyzerContext);
editorContextMenu->addAction(cmd);