forked from qt-creator/qt-creator
Clang: Make ClangAssistProposalModel members private
Change-Id: Ib8089f4afdb72840d97e5286d8be631387e4d2c5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -37,13 +37,12 @@ namespace Internal {
|
|||||||
|
|
||||||
ClangAssistProposal::ClangAssistProposal(int cursorPos, TextEditor::GenericProposalModel *model)
|
ClangAssistProposal::ClangAssistProposal(int cursorPos, TextEditor::GenericProposalModel *model)
|
||||||
: GenericProposal(cursorPos, model)
|
: GenericProposal(cursorPos, model)
|
||||||
, m_replaceDotForArrow(static_cast<ClangAssistProposalModel *>(model)->m_replaceDotForArrow)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ClangAssistProposal::isCorrective() const
|
bool ClangAssistProposal::isCorrective() const
|
||||||
{
|
{
|
||||||
return m_replaceDotForArrow;
|
return ClangAssistProposalModel::replaceDotForArrow(model());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClangAssistProposal::makeCorrection(TextEditor::TextEditorWidget *editorWidget)
|
void ClangAssistProposal::makeCorrection(TextEditor::TextEditorWidget *editorWidget)
|
||||||
|
|||||||
@@ -44,6 +44,13 @@ const ClangAssistProposalItem &toClangAssistProposalItem(TextEditor::AssistPropo
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ClangAssistProposalModel::replaceDotForArrow(TextEditor::IAssistProposalModel *model)
|
||||||
|
{
|
||||||
|
auto clangAssistProposalModel = static_cast<ClangAssistProposalModel*>(model);
|
||||||
|
|
||||||
|
return clangAssistProposalModel->m_replaceDotForArrow;
|
||||||
|
}
|
||||||
|
|
||||||
bool ClangAssistProposalModel::isSortable(const QString &/*prefix*/) const
|
bool ClangAssistProposalModel::isSortable(const QString &/*prefix*/) const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ public:
|
|||||||
|
|
||||||
bool isSortable(const QString &prefix) const override;
|
bool isSortable(const QString &prefix) const override;
|
||||||
|
|
||||||
|
static bool replaceDotForArrow(IAssistProposalModel *model);
|
||||||
|
|
||||||
|
private:
|
||||||
bool m_sortable;
|
bool m_sortable;
|
||||||
unsigned m_completionOperator;
|
unsigned m_completionOperator;
|
||||||
bool m_replaceDotForArrow;
|
bool m_replaceDotForArrow;
|
||||||
|
|||||||
Reference in New Issue
Block a user