forked from qt-creator/qt-creator
CodeAssist: Ensure perfect match for keywords
...as otherwise the completion windows stays open and gets in the way. Fixes: QTCREATORBUG-21767 Change-Id: Ib0a841b9d9de52109439f067c466478744361814 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -489,6 +489,12 @@ QString ClangAssistProposalItem::detail() const
|
||||
return detail;
|
||||
}
|
||||
|
||||
bool ClangAssistProposalItem::isKeyword() const
|
||||
{
|
||||
// KeywordCompletionKind includes real keywords but also "code patterns"/snippets.
|
||||
return m_codeCompletions[0].completionKind == CodeCompletion::KeywordCompletionKind;
|
||||
}
|
||||
|
||||
bool ClangAssistProposalItem::isSnippet() const
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
QString text() const final;
|
||||
QIcon icon() const final;
|
||||
QString detail() const final;
|
||||
bool isKeyword() const final;
|
||||
bool isSnippet() const final;
|
||||
bool isValid() const final;
|
||||
quint64 hash() const final;
|
||||
|
||||
Reference in New Issue
Block a user