Commit bf33b41d authored by Erik Verbruggen's avatar Erik Verbruggen Committed by Nikolai Kosjar

C++: set the document field in the synchronous case.

Task-number: QTCREATORBUG-12975
Change-Id: I9a4b8c69e925e288b7b02263c27f9791748bac85
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 8b8911e8
......@@ -359,6 +359,8 @@ void CppUseSelectionsUpdater::handleSymbolCaseAsynchronously(const Document::Ptr
void CppUseSelectionsUpdater::handleSymbolCaseSynchronously(const Document::Ptr document,
const Snapshot &snapshot)
{
m_document = document;
const Params params = Params(m_editorWidget->textCursor(), document, snapshot);
const UseSelectionsResult result = findUses(params);
processSymbolCaseResults(result);
......@@ -419,6 +421,9 @@ ExtraSelections CppUseSelectionsUpdater::toExtraSelections(const QList<int> &ref
TextEditor::TextStyle style) const
{
ExtraSelections selections;
QTC_ASSERT(m_document, return selections);
foreach (int index, references) {
unsigned line, column;
TranslationUnit *unit = m_document->translationUnit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment