summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-06-28 19:14:08 +0200
committerhjk <qthjk@ovi.com>2011-06-28 20:08:31 +0200
commit8d567174a90c0ba090989c751b2c0016a482df50 (patch)
tree8bd2b6cc5b86dc67a17ecaf316b20428536e4788 /src
parent5fcdc85b917414f84efb41bc24fac9db0119ea3f (diff)
downloadqt-creator-8d567174a90c0ba090989c751b2c0016a482df50.tar.gz
analyzer: more verbosity in the tool description
Change-Id: Ie259c78710c9e926f75595a7c22195efb7036532 Reviewed-on: http://codereview.qt.nokia.com/856 Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/analyzerbase/ianalyzertool.h31
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp20
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.h3
-rw-r--r--src/plugins/valgrind/callgrindtool.cpp8
-rw-r--r--src/plugins/valgrind/callgrindtool.h1
-rw-r--r--src/plugins/valgrind/memchecktool.cpp14
-rw-r--r--src/plugins/valgrind/memchecktool.h1
7 files changed, 53 insertions, 25 deletions
diff --git a/src/plugins/analyzerbase/ianalyzertool.h b/src/plugins/analyzerbase/ianalyzertool.h
index 1c9266feca..f9c45662de 100644
--- a/src/plugins/analyzerbase/ianalyzertool.h
+++ b/src/plugins/analyzerbase/ianalyzertool.h
@@ -62,19 +62,23 @@ class IAnalyzerEngine;
class ANALYZER_EXPORT IAnalyzerTool : public QObject
{
Q_OBJECT
+
public:
explicit IAnalyzerTool(QObject *parent = 0);
- /// @return unique ID for this tool
+ /// Returns a unique ID for this tool.
virtual QString id() const = 0;
- /// @return user readable display name for this tool
+ /// Returns a short user readable display name for this tool.
virtual QString displayName() const = 0;
+ /// Returns a user readable description name for this tool.
+ virtual QString description() const = 0;
/**
* The mode in which this tool should preferably be run
*
- * memcheck, for example, requires debug symbols, hence DebugMode is preferred.
- * otoh callgrind should look at optimized code, hence ReleaseMode.
+ * The memcheckt tool, for example, requires debug symbols, hence DebugMode
+ * is preferred. On the other hand, callgrind should look at optimized code,
+ * hence ReleaseMode.
*/
enum ToolMode {
DebugMode,
@@ -86,28 +90,29 @@ public:
static QString modeString(ToolMode mode);
/**
- * The implementation should setup widgets for the output pane here and optionally add
- * dock widgets in the analyzation mode if wanted.
+ * The implementation should setup widgets for the output pane here and
+ * optionally add dock widgets in the analyzation mode if wanted.
*/
virtual void initialize() = 0;
- /// gets called after all analyzation tools where initialized.
+ /// This gets called after all analyzation tools where initialized.
virtual void extensionsInitialized() = 0;
/**
- * Called to add all dock widgets if tool becomes active first time.
+ * This is called to add all dock widgets if tool becomes active first time.
* \sa AnalzyerManager::createDockWidget
*/
virtual void initializeDockWidgets();
- /// subclass to return a control widget which will be shown
- /// in the output pane when this tool is selected
+ /// Returns a control widget which will be shown
+ /// in the output pane when this tool is selected.
virtual QWidget *createControlWidget();
- /// @return a new engine for the given start parameters. Called each time the tool is launched.
+ /// Returns a new engine for the given start parameters.
+ /// Called each time the tool is launched.
virtual IAnalyzerEngine *createEngine(const AnalyzerStartParameters &sp,
- ProjectExplorer::RunConfiguration *runConfiguration = 0) = 0;
+ ProjectExplorer::RunConfiguration *runConfiguration = 0) = 0;
- /// @return true when this tool can be run remotely, e.g. on a meego or maemo device
+ /// Returns true when this tool can be run on a remote machine.
virtual bool canRunRemotely() const = 0;
};
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 3b582f3f39..6556048551 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -150,27 +150,33 @@ QString QmlProfilerTool::displayName() const
return tr("QML Profiler");
}
+QString QmlProfilerTool::description() const
+{
+ return tr("The QML Profiler can be used to find performance bottlenecks in "
+ "applications using QML.");
+}
+
IAnalyzerTool::ToolMode QmlProfilerTool::mode() const
{
return AnyMode;
}
IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp,
- ProjectExplorer::RunConfiguration *runConfiguration)
+ ProjectExplorer::RunConfiguration *runConfiguration)
{
QmlProfilerEngine *engine = new QmlProfilerEngine(sp, runConfiguration);
- // Check minimum Qt Version. We cannot really be sure what the Qt version at runtime is,
- // but guess that the active build configuraiton has been used.
- QtSupport::QtVersionNumber minimumVersion(4,7,4);
+ // Check minimum Qt Version. We cannot really be sure what the Qt version
+ // at runtime is, but guess that the active build configuraiton has been used.
+ QtSupport::QtVersionNumber minimumVersion(4, 7, 4);
if (Qt4ProjectManager::Qt4BuildConfiguration *qt4Config
= qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration*>(
runConfiguration->target()->activeBuildConfiguration())) {
if (qt4Config->qtVersion()->isValid() && qt4Config->qtVersion()->qtVersion() < minimumVersion) {
int result = QMessageBox::warning(QApplication::activeWindow(), tr("QML Profiler"),
- "The QML profiler requires Qt 4.7.4 or newer.\n"
- "The Qt version configured in your active build configuration is too old.\n"
- "Do you want to continue?", QMessageBox::Yes, QMessageBox::No);
+ "The QML profiler requires Qt 4.7.4 or newer.\n"
+ "The Qt version configured in your active build configuration is too old.\n"
+ "Do you want to continue?", QMessageBox::Yes, QMessageBox::No);
if (result == QMessageBox::No)
return 0;
}
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.h b/src/plugins/qmlprofiler/qmlprofilertool.h
index 759bb84290..583070d55a 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.h
+++ b/src/plugins/qmlprofiler/qmlprofilertool.h
@@ -50,6 +50,7 @@ public:
QString id() const;
QString displayName() const;
+ QString description() const;
ToolMode mode() const;
void initialize();
@@ -57,7 +58,7 @@ public:
void initializeDockWidgets();
Analyzer::IAnalyzerEngine *createEngine(const Analyzer::AnalyzerStartParameters &sp,
- ProjectExplorer::RunConfiguration *runConfiguration = 0);
+ ProjectExplorer::RunConfiguration *runConfiguration = 0);
QWidget *createControlWidget();
diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp
index 6e52521124..da9a37da70 100644
--- a/src/plugins/valgrind/callgrindtool.cpp
+++ b/src/plugins/valgrind/callgrindtool.cpp
@@ -521,7 +521,13 @@ QString CallgrindTool::id() const
QString CallgrindTool::displayName() const
{
- return tr("Profile");
+ return tr("Valgrind Function Profile");
+}
+
+QString CallgrindTool::description() const
+{
+ return tr("Valgrind Profile uses the \"callgrind\" tool to "
+ "record function calls when a program runs.");
}
IAnalyzerTool::ToolMode CallgrindTool::mode() const
diff --git a/src/plugins/valgrind/callgrindtool.h b/src/plugins/valgrind/callgrindtool.h
index 606d183df5..3e6d1eeb51 100644
--- a/src/plugins/valgrind/callgrindtool.h
+++ b/src/plugins/valgrind/callgrindtool.h
@@ -50,6 +50,7 @@ public:
QString id() const;
QString displayName() const;
+ QString description() const;
ToolMode mode() const;
void initialize();
diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp
index b391ca1697..54a399b1e9 100644
--- a/src/plugins/valgrind/memchecktool.cpp
+++ b/src/plugins/valgrind/memchecktool.cpp
@@ -195,12 +195,14 @@ MemcheckTool::MemcheckTool(QObject *parent)
setObjectName(QLatin1String("MemcheckTool"));
m_filterProjectAction = new QAction(tr("External Errors"), this);
- m_filterProjectAction->setToolTip(tr("Show issues originating outside currently opened projects."));
+ m_filterProjectAction->setToolTip(
+ tr("Show issues originating outside currently opened projects."));
m_filterProjectAction->setCheckable(true);
m_suppressionSeparator = new QAction(tr("Suppressions"), this);
m_suppressionSeparator->setSeparator(true);
- m_suppressionSeparator->setToolTip(tr("These suppression files were used in the last memory analyzer run."));
+ m_suppressionSeparator->setToolTip(
+ tr("These suppression files were used in the last memory analyzer run."));
QAction *a = new QAction(tr("Definite Memory Leaks"), this);
initKindFilterAction(a, QList<int>() << Leak_DefinitelyLost << Leak_IndirectlyLost);
@@ -297,7 +299,13 @@ QString MemcheckTool::id() const
QString MemcheckTool::displayName() const
{
- return tr("Analyze Memory");
+ return tr("Valgrind Analyze Memory");
+}
+
+QString MemcheckTool::description() const
+{
+ return tr("Valgrind Analyze Memory uses the \"memcheck\" tool to find "
+ "memory leaks");
}
IAnalyzerTool::ToolMode MemcheckTool::mode() const
diff --git a/src/plugins/valgrind/memchecktool.h b/src/plugins/valgrind/memchecktool.h
index 820aeb5e51..fe75afb6b7 100644
--- a/src/plugins/valgrind/memchecktool.h
+++ b/src/plugins/valgrind/memchecktool.h
@@ -95,6 +95,7 @@ public:
QString id() const;
QString displayName() const;
+ QString description() const;
ToolMode mode() const;
private slots: