forked from qt-creator/qt-creator
Debugger: Fix tooltips
Fixes: QTCREATORBUG-19574 Fixes: QTCREATORBUG-23807 Change-Id: I61f997e69f4a747aff8c5e1044bb6d856494ae47 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1081,6 +1081,7 @@ void CdbEngine::doUpdateLocals(const UpdateParameters &updateParameters)
|
||||
showMessage(response.data["msg"].data(), LogError);
|
||||
}
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
updateToolTips();
|
||||
};
|
||||
|
||||
runCommand(cmd);
|
||||
|
@@ -2358,6 +2358,10 @@ void DebuggerEngine::updateItem(const QString &iname)
|
||||
QTC_CHECK(item);
|
||||
WatchModelBase *model = handler->model();
|
||||
QTC_CHECK(model);
|
||||
if (item && !item->wantsChildren) {
|
||||
updateToolTips();
|
||||
return;
|
||||
}
|
||||
if (item && !model->hasChildren(model->indexForItem(item))) {
|
||||
handler->notifyUpdateStarted(UpdateParameters(iname));
|
||||
item->setValue(decodeData({}, "notaccessible"));
|
||||
|
@@ -1179,7 +1179,7 @@ DebuggerToolTipManagerPrivate::DebuggerToolTipManagerPrivate(DebuggerEngine *eng
|
||||
this, &DebuggerToolTipManagerPrivate::saveSessionData);
|
||||
connect(SessionManager::instance(), &SessionManager::aboutToUnloadSession,
|
||||
this, &DebuggerToolTipManagerPrivate::sessionAboutToChange);
|
||||
setupEditors();
|
||||
debugModeEntered();
|
||||
}
|
||||
|
||||
void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
|
||||
@@ -1241,8 +1241,6 @@ void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
|
||||
DEBUG("SYNC IN STATE" << tooltip->state);
|
||||
tooltip->updateTooltip(m_engine);
|
||||
|
||||
*handled = true;
|
||||
|
||||
} else {
|
||||
|
||||
context.iname = "tooltip." + toHex(context.expression);
|
||||
@@ -1256,7 +1254,6 @@ void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
|
||||
tooltip->context.mousePosition = point;
|
||||
ToolTip::move(point, DebuggerMainWindow::instance());
|
||||
DEBUG("UPDATING DELAYED.");
|
||||
*handled = true;
|
||||
} else {
|
||||
DEBUG("CREATING DELAYED.");
|
||||
tooltip = new DebuggerToolTipHolder(context);
|
||||
@@ -1272,6 +1269,8 @@ void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*handled = true;
|
||||
}
|
||||
|
||||
void DebuggerToolTipManagerPrivate::slotEditorOpened(IEditor *e)
|
||||
@@ -1323,6 +1322,7 @@ void DebuggerToolTipManagerPrivate::leavingDebugMode()
|
||||
foreach (IEditor *e, DocumentModel::editorsForOpenedDocuments()) {
|
||||
if (auto toolTipEditor = qobject_cast<BaseTextEditor *>(e)) {
|
||||
toolTipEditor->editorWidget()->verticalScrollBar()->disconnect(this);
|
||||
toolTipEditor->editorWidget()->disconnect(this);
|
||||
toolTipEditor->disconnect(this);
|
||||
}
|
||||
}
|
||||
|
@@ -4818,6 +4818,7 @@ void GdbEngine::handleFetchVariables(const DebuggerResponse &response)
|
||||
m_inUpdateLocals = false;
|
||||
updateLocalsView(response.data);
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
updateToolTips();
|
||||
}
|
||||
|
||||
QString GdbEngine::msgPtraceError(DebuggerStartMode sm)
|
||||
|
@@ -786,6 +786,7 @@ void LldbEngine::doUpdateLocals(const UpdateParameters ¶ms)
|
||||
cmd.callback = [this](const DebuggerResponse &response) {
|
||||
updateLocalsView(response.data);
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
updateToolTips();
|
||||
};
|
||||
|
||||
runCommand(cmd);
|
||||
|
@@ -735,6 +735,7 @@ void UvscEngine::handleUpdateLocals(bool partial)
|
||||
|
||||
updateLocalsView(all);
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
updateToolTips();
|
||||
}
|
||||
|
||||
void UvscEngine::handleInsertBreakpoint(const QString &exp, const Breakpoint &bp)
|
||||
|
Reference in New Issue
Block a user