forked from qt-creator/qt-creator
CppTools: Remove processEvents call from follow symbol
processEvents is a bad way of dealing with asynchronous requests. Use QFutureWatcher for that purpose. Change-Id: I3839cb9db80a6d391f6af1178e96986a325b7b99 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -718,21 +718,23 @@ void CppEditorWidget::switchDeclarationDefinition(bool inNextSplit)
|
||||
openLink(symbolLink, inNextSplit != alwaysOpenLinksInNextSplit());
|
||||
}
|
||||
|
||||
Utils::Link CppEditorWidget::findLinkAt(const QTextCursor &cursor,
|
||||
bool resolveTarget,
|
||||
bool inNextSplit)
|
||||
void CppEditorWidget::findLinkAt(const QTextCursor &cursor,
|
||||
Utils::ProcessLinkCallback &&processLinkCallback,
|
||||
bool resolveTarget,
|
||||
bool inNextSplit)
|
||||
{
|
||||
if (!d->m_modelManager)
|
||||
return Utils::Link();
|
||||
return processLinkCallback(Utils::Link());
|
||||
|
||||
const Utils::FileName &filePath = textDocument()->filePath();
|
||||
|
||||
return followSymbolInterface().findLink(CppTools::CursorInEditor{cursor, filePath, this},
|
||||
resolveTarget,
|
||||
d->m_modelManager->snapshot(),
|
||||
d->m_lastSemanticInfo.doc,
|
||||
d->m_modelManager->symbolFinder(),
|
||||
inNextSplit);
|
||||
followSymbolInterface().findLink(CppTools::CursorInEditor{cursor, filePath, this},
|
||||
std::move(processLinkCallback),
|
||||
resolveTarget,
|
||||
d->m_modelManager->snapshot(),
|
||||
d->m_lastSemanticInfo.doc,
|
||||
d->m_modelManager->symbolFinder(),
|
||||
inNextSplit);
|
||||
}
|
||||
|
||||
unsigned CppEditorWidget::documentRevision() const
|
||||
|
||||
Reference in New Issue
Block a user