forked from qt-creator/qt-creator
Clang: Avoid dot-arrow-correction if dot is gone
Change-Id: Iba23a17ba9345ed4f08e16faad02054903c04afc Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
a9012ce747
commit
535cc76cac
@@ -35,12 +35,13 @@ ClangAssistProposal::ClangAssistProposal(int cursorPos, TextEditor::GenericPropo
|
||||
{
|
||||
}
|
||||
|
||||
bool ClangAssistProposal::isCorrective() const
|
||||
bool ClangAssistProposal::isCorrective(TextEditor::TextEditorWidget *editorWidget) const
|
||||
{
|
||||
auto clangAssistProposalModel = static_cast<ClangAssistProposalModel*>(model());
|
||||
|
||||
return clangAssistProposalModel->neededCorrection()
|
||||
== ClangBackEnd::CompletionCorrection::DotToArrowCorrection;
|
||||
== ClangBackEnd::CompletionCorrection::DotToArrowCorrection
|
||||
&& editorWidget->textAt(basePosition() - 1, 1) == ".";
|
||||
}
|
||||
|
||||
void ClangAssistProposal::makeCorrection(TextEditor::TextEditorWidget *editorWidget)
|
||||
|
||||
Reference in New Issue
Block a user