forked from qt-creator/qt-creator
Debugger: Show progress indicator while updating locals.
Change-Id: I4b26cbe71f5936f367f9add2b3a6c812446835d8 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -1500,6 +1500,7 @@ void CdbEngine::updateLocals(bool newFrame)
|
||||
|
||||
// Required arguments: frame
|
||||
str << blankSeparator << frameIndex;
|
||||
watchHandler()->updateRequested();
|
||||
postExtensionCommand("locals", arguments, 0,
|
||||
[this, newFrame](const CdbResponse &r) { handleLocals(r, newFrame); });
|
||||
}
|
||||
@@ -1859,6 +1860,7 @@ void CdbEngine::handleRegistersExt(const CdbResponse &response)
|
||||
void CdbEngine::handleLocals(const CdbResponse &response, bool newFrame)
|
||||
{
|
||||
if (response.success) {
|
||||
watchHandler()->updateFinished();
|
||||
if (boolSetting(VerboseLog))
|
||||
showMessage(QLatin1String("Locals: ") + QString::fromLatin1(response.extensionReply), LogDebug);
|
||||
WatchHandler *handler = watchHandler();
|
||||
|
||||
@@ -3755,6 +3755,7 @@ void GdbEngine::handleVarAssign(const DebuggerResponse &)
|
||||
void GdbEngine::updateLocals()
|
||||
{
|
||||
watchHandler()->resetValueCache();
|
||||
watchHandler()->updateRequested();
|
||||
updateLocalsPython(UpdateParameters());
|
||||
}
|
||||
|
||||
@@ -4767,6 +4768,7 @@ void GdbEngine::updateLocalsPython(const UpdateParameters ¶ms)
|
||||
|
||||
void GdbEngine::handleStackFramePython(const DebuggerResponse &response, bool partial)
|
||||
{
|
||||
watchHandler()->updateFinished();
|
||||
if (response.resultClass == ResultDone) {
|
||||
QByteArray out = response.consoleStreamOutput;
|
||||
while (out.endsWith(' ') || out.endsWith('\n'))
|
||||
|
||||
@@ -912,6 +912,7 @@ void LldbEngine::doUpdateLocals(UpdateParameters params)
|
||||
m_lastDebuggableCommand = cmd;
|
||||
m_lastDebuggableCommand.args.replace("\"passexceptions\":0", "\"passexceptions\":1");
|
||||
|
||||
watchHandler()->updateRequested();
|
||||
runCommand(cmd);
|
||||
|
||||
reloadRegisters();
|
||||
@@ -1009,6 +1010,7 @@ void LldbEngine::refreshLocals(const GdbMi &vars)
|
||||
}
|
||||
|
||||
handler->purgeOutdatedItems(toDelete);
|
||||
handler->updateFinished();
|
||||
|
||||
DebuggerToolTipManager::updateEngine(this);
|
||||
}
|
||||
|
||||
@@ -664,6 +664,7 @@ void PdbEngine::updateLocals()
|
||||
//m_lastDebuggableCommand = cmd;
|
||||
//m_lastDebuggableCommand.args.replace("\"passexceptions\":0", "\"passexceptions\":1");
|
||||
|
||||
watchHandler()->updateRequested();
|
||||
runCommand(cmd);
|
||||
}
|
||||
|
||||
|
||||
@@ -1177,6 +1177,7 @@ void WatchHandler::cleanup()
|
||||
m_model->m_expandedINames.clear();
|
||||
theWatcherNames.remove(QByteArray());
|
||||
m_model->reinitialize();
|
||||
emit m_model->updateFinished();
|
||||
m_separatedView->hide();
|
||||
}
|
||||
|
||||
@@ -1271,6 +1272,16 @@ void WatchHandler::resetValueCache()
|
||||
});
|
||||
}
|
||||
|
||||
void WatchHandler::updateRequested()
|
||||
{
|
||||
emit m_model->updateRequested();
|
||||
}
|
||||
|
||||
void WatchHandler::updateFinished()
|
||||
{
|
||||
emit m_model->updateFinished();
|
||||
}
|
||||
|
||||
void WatchHandler::purgeOutdatedItems(const QSet<QByteArray> &inames)
|
||||
{
|
||||
foreach (const QByteArray &iname, inames) {
|
||||
|
||||
@@ -177,6 +177,8 @@ signals:
|
||||
void itemIsExpanded(const QModelIndex &idx);
|
||||
void inameIsExpanded(const QByteArray &iname);
|
||||
void columnAdjustmentRequested();
|
||||
void updateRequested();
|
||||
void updateFinished();
|
||||
};
|
||||
|
||||
class WatchHandler : public QObject
|
||||
@@ -242,6 +244,8 @@ public:
|
||||
void removeItemByIName(const QByteArray &iname);
|
||||
void removeAllData(bool includeInspectData = false);
|
||||
void resetValueCache();
|
||||
void updateRequested();
|
||||
void updateFinished();
|
||||
void purgeOutdatedItems(const QSet<QByteArray> &inames);
|
||||
|
||||
private:
|
||||
|
||||
@@ -952,6 +952,12 @@ void WatchTreeView::setModel(QAbstractItemModel *model)
|
||||
this, &QAbstractItemView::setCurrentIndex);
|
||||
connect(watchModel, &WatchModelBase::itemIsExpanded,
|
||||
this, &WatchTreeView::handleItemIsExpanded);
|
||||
if (m_type == LocalsType) {
|
||||
connect(watchModel, &WatchModelBase::updateRequested,
|
||||
this, &WatchTreeView::showProgressIndicator);
|
||||
connect(watchModel, &WatchModelBase::updateFinished,
|
||||
this, &WatchTreeView::hideProgressIndicator);
|
||||
}
|
||||
}
|
||||
|
||||
void WatchTreeView::rowActivated(const QModelIndex &index)
|
||||
|
||||
Reference in New Issue
Block a user