analyzer: finish split of tools into "tools-with-modes"

Change-Id: I82b61c07172a33b861a7d6db903ac2516019498b
Reviewed-on: http://codereview.qt.nokia.com/1054
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-07-01 14:19:12 +02:00
committed by hjk
parent d6bf0c3732
commit 2086d94866
18 changed files with 176 additions and 152 deletions

View File

@@ -501,9 +501,9 @@ CallgrindTool::CallgrindTool(QObject *parent)
: Analyzer::IAnalyzerTool(parent)
{
d = new CallgrindToolPrivate(this);
Core::ICore *core = Core::ICore::instance();
setObjectName(QLatin1String("CallgrindTool"));
// EditorManager
Core::ICore *core = Core::ICore::instance();
QObject *editorManager = core->editorManager();
connect(editorManager, SIGNAL(editorOpened(Core::IEditor*)),
d, SLOT(editorOpened(Core::IEditor*)));
@@ -530,7 +530,7 @@ QString CallgrindTool::description() const
"record function calls when a program runs.");
}
IAnalyzerTool::ToolMode CallgrindTool::mode() const
IAnalyzerTool::ToolMode CallgrindTool::toolMode() const
{
return ReleaseMode;
}

View File

@@ -51,7 +51,7 @@ public:
QByteArray id() const;
QString displayName() const;
QString description() const;
ToolMode mode() const;
ToolMode toolMode() const;
void extensionsInitialized();
void initializeDockWidgets();

View File

@@ -229,11 +229,6 @@ void MemcheckTool::settingsDestroyed(QObject *settings)
m_settings = AnalyzerGlobalSettings::instance();
}
void MemcheckTool::extensionsInitialized()
{
//ensureWidgets(); // FIXME: Try to do that later.
}
void MemcheckTool::maybeActiveRunConfigurationChanged()
{
ensureWidgets();
@@ -308,7 +303,7 @@ QString MemcheckTool::description() const
"memory leaks");
}
IAnalyzerTool::ToolMode MemcheckTool::mode() const
IAnalyzerTool::ToolMode MemcheckTool::toolMode() const
{
return DebugMode;
}

View File

@@ -110,10 +110,10 @@ private slots:
void suppressionActionTriggered();
private:
ToolMode mode() const;
ToolMode toolMode() const;
void ensureWidgets();
void initializeDockWidgets();
void extensionsInitialized();
void extensionsInitialized() {}
QWidget *createControlWidget();
Analyzer::IAnalyzerEngine *createEngine(const Analyzer::AnalyzerStartParameters &sp,
@@ -122,7 +122,6 @@ private:
void clearErrorView();
private:
bool m_local;
Analyzer::AnalyzerSettings *m_settings;
QMenu *m_filterMenu;

View File

@@ -130,7 +130,7 @@ QString ValgrindEngine::executable() const
void ValgrindEngine::handleProgressCanceled()
{
AnalyzerManager::stopTool(tool());
AnalyzerManager::stopTool(tool(), mode());
}
void ValgrindEngine::handleProgressFinished()