Commit 682cd36b authored by hjk's avatar hjk

Valgrind: Remove starting() signal

It's only used internally as one-time communication between
worker and the *Tool singleton that handles toolbar button
states.

We basically start immediately after creation of the worker, so
any pre-start tool bar specific operations can be done at
RunWorker creation time.

Medium term, the runworker should proably steer "their" buttons
more directly.

Change-Id: Id6df703746ece5eebc23507739cd2a92ec55d11d
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent 228e4a75
......@@ -135,7 +135,6 @@ signals:
void pauseToggled(bool checked);
public:
void slotClear();
void slotRequestDump();
void loadExternalLogFile();
......@@ -158,7 +157,6 @@ public:
void handleFilterProjectCosts();
void handleShowCostsOfFunction();
void slotGoToOverview();
void stackBrowserChanged();
/// If \param busy is true, all widgets get a busy cursor when hovered
......@@ -172,7 +170,6 @@ public:
void takeParserDataFromRunControl(CallgrindToolRunner *rc);
void takeParserData(ParseData *data);
void engineStarting();
void engineFinished();
void editorOpened(IEditor *);
......@@ -526,16 +523,6 @@ CallgrindTool::~CallgrindTool()
qDeleteAll(m_textMarks);
}
void CallgrindTool::slotGoToOverview()
{
selectFunction(0);
}
void CallgrindTool::slotClear()
{
doClear(true);
}
void CallgrindTool::doClear(bool clearParseData)
{
if (clearParseData) // Crashed when done from destructor.
......@@ -760,7 +747,6 @@ ValgrindToolRunner *CallgrindTool::createRunTool(RunControl *runControl)
auto toolRunner = new CallgrindToolRunner(runControl);
connect(toolRunner, &CallgrindToolRunner::parserDataReady, this, &CallgrindTool::takeParserDataFromRunControl);
connect(toolRunner, &CallgrindToolRunner::starting, this, &CallgrindTool::engineStarting);
connect(runControl, &RunControl::finished, this, &CallgrindTool::engineFinished);
connect(this, &CallgrindTool::dumpRequested, toolRunner, &CallgrindToolRunner::dump);
......@@ -790,6 +776,13 @@ ValgrindToolRunner *CallgrindTool::createRunTool(RunControl *runControl)
m_toolBusy = true;
updateRunActions();
// enable/disable actions
m_resetAction->setEnabled(true);
m_dumpAction->setEnabled(true);
m_loadExternalLogFile->setEnabled(false);
clearTextMarks();
doClear(true);
return toolRunner;
}
......@@ -813,16 +806,6 @@ void CallgrindTool::clearTextMarks()
m_textMarks.clear();
}
void CallgrindTool::engineStarting()
{
// enable/disable actions
m_resetAction->setEnabled(true);
m_dumpAction->setEnabled(true);
m_loadExternalLogFile->setEnabled(false);
clearTextMarks();
slotClear();
}
void CallgrindTool::engineFinished()
{
m_toolBusy = false;
......@@ -943,7 +926,7 @@ void CallgrindTool::takeParserData(ParseData *data)
// clear first
clearTextMarks();
slotClear();
doClear(true);
setParseData(data);
createTextMarks();
......
......@@ -250,7 +250,6 @@ private:
void settingsDestroyed(QObject *settings);
void maybeActiveRunConfigurationChanged();
void engineStarting(const MemcheckToolRunner *engine);
void engineFinished();
void loadingExternalXmlLogFileFinished();
......@@ -565,8 +564,6 @@ RunWorker *MemcheckTool::createRunWorker(RunControl *runControl)
auto runTool = new MemcheckToolRunner(runControl, runControl->runMode() == MEMCHECK_WITH_GDB_RUN_MODE);
connect(runTool, &MemcheckToolRunner::starting,
this, [this, runTool] { engineStarting(runTool); });
connect(runTool, &MemcheckToolRunner::parserError, this, &MemcheckTool::parserError);
connect(runTool, &MemcheckToolRunner::internalParserError, this, &MemcheckTool::internalParserError);
connect(runTool, &MemcheckToolRunner::stopped, this, &MemcheckTool::engineFinished);
......@@ -576,11 +573,6 @@ RunWorker *MemcheckTool::createRunWorker(RunControl *runControl)
m_toolBusy = true;
updateRunActions();
return runTool;
}
void MemcheckTool::engineStarting(const MemcheckToolRunner *runTool)
{
setBusyCursor(true);
clearErrorView();
m_loadExternalLogFile->setDisabled(true);
......@@ -601,6 +593,8 @@ void MemcheckTool::engineStarting(const MemcheckToolRunner *runTool)
});
m_suppressionActions.append(action);
}
return runTool;
}
void MemcheckTool::loadExternalXmlLogFile()
......
......@@ -66,7 +66,6 @@ ValgrindToolRunner::ValgrindToolRunner(RunControl *runControl)
void ValgrindToolRunner::start()
{
emit starting();
FutureProgress *fp = ProgressManager::addTimedTask(m_progress, progressTitle(), "valgrind", 100);
fp->setKeepOnFinish(FutureProgress::HideOnFinish);
connect(fp, &FutureProgress::canceled,
......
......@@ -49,9 +49,6 @@ public:
QString executable() const;
signals:
void starting();
protected:
virtual QString progressTitle() const = 0;
virtual QStringList toolArguments() const = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment