forked from qt-creator/qt-creator
Debugger: Add delay before showing progress indicator.
Change-Id: I70dc3997800649e6920c6a6bece9aef98f2b2146 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -55,6 +55,7 @@
|
|||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
|
|
||||||
|
#include <QTimer>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
@@ -1160,6 +1161,9 @@ WatchHandler::WatchHandler(DebuggerEngine *engine)
|
|||||||
m_contentsValid = true; // FIXME
|
m_contentsValid = true; // FIXME
|
||||||
m_resetLocationScheduled = false;
|
m_resetLocationScheduled = false;
|
||||||
m_separatedView = new SeparatedView;
|
m_separatedView = new SeparatedView;
|
||||||
|
m_requestUpdateTimer = new QTimer(this);
|
||||||
|
m_requestUpdateTimer->setSingleShot(true);
|
||||||
|
connect(m_requestUpdateTimer, &QTimer::timeout, m_model, &WatchModel::updateRequested);
|
||||||
}
|
}
|
||||||
|
|
||||||
WatchHandler::~WatchHandler()
|
WatchHandler::~WatchHandler()
|
||||||
@@ -1274,11 +1278,12 @@ void WatchHandler::resetValueCache()
|
|||||||
|
|
||||||
void WatchHandler::updateRequested()
|
void WatchHandler::updateRequested()
|
||||||
{
|
{
|
||||||
emit m_model->updateRequested();
|
m_requestUpdateTimer->start(80);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WatchHandler::updateFinished()
|
void WatchHandler::updateFinished()
|
||||||
{
|
{
|
||||||
|
m_requestUpdateTimer->stop();
|
||||||
emit m_model->updateFinished();
|
emit m_model->updateFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -38,6 +38,10 @@
|
|||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QTimer;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -260,6 +264,7 @@ private:
|
|||||||
WatchModel *m_model; // Owned.
|
WatchModel *m_model; // Owned.
|
||||||
DebuggerEngine *m_engine; // Not owned.
|
DebuggerEngine *m_engine; // Not owned.
|
||||||
SeparatedView *m_separatedView; // Owned.
|
SeparatedView *m_separatedView; // Owned.
|
||||||
|
QTimer *m_requestUpdateTimer; // Owned.
|
||||||
|
|
||||||
bool m_contentsValid;
|
bool m_contentsValid;
|
||||||
bool m_resetLocationScheduled;
|
bool m_resetLocationScheduled;
|
||||||
|
Reference in New Issue
Block a user