forked from qt-creator/qt-creator
Valgrind: Keep tool names in the *ToolRunners only
Slightly less convoluted. Change-Id: I07410b49db05ea862fb82f3bffc25a5d7fb5a104 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace Debugger;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Valgrind::Callgrind;
|
||||
|
||||
@@ -47,7 +46,6 @@ CallgrindToolRunner::CallgrindToolRunner(RunControl *runControl)
|
||||
: ValgrindToolRunner(runControl)
|
||||
{
|
||||
setDisplayName("CallgrindToolRunner");
|
||||
m_runner.setToolName("callgrind");
|
||||
|
||||
connect(&m_runner, &ValgrindRunner::finished,
|
||||
this, &CallgrindToolRunner::slotFinished);
|
||||
@@ -73,7 +71,7 @@ CallgrindToolRunner::CallgrindToolRunner(RunControl *runControl)
|
||||
|
||||
QStringList CallgrindToolRunner::toolArguments() const
|
||||
{
|
||||
QStringList arguments;
|
||||
QStringList arguments = {"--tool=callgrind"};
|
||||
|
||||
QTC_ASSERT(m_settings, return arguments);
|
||||
|
||||
|
@@ -120,8 +120,7 @@ void MemcheckToolRunner::stop()
|
||||
|
||||
QStringList MemcheckToolRunner::toolArguments() const
|
||||
{
|
||||
QStringList arguments;
|
||||
arguments << "--gen-suppressions=all";
|
||||
QStringList arguments = {"--tool=memcheck", "--gen-suppressions=all"};
|
||||
|
||||
QTC_ASSERT(m_settings, return arguments);
|
||||
|
||||
|
@@ -69,7 +69,6 @@ public:
|
||||
QHostAddress localServerAddress;
|
||||
QProcess::ProcessChannelMode channelMode = QProcess::SeparateChannels;
|
||||
bool m_finished = false;
|
||||
QString m_tool;
|
||||
|
||||
QTcpServer xmlServer;
|
||||
XmlProtocol::ThreadedParser parser;
|
||||
@@ -102,7 +101,6 @@ void ValgrindRunner::Private::run()
|
||||
this, &ValgrindRunner::Private::remoteProcessStarted);
|
||||
|
||||
QStringList fullArgs = m_valgrindArguments;
|
||||
fullArgs << QString("--tool=%1").arg(m_tool);
|
||||
if (HostOsInfo::isMacHost())
|
||||
// May be slower to start but without it we get no filenames for symbols.
|
||||
fullArgs << "--dsymutil=yes";
|
||||
@@ -212,7 +210,6 @@ void ValgrindRunner::Private::closed(bool success)
|
||||
ValgrindRunner::ValgrindRunner(QObject *parent)
|
||||
: QObject(parent), d(new Private(this))
|
||||
{
|
||||
setToolName("memcheck");
|
||||
}
|
||||
|
||||
ValgrindRunner::~ValgrindRunner()
|
||||
@@ -269,11 +266,6 @@ void ValgrindRunner::waitForFinished() const
|
||||
loop.exec();
|
||||
}
|
||||
|
||||
void ValgrindRunner::setToolName(const QString &toolName)
|
||||
{
|
||||
d->m_tool = toolName;
|
||||
}
|
||||
|
||||
static void handleSocketParameter(const QString &prefix, const QTcpServer &tcpServer,
|
||||
bool *useXml, QStringList *arguments)
|
||||
{
|
||||
|
@@ -26,8 +26,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <debugger/analyzer/analyzerconstants.h>
|
||||
|
||||
#include <projectexplorer/runnables.h>
|
||||
|
||||
#include <utils/outputformat.h>
|
||||
@@ -54,7 +52,6 @@ public:
|
||||
void setDevice(const ProjectExplorer::IDevice::ConstPtr &device);
|
||||
|
||||
void waitForFinished() const;
|
||||
void setToolName(const QString &toolName);
|
||||
|
||||
QString errorString() const;
|
||||
|
||||
|
Reference in New Issue
Block a user