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:
@@ -458,6 +458,10 @@ QIcon CodeModelIcon::iconForType(CodeModelIcon::Type type)
|
||||
}, Icon::Tint).icon());
|
||||
return icon;
|
||||
}
|
||||
case Unknown: {
|
||||
const static QIcon icon(Icons::EMPTY16.icon());
|
||||
return icon;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user