diff options
| author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-03-20 13:48:20 +0100 |
|---|---|---|
| committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2013-05-03 10:56:26 +0200 |
| commit | 8e18adc70f4ea49eb1e20976220d79874228257d (patch) | |
| tree | cbdc3f9876bae0610e6eb3282b6baf6c6300ef86 /src/plugins/cpptools/cppcompletionassist.cpp | |
| parent | 6999e3c33907c0b4b09902f18dee0407c6d6293e (diff) | |
| download | qt-creator-8e18adc70f4ea49eb1e20976220d79874228257d.tar.gz | |
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>
Diffstat (limited to 'src/plugins/cpptools/cppcompletionassist.cpp')
| -rw-r--r-- | src/plugins/cpptools/cppcompletionassist.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp index d9e12a95ec..736722657f 100644 --- a/src/plugins/cpptools/cppcompletionassist.cpp +++ b/src/plugins/cpptools/cppcompletionassist.cpp @@ -1778,7 +1778,7 @@ bool CppCompletionAssistProcessor::completeConstructorOrFunction(const QList<CPl } if (functions.isEmpty()) { - const Name *functionCallOp = context.control()->operatorNameId(OperatorNameId::FunctionCallOp); + const Name *functionCallOp = context.bindings()->control()->operatorNameId(OperatorNameId::FunctionCallOp); foreach (const LookupItem &result, results) { FullySpecifiedType ty = result.type().simplified(); @@ -1873,7 +1873,7 @@ bool CppCompletionAssistProcessor::completeConstructorOrFunction(const QList<CPl targetCoN = context.globalNamespace(); UseMinimalNames q(targetCoN); env.enter(&q); - Control *control = context.control().data(); + Control *control = context.bindings()->control().data(); // set up signature autocompletion foreach (Function *f, functions) { |
