diff options
author | hjk <qtc-committer@nokia.com> | 2011-12-13 14:01:52 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-12-13 14:04:56 +0100 |
commit | e08f51c21c2441b34b6560a18d29fdb0c8048199 (patch) | |
tree | 9a028224bc40573f09eabbcc6779b02b52ab044f /src | |
parent | 86629f18c2f220833e947725c3e3055d7989c67b (diff) | |
download | qt-creator-e08f51c21c2441b34b6560a18d29fdb0c8048199.tar.gz |
analyzer: show busy cursor as long analysis is running
Change-Id: I93ad6ac5e79f5e8a6f843a90b244bfc0587c070c
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/valgrind/callgrindcostview.h | 8 | ||||
-rw-r--r-- | src/plugins/valgrind/callgrindtool.cpp | 11 | ||||
-rw-r--r-- | src/plugins/valgrind/memchecktool.cpp | 8 | ||||
-rw-r--r-- | src/plugins/valgrind/memchecktool.h | 1 |
4 files changed, 20 insertions, 8 deletions
diff --git a/src/plugins/valgrind/callgrindcostview.h b/src/plugins/valgrind/callgrindcostview.h index d3ddcf7636..6dd04505cd 100644 --- a/src/plugins/valgrind/callgrindcostview.h +++ b/src/plugins/valgrind/callgrindcostview.h @@ -33,10 +33,10 @@ #ifndef CALLGRINDCOSTVIEW_H #define CALLGRINDCOSTVIEW_H -#include <QtGui/QTreeView> - #include "callgrindcostdelegate.h" +#include <QtGui/QTreeView> + namespace Valgrind { namespace Internal { @@ -46,13 +46,13 @@ class CostView : public QTreeView public: explicit CostView(QWidget *parent = 0); - virtual ~CostView(); + ~CostView(); /** * Overload automatically updates the cost delegate * and sets it for the cost columns of DataModel and CallModel. */ - virtual void setModel(QAbstractItemModel *model); + void setModel(QAbstractItemModel *model); /** * How to format cost data columns in the view. diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index 8f12f24df5..904e1da332 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -156,7 +156,7 @@ public slots: void stackBrowserChanged(); /// If \param busy is true, all widgets get a busy cursor when hovered - void setBusy(bool busy); + void setBusyCursor(bool busy); void dataFunctionSelected(const QModelIndex &index); void calleeFunctionSelected(const QModelIndex &index); @@ -285,7 +285,7 @@ void CallgrindToolPrivate::doClear(bool clearParseData) m_proxyModel->setFilterFixedString(QString()); } -void CallgrindToolPrivate::setBusy(bool busy) +void CallgrindToolPrivate::setBusyCursor(bool busy) { QCursor cursor(busy ? Qt::BusyCursor : Qt::ArrowCursor); m_flatView->setCursor(cursor); @@ -468,7 +468,7 @@ void CallgrindToolPrivate::setParseData(ParseData *data) m_stackBrowser->clear(); // unset busy state - setBusy(false); + //setBusy(false); } void CallgrindToolPrivate::updateEventCombo() @@ -614,6 +614,7 @@ IAnalyzerEngine *CallgrindToolPrivate::createEngine(const AnalyzerStartParameter void CallgrindTool::startTool(StartMode mode) { ValgrindPlugin::startValgrindTool(this, mode); + d->setBusyCursor(true); } QWidget *CallgrindTool::createWidgets() @@ -863,6 +864,8 @@ void CallgrindToolPrivate::engineFinished() showParserResults(data); else AnalyzerManager::showStatusMessage(tr("Profiling aborted.")); + + setBusyCursor(false); } void CallgrindToolPrivate::showParserResults(const ParseData *data) @@ -944,7 +947,7 @@ void CallgrindToolPrivate::handleShowCostsOfFunction() void CallgrindToolPrivate::slotRequestDump() { - setBusy(true); + //setBusy(true); m_visualisation->setText(tr("Populating...")); dumpRequested(); } diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index 0bbc6e6521..6f836a89d2 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -465,6 +465,7 @@ void MemcheckTool::startTool(StartMode mode) void MemcheckTool::engineStarting(const IAnalyzerEngine *engine) { + setBusyCursor(true); clearErrorView(); QString dir; @@ -548,6 +549,13 @@ void MemcheckTool::finished() m_goNext->setEnabled(n > 1); const QString msg = AnalyzerManager::msgToolFinished(displayName(), n); AnalyzerManager::showStatusMessage(msg); + setBusyCursor(false); +} + +void MemcheckTool::setBusyCursor(bool busy) +{ + QCursor cursor(busy ? Qt::BusyCursor : Qt::ArrowCursor); + m_errorView->setCursor(cursor); } } // namespace Internal diff --git a/src/plugins/valgrind/memchecktool.h b/src/plugins/valgrind/memchecktool.h index 5a1dc3fc60..f808e3bc62 100644 --- a/src/plugins/valgrind/memchecktool.h +++ b/src/plugins/valgrind/memchecktool.h @@ -113,6 +113,7 @@ private: ToolMode toolMode() const; void extensionsInitialized() {} QWidget *createWidgets(); + void setBusyCursor(bool busy); Analyzer::IAnalyzerEngine *createEngine(const Analyzer::AnalyzerStartParameters &sp, ProjectExplorer::RunConfiguration *runConfiguration = 0); |