forked from qt-creator/qt-creator
Debugger: Remove new watch window timer from public interface
Change-Id: Ic9d3df22d917e5644d6302a6af06aa8eadea8b5a Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -1500,7 +1500,7 @@ void CdbEngine::updateLocals(bool newFrame)
|
||||
|
||||
// Required arguments: frame
|
||||
str << blankSeparator << frameIndex;
|
||||
watchHandler()->updateRequested();
|
||||
watchHandler()->notifyUpdateStarted();
|
||||
postExtensionCommand("locals", arguments, 0,
|
||||
[this, newFrame](const CdbResponse &r) { handleLocals(r, newFrame); });
|
||||
}
|
||||
@@ -1860,7 +1860,7 @@ void CdbEngine::handleRegistersExt(const CdbResponse &response)
|
||||
void CdbEngine::handleLocals(const CdbResponse &response, bool newFrame)
|
||||
{
|
||||
if (response.success) {
|
||||
watchHandler()->updateFinished();
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
if (boolSetting(VerboseLog))
|
||||
showMessage(QLatin1String("Locals: ") + QString::fromLatin1(response.extensionReply), LogDebug);
|
||||
WatchHandler *handler = watchHandler();
|
||||
|
@@ -3755,7 +3755,7 @@ void GdbEngine::handleVarAssign(const DebuggerResponse &)
|
||||
void GdbEngine::updateLocals()
|
||||
{
|
||||
watchHandler()->resetValueCache();
|
||||
watchHandler()->updateRequested();
|
||||
watchHandler()->notifyUpdateStarted();
|
||||
updateLocalsPython(UpdateParameters());
|
||||
}
|
||||
|
||||
@@ -4768,7 +4768,7 @@ void GdbEngine::updateLocalsPython(const UpdateParameters ¶ms)
|
||||
|
||||
void GdbEngine::handleStackFramePython(const DebuggerResponse &response, bool partial)
|
||||
{
|
||||
watchHandler()->updateFinished();
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
if (response.resultClass == ResultDone) {
|
||||
QByteArray out = response.consoleStreamOutput;
|
||||
while (out.endsWith(' ') || out.endsWith('\n'))
|
||||
|
@@ -912,7 +912,7 @@ void LldbEngine::doUpdateLocals(UpdateParameters params)
|
||||
m_lastDebuggableCommand = cmd;
|
||||
m_lastDebuggableCommand.args.replace("\"passexceptions\":0", "\"passexceptions\":1");
|
||||
|
||||
watchHandler()->updateRequested();
|
||||
watchHandler()->notifyUpdateStarted();
|
||||
runCommand(cmd);
|
||||
|
||||
reloadRegisters();
|
||||
@@ -1010,7 +1010,7 @@ void LldbEngine::refreshLocals(const GdbMi &vars)
|
||||
}
|
||||
|
||||
handler->purgeOutdatedItems(toDelete);
|
||||
handler->updateFinished();
|
||||
handler->notifyUpdateFinished();
|
||||
|
||||
DebuggerToolTipManager::updateEngine(this);
|
||||
}
|
||||
|
@@ -664,7 +664,7 @@ void PdbEngine::updateLocals()
|
||||
//m_lastDebuggableCommand = cmd;
|
||||
//m_lastDebuggableCommand.args.replace("\"passexceptions\":0", "\"passexceptions\":1");
|
||||
|
||||
watchHandler()->updateRequested();
|
||||
watchHandler()->notifyUpdateStarted();
|
||||
runCommand(cmd);
|
||||
}
|
||||
|
||||
|
@@ -228,6 +228,7 @@ public:
|
||||
WatchItem *m_tooltipRoot; // Not owned.
|
||||
|
||||
QSet<QByteArray> m_expandedINames;
|
||||
QTimer m_requestUpdateTimer;
|
||||
|
||||
TypeFormatList builtinTypeFormatList(const WatchData &data) const;
|
||||
QStringList dumperTypeFormatList(const WatchData &data) const;
|
||||
@@ -257,6 +258,10 @@ WatchModel::WatchModel(WatchHandler *handler)
|
||||
root->appendChild(m_tooltipRoot = new WatchItem("tooltip", tr("Tooltip")));
|
||||
setRootItem(root);
|
||||
|
||||
m_requestUpdateTimer.setSingleShot(true);
|
||||
connect(&m_requestUpdateTimer, &QTimer::timeout,
|
||||
this, &WatchModel::updateStarted);
|
||||
|
||||
connect(action(SortStructMembers), &SavedAction::valueChanged,
|
||||
this, &WatchModel::reinsertAllData);
|
||||
connect(action(ShowStdNamespace), &SavedAction::valueChanged,
|
||||
@@ -1161,9 +1166,6 @@ 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()
|
||||
@@ -1276,14 +1278,14 @@ void WatchHandler::resetValueCache()
|
||||
});
|
||||
}
|
||||
|
||||
void WatchHandler::updateRequested()
|
||||
void WatchHandler::notifyUpdateStarted()
|
||||
{
|
||||
m_requestUpdateTimer->start(80);
|
||||
m_model->m_requestUpdateTimer.start(80);
|
||||
}
|
||||
|
||||
void WatchHandler::updateFinished()
|
||||
void WatchHandler::notifyUpdateFinished()
|
||||
{
|
||||
m_requestUpdateTimer->stop();
|
||||
m_model->m_requestUpdateTimer.stop();
|
||||
emit m_model->updateFinished();
|
||||
}
|
||||
|
||||
|
@@ -38,10 +38,6 @@
|
||||
#include <QPointer>
|
||||
#include <QVector>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTimer;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
@@ -181,7 +177,7 @@ signals:
|
||||
void itemIsExpanded(const QModelIndex &idx);
|
||||
void inameIsExpanded(const QByteArray &iname);
|
||||
void columnAdjustmentRequested();
|
||||
void updateRequested();
|
||||
void updateStarted();
|
||||
void updateFinished();
|
||||
};
|
||||
|
||||
@@ -248,8 +244,8 @@ public:
|
||||
void removeItemByIName(const QByteArray &iname);
|
||||
void removeAllData(bool includeInspectData = false);
|
||||
void resetValueCache();
|
||||
void updateRequested();
|
||||
void updateFinished();
|
||||
void notifyUpdateStarted();
|
||||
void notifyUpdateFinished();
|
||||
void purgeOutdatedItems(const QSet<QByteArray> &inames);
|
||||
|
||||
private:
|
||||
@@ -264,7 +260,6 @@ private:
|
||||
WatchModel *m_model; // Owned.
|
||||
DebuggerEngine *m_engine; // Not owned.
|
||||
SeparatedView *m_separatedView; // Owned.
|
||||
QTimer *m_requestUpdateTimer; // Owned.
|
||||
|
||||
bool m_contentsValid;
|
||||
bool m_resetLocationScheduled;
|
||||
|
@@ -953,7 +953,7 @@ void WatchTreeView::setModel(QAbstractItemModel *model)
|
||||
connect(watchModel, &WatchModelBase::itemIsExpanded,
|
||||
this, &WatchTreeView::handleItemIsExpanded);
|
||||
if (m_type == LocalsType) {
|
||||
connect(watchModel, &WatchModelBase::updateRequested,
|
||||
connect(watchModel, &WatchModelBase::updateStarted,
|
||||
this, &WatchTreeView::showProgressIndicator);
|
||||
connect(watchModel, &WatchModelBase::updateFinished,
|
||||
this, &WatchTreeView::hideProgressIndicator);
|
||||
|
Reference in New Issue
Block a user