analyzer: move responsibility for run modes to individual tools

Change-Id: Iaf2fa9d4c087470649336a453c6a9a7db12d220f
Reviewed-on: http://codereview.qt.nokia.com/1051
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-06-30 18:55:48 +02:00
committed by hjk
parent daefb0c83a
commit f0a0e5b1ea
14 changed files with 193 additions and 187 deletions

View File

@@ -184,10 +184,9 @@ static void initKindFilterAction(QAction *action, const QList<int> &kinds)
action->setData(data);
}
MemcheckTool::MemcheckTool(bool local, QObject *parent)
MemcheckTool::MemcheckTool(QObject *parent)
: Analyzer::IAnalyzerTool(parent)
{
m_local = local;
m_settings = 0;
m_errorModel = 0;
m_errorProxyModel = 0;
@@ -295,13 +294,7 @@ void MemcheckTool::maybeActiveRunConfigurationChanged()
QByteArray MemcheckTool::id() const
{
return m_local ? "MemcheckLocal" : "MemcheckGlobal";
}
QByteArray MemcheckTool::menuGroup() const
{
return m_local ? Analyzer::Constants::G_ANALYZER_TOOLS
: Analyzer::Constants::G_ANALYZER_REMOTE_TOOLS;
return "MemcheckLocal";
}
QString MemcheckTool::displayName() const
@@ -320,14 +313,6 @@ IAnalyzerTool::ToolMode MemcheckTool::mode() const
return DebugMode;
}
void MemcheckTool::startTool()
{
if (m_local)
AnalyzerManager::startLocalTool(this);
else
AnalyzerManager::startRemoteTool(this);
}
class FrameFinder : public ErrorListModel::RelevantFrameFinder
{
public: