forked from qt-creator/qt-creator
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:
@@ -30,12 +30,12 @@
|
||||
namespace TextEditor {
|
||||
|
||||
GenericProposal::GenericProposal(int cursorPos, GenericProposalModel *model)
|
||||
: m_basePosition(cursorPos)
|
||||
: IAssistProposal(cursorPos)
|
||||
, m_model(model)
|
||||
{}
|
||||
|
||||
GenericProposal::GenericProposal(int cursorPos, const QList<AssistProposalItemInterface *> &items)
|
||||
: m_basePosition(cursorPos)
|
||||
: IAssistProposal(cursorPos)
|
||||
, m_model(new GenericProposalModel)
|
||||
{
|
||||
m_model->loadContent(items);
|
||||
@@ -49,11 +49,6 @@ bool GenericProposal::isFragile() const
|
||||
return false;
|
||||
}
|
||||
|
||||
int GenericProposal::basePosition() const
|
||||
{
|
||||
return m_basePosition;
|
||||
}
|
||||
|
||||
bool GenericProposal::isCorrective() const
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user