• Erik Verbruggen's avatar
    CppEditor: copy snapshot before FunctionDeclDefLink change calculation. · be3dbd26
    Erik Verbruggen authored
    FunctionDeclDefLink::changes is called from
    CPPEditorWidget::updateFunctionDeclDefLinkNow() where it receives the
    snapshot by reference from the semantic info. The semantic info is
    recalculated in a/the future, so it might change the snapshot or its
    documents while it's still being used by the decl/def link finder.
    
    So, this patch takes a copy of all relevant semantic info (snapshot and
    document) before starting to calculate the changes.
    
    Change-Id: I78244a4ca8149233403b3c35ee05a2d4ed4b2770
    Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
    be3dbd26
cppeditor.cpp 40.5 KB