forked from qt-creator/qt-creator
Clang: Fix completion position for clang and proposal
* Rename some members/functions to clarify their meaning. * Ensure that the position for the proposal widget is at start of the identifer, so that the filter prefix will be found correctly in the GenericProposalWidget. For certain cases the completion were calculated but the widget was never shown: Case 1: void f() { <COMPLETION_CURSOR> } Case 2: void f() { st<COMPLETION_CURSOR> } Case 3: if (true) <COMPLETION_CURSOR> Case 4: foo. mem<COMPLETION_CURSOR> Change-Id: Ie79e01e8a22f8ec306136ec4ccbfffd544edd573 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -363,7 +363,7 @@ int ClangCompletionAssistProcessor::startOfOperator(int positionInDocument,
|
||||
|
||||
*kind = activationSequenceProcessor.completionKind();
|
||||
|
||||
int start = activationSequenceProcessor.position();
|
||||
int start = activationSequenceProcessor.operatorStartPosition();
|
||||
if (start != positionInDocument) {
|
||||
QTextCursor tc(m_interface->textDocument());
|
||||
tc.setPosition(positionInDocument);
|
||||
|
Reference in New Issue
Block a user