Debugger: Add delay before showing progress indicator.

Change-Id: I70dc3997800649e6920c6a6bece9aef98f2b2146
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
David Schulz
2015-03-16 13:36:35 +01:00
parent 70c475c847
commit fb4af50bf6
2 changed files with 11 additions and 1 deletions

View File

@@ -55,6 +55,7 @@
#include <QTabWidget>
#include <QTextEdit>
#include <QTimer>
#include <cstring>
#include <ctype.h>
@@ -1160,6 +1161,9 @@ WatchHandler::WatchHandler(DebuggerEngine *engine)
m_contentsValid = true; // FIXME
m_resetLocationScheduled = false;
m_separatedView = new SeparatedView;
m_requestUpdateTimer = new QTimer(this);
m_requestUpdateTimer->setSingleShot(true);
connect(m_requestUpdateTimer, &QTimer::timeout, m_model, &WatchModel::updateRequested);
}
WatchHandler::~WatchHandler()
@@ -1274,11 +1278,12 @@ void WatchHandler::resetValueCache()
void WatchHandler::updateRequested()
{
emit m_model->updateRequested();
m_requestUpdateTimer->start(80);
}
void WatchHandler::updateFinished()
{
m_requestUpdateTimer->stop();
emit m_model->updateFinished();
}