CodeAssist: Move base position to interface.

Every proposal needs to have a base postion.
Move it to the base class to reduce duplicated code.

Change-Id: I0b1b8282dfe955d251646661f755bf9f585fbad1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2016-03-14 13:21:55 +01:00
parent 8d2858d8fe
commit 6e4a719738
6 changed files with 15 additions and 20 deletions

View File

@@ -59,7 +59,8 @@ using namespace TextEditor;
\sa IAssistProposalWidget, IAssistModel
*/
IAssistProposal::IAssistProposal()
IAssistProposal::IAssistProposal(int basePosition)
: m_basePosition(basePosition)
{}
IAssistProposal::~IAssistProposal()
@@ -79,6 +80,11 @@ IAssistProposal::~IAssistProposal()
Returns the position from which this proposal starts.
*/
int IAssistProposal::basePosition() const
{
return m_basePosition;
}
/*!
\fn bool TextEditor::IAssistProposal::isCorrective() const