Analyzer: no need to pass a start mode when it's implicit in the name.

startRemoteTool and startLocalTool are implcicitely working remotely and localy, they don't need a mode.

Change-Id: I433ca421f68a1026979489c7f9d86b12251ec830
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Nicolas Arnaud-Cormos
2011-12-27 17:28:24 +01:00
committed by hjk
parent 29eff52529
commit 1571b7f977
3 changed files with 9 additions and 9 deletions

View File

@@ -183,7 +183,7 @@ public:
QAction *actionFromToolAndMode(IAnalyzerTool *tool, StartMode mode); QAction *actionFromToolAndMode(IAnalyzerTool *tool, StartMode mode);
// Convenience. // Convenience.
void startLocalTool(IAnalyzerTool *tool, StartMode mode); void startLocalTool(IAnalyzerTool *tool);
bool isActionRunnable(QAction *action) const; bool isActionRunnable(QAction *action) const;
public slots: public slots:
@@ -490,7 +490,7 @@ bool AnalyzerManagerPrivate::showPromptDialog(const QString &title, const QStrin
return messageBox.clickedStandardButton() == QDialogButtonBox::Yes; return messageBox.clickedStandardButton() == QDialogButtonBox::Yes;
} }
void AnalyzerManagerPrivate::startLocalTool(IAnalyzerTool *tool, StartMode) void AnalyzerManagerPrivate::startLocalTool(IAnalyzerTool *tool)
{ {
int index = m_tools.indexOf(tool); int index = m_tools.indexOf(tool);
QTC_ASSERT(index >= 0, return); QTC_ASSERT(index >= 0, return);
@@ -883,9 +883,9 @@ void AnalyzerManager::stopTool()
stopAction()->trigger(); stopAction()->trigger();
} }
void AnalyzerManager::startLocalTool(IAnalyzerTool *tool, StartMode mode) void AnalyzerManager::startLocalTool(IAnalyzerTool *tool)
{ {
m_instance->d->startLocalTool(tool, mode); m_instance->d->startLocalTool(tool);
} }
QAction *AnalyzerManager::stopAction() QAction *AnalyzerManager::stopAction()

View File

@@ -87,7 +87,7 @@ public:
static void stopTool(); static void stopTool();
// Convenience functions. // Convenience functions.
static void startLocalTool(IAnalyzerTool *tool, StartMode mode); static void startLocalTool(IAnalyzerTool *tool);
static QString msgToolStarted(const QString &name); static QString msgToolStarted(const QString &name);
static QString msgToolFinished(const QString &name, int issuesFound); static QString msgToolFinished(const QString &name, int issuesFound);

View File

@@ -165,7 +165,7 @@ RunConfigWidget *ValgrindRunControlFactory::createConfigurationWidget(RunConfigu
// //
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
static void startRemoteTool(IAnalyzerTool *tool, StartMode mode) static void startRemoteTool(IAnalyzerTool *tool)
{ {
Q_UNUSED(tool); Q_UNUSED(tool);
StartRemoteDialog dlg; StartRemoteDialog dlg;
@@ -174,7 +174,7 @@ static void startRemoteTool(IAnalyzerTool *tool, StartMode mode)
AnalyzerStartParameters sp; AnalyzerStartParameters sp;
sp.toolId = tool->id(); sp.toolId = tool->id();
sp.startMode = mode; sp.startMode = StartRemote;
sp.connParams = dlg.sshParams(); sp.connParams = dlg.sshParams();
sp.debuggee = dlg.executable(); sp.debuggee = dlg.executable();
sp.debuggeeArgs = dlg.arguments(); sp.debuggeeArgs = dlg.arguments();
@@ -191,9 +191,9 @@ static void startRemoteTool(IAnalyzerTool *tool, StartMode mode)
void ValgrindPlugin::startValgrindTool(IAnalyzerTool *tool, StartMode mode) void ValgrindPlugin::startValgrindTool(IAnalyzerTool *tool, StartMode mode)
{ {
if (mode == StartLocal) if (mode == StartLocal)
AnalyzerManager::startLocalTool(tool, mode); AnalyzerManager::startLocalTool(tool);
if (mode == StartRemote) if (mode == StartRemote)
startRemoteTool(tool, mode); startRemoteTool(tool);
} }
static AbstractAnalyzerSubConfig *globalValgrindFactory() static AbstractAnalyzerSubConfig *globalValgrindFactory()