forked from qt-creator/qt-creator
C++: Fix crash in code completion.
Caused by a dangling pointer of a template instantiation which had been cloned into the wrong control. The fix is to remove that control and refer to the control of the bindings (which is the correct one). Change-Id: I951a60f2e613aae1e4ac901ce99c820212018709 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
committed by
Erik Verbruggen
parent
6999e3c339
commit
8e18adc70f
@@ -174,7 +174,7 @@ void tst_cxx11::inlineNamespaceLookup()
|
||||
snapshot.insert(doc);
|
||||
|
||||
LookupContext context(doc, snapshot);
|
||||
QSharedPointer<Control> control = context.control();
|
||||
QSharedPointer<Control> control = context.bindings()->control();
|
||||
|
||||
QList<LookupItem> results = context.lookup(control->identifier("foo"), doc->globalNamespace());
|
||||
QCOMPARE(results.size(), 1); // the symbol is visible from the global scope
|
||||
|
||||
Reference in New Issue
Block a user