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:
@@ -71,7 +71,7 @@ int ActivationSequenceProcessor::offset() const
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
int ActivationSequenceProcessor::position() const
|
||||
int ActivationSequenceProcessor::operatorStartPosition() const
|
||||
{
|
||||
return m_positionInDocument - m_offset;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user