forked from qt-creator/qt-creator
Valgrind: Get rid of setProgressTitle() setter
Add an arg to the ValgrindToolRunner's c'tor instead. Change-Id: Iead5d184d1eb0c2326c6f710befd16b6d0408cd8 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -97,10 +97,9 @@ class CallgrindToolRunner : public ValgrindToolRunner
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit CallgrindToolRunner(ProjectExplorer::RunControl *runControl)
|
explicit CallgrindToolRunner(ProjectExplorer::RunControl *runControl)
|
||||||
: ValgrindToolRunner(runControl)
|
: ValgrindToolRunner(runControl, Tr::tr("Profiling"))
|
||||||
{
|
{
|
||||||
setId("CallgrindToolRunner");
|
setId("CallgrindToolRunner");
|
||||||
setProgressTitle(Tr::tr("Profiling"));
|
|
||||||
|
|
||||||
connect(&m_runner, &ValgrindProcess::valgrindStarted, this, [](qint64 pid) { setupPid(pid); });
|
connect(&m_runner, &ValgrindProcess::valgrindStarted, this, [](qint64 pid) { setupPid(pid); });
|
||||||
connect(&m_runner, &ValgrindProcess::done, this, [] { startParser(); });
|
connect(&m_runner, &ValgrindProcess::done, this, [] { startParser(); });
|
||||||
|
@@ -1087,11 +1087,10 @@ void MemcheckTool::setBusyCursor(bool busy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MemcheckToolRunner::MemcheckToolRunner(RunControl *runControl)
|
MemcheckToolRunner::MemcheckToolRunner(RunControl *runControl)
|
||||||
: ValgrindToolRunner(runControl)
|
: ValgrindToolRunner(runControl, Tr::tr("Analyzing Memory"))
|
||||||
, m_withGdb(runControl->runMode() == MEMCHECK_WITH_GDB_RUN_MODE)
|
, m_withGdb(runControl->runMode() == MEMCHECK_WITH_GDB_RUN_MODE)
|
||||||
{
|
{
|
||||||
setId("MemcheckToolRunner");
|
setId("MemcheckToolRunner");
|
||||||
setProgressTitle(Tr::tr("Analyzing Memory"));
|
|
||||||
|
|
||||||
connect(&m_runner, &ValgrindProcess::error, dd, &MemcheckTool::parserError);
|
connect(&m_runner, &ValgrindProcess::error, dd, &MemcheckTool::parserError);
|
||||||
|
|
||||||
|
@@ -22,8 +22,9 @@ using namespace ProjectExplorer;
|
|||||||
|
|
||||||
namespace Valgrind::Internal {
|
namespace Valgrind::Internal {
|
||||||
|
|
||||||
ValgrindToolRunner::ValgrindToolRunner(RunControl *runControl)
|
ValgrindToolRunner::ValgrindToolRunner(RunControl *runControl, const QString &progressTitle)
|
||||||
: RunWorker(runControl)
|
: RunWorker(runControl)
|
||||||
|
, m_progressTitle(progressTitle)
|
||||||
{
|
{
|
||||||
runControl->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR);
|
runControl->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR);
|
||||||
|
|
||||||
|
@@ -15,13 +15,13 @@ namespace Valgrind::Internal {
|
|||||||
class ValgrindToolRunner : public ProjectExplorer::RunWorker
|
class ValgrindToolRunner : public ProjectExplorer::RunWorker
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ValgrindToolRunner(ProjectExplorer::RunControl *runControl);
|
explicit ValgrindToolRunner(ProjectExplorer::RunControl *runControl,
|
||||||
|
const QString &progressTitle);
|
||||||
|
|
||||||
void start() override;
|
void start() override;
|
||||||
void stop() override;
|
void stop() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setProgressTitle(const QString &title) { m_progressTitle = title; }
|
|
||||||
virtual void addToolArguments(Utils::CommandLine &cmd) const = 0;
|
virtual void addToolArguments(Utils::CommandLine &cmd) const = 0;
|
||||||
|
|
||||||
ValgrindSettings m_settings{false};
|
ValgrindSettings m_settings{false};
|
||||||
|
Reference in New Issue
Block a user