forked from qt-creator/qt-creator
IAnalyzerTool: actionId() is re-implemented in derived classes
Change-Id: I5a0a485e239eeb33a9d8ad8cfd0f9cc40e1ff6d2 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -60,20 +60,6 @@ IAnalyzerTool::IAnalyzerTool(QObject *parent)
|
|||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Id IAnalyzerTool::actionId(StartMode mode) const
|
|
||||||
{
|
|
||||||
Id id = Id("Analyzer").withSuffix(this->id().toString());
|
|
||||||
switch (mode) {
|
|
||||||
case StartLocal:
|
|
||||||
return id.withSuffix(".Local");
|
|
||||||
case StartRemote:
|
|
||||||
return id.withSuffix(".Remote");
|
|
||||||
case StartQmlRemote:
|
|
||||||
return id.withSuffix(".Qml");
|
|
||||||
}
|
|
||||||
return Id();
|
|
||||||
}
|
|
||||||
|
|
||||||
Id IAnalyzerTool::menuGroup(StartMode mode) const
|
Id IAnalyzerTool::menuGroup(StartMode mode) const
|
||||||
{
|
{
|
||||||
if (mode == StartRemote)
|
if (mode == StartRemote)
|
||||||
|
@@ -79,7 +79,7 @@ public:
|
|||||||
/// Returns a user readable description name for this tool.
|
/// Returns a user readable description name for this tool.
|
||||||
virtual QString description() const = 0;
|
virtual QString description() const = 0;
|
||||||
/// Returns an id for the start action.
|
/// Returns an id for the start action.
|
||||||
virtual Core::Id actionId(StartMode mode) const;
|
virtual Core::Id actionId(StartMode mode) const = 0;
|
||||||
/// Returns the menu group the start action should go to.
|
/// Returns the menu group the start action should go to.
|
||||||
virtual Core::Id menuGroup(StartMode mode) const;
|
virtual Core::Id menuGroup(StartMode mode) const;
|
||||||
/// Returns a short user readable action name for this tool.
|
/// Returns a short user readable action name for this tool.
|
||||||
|
@@ -213,6 +213,11 @@ QString QmlProfilerTool::description() const
|
|||||||
"applications using QML.");
|
"applications using QML.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Core::Id QmlProfilerTool::actionId(StartMode mode) const
|
||||||
|
{
|
||||||
|
return mode == StartLocal ? "Analyzer.QmlProfiler.Local" : "Analyzer.QmlProfiler.Remote";
|
||||||
|
}
|
||||||
|
|
||||||
IAnalyzerTool::ToolMode QmlProfilerTool::toolMode() const
|
IAnalyzerTool::ToolMode QmlProfilerTool::toolMode() const
|
||||||
{
|
{
|
||||||
return AnyMode;
|
return AnyMode;
|
||||||
|
@@ -52,6 +52,7 @@ public:
|
|||||||
ProjectExplorer::RunMode runMode() const;
|
ProjectExplorer::RunMode runMode() const;
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
QString description() const;
|
QString description() const;
|
||||||
|
Core::Id actionId(Analyzer::StartMode mode) const;
|
||||||
ToolMode toolMode() const;
|
ToolMode toolMode() const;
|
||||||
|
|
||||||
void extensionsInitialized() {}
|
void extensionsInitialized() {}
|
||||||
|
@@ -535,6 +535,11 @@ QString CallgrindTool::description() const
|
|||||||
"record function calls when a program runs.");
|
"record function calls when a program runs.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Core::Id CallgrindTool::actionId(StartMode mode) const
|
||||||
|
{
|
||||||
|
return mode == StartLocal ? "Analyzer.Callgrind.Local" : "Analyzer.Callgrind.Remote";
|
||||||
|
}
|
||||||
|
|
||||||
IAnalyzerTool::ToolMode CallgrindTool::toolMode() const
|
IAnalyzerTool::ToolMode CallgrindTool::toolMode() const
|
||||||
{
|
{
|
||||||
return ReleaseMode;
|
return ReleaseMode;
|
||||||
|
@@ -49,6 +49,7 @@ public:
|
|||||||
ProjectExplorer::RunMode runMode() const;
|
ProjectExplorer::RunMode runMode() const;
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
QString description() const;
|
QString description() const;
|
||||||
|
Core::Id actionId(Analyzer::StartMode mode) const;
|
||||||
ToolMode toolMode() const;
|
ToolMode toolMode() const;
|
||||||
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
|
@@ -297,6 +297,11 @@ QString MemcheckTool::description() const
|
|||||||
"memory leaks");
|
"memory leaks");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Core::Id MemcheckTool::actionId(StartMode mode) const
|
||||||
|
{
|
||||||
|
return mode == StartLocal ? "Analyzer.Memcheck.Local" : "Analyzer.Memcheck.Remote";
|
||||||
|
}
|
||||||
|
|
||||||
AbstractAnalyzerSubConfig *MemcheckTool::createGlobalSettings()
|
AbstractAnalyzerSubConfig *MemcheckTool::createGlobalSettings()
|
||||||
{
|
{
|
||||||
return new ValgrindGlobalSettings();
|
return new ValgrindGlobalSettings();
|
||||||
|
@@ -88,6 +88,7 @@ public:
|
|||||||
ProjectExplorer::RunMode runMode() const;
|
ProjectExplorer::RunMode runMode() const;
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
QString description() const;
|
QString description() const;
|
||||||
|
Core::Id actionId(Analyzer::StartMode mode) const;
|
||||||
|
|
||||||
// Create the valgrind settings (for all valgrind tools)
|
// Create the valgrind settings (for all valgrind tools)
|
||||||
Analyzer::AbstractAnalyzerSubConfig *createGlobalSettings();
|
Analyzer::AbstractAnalyzerSubConfig *createGlobalSettings();
|
||||||
|
Reference in New Issue
Block a user