forked from qt-creator/qt-creator
LanguageClient: Use empty icon for unknown completion item kind
...instead of a null icon. Without this, a completion item gets no icon and looks misaligned between items with icons. For example, for the completion item "size_t" (a typedef) clangd reports a completion kind of "Reference", for which we do not have a dedicated icon. Change-Id: Ibba658d6bfb958bb34747e3f57514af49f5427b0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -140,8 +140,7 @@ QIcon LanguageClientCompletionItem::icon() const
|
||||
case CompletionItemKind::Snippet: icon = QIcon(":/texteditor/images/snippet.png"); break;
|
||||
case CompletionItemKind::EnumMember: icon = iconForType(Enumerator); break;
|
||||
case CompletionItemKind::Struct: icon = iconForType(Struct); break;
|
||||
default:
|
||||
break;
|
||||
default: icon = iconForType(Unknown); break;
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user