Clang: Add tooltip for clang snippets

Change-Id: Ifccfd72c52910c6e1086d6c782552c60fbb89f5f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Marco Bubke
2015-07-15 16:59:19 +02:00
parent 8d23d80139
commit 336501943e
3 changed files with 17 additions and 7 deletions

View File

@@ -114,6 +114,18 @@ QString CompletionChunksToTextConverter::convertToName(const QVector<ClangBackEn
return converter.text();
}
QString CompletionChunksToTextConverter::convertToToolTip(const QVector<ClangBackEnd::CodeCompletionChunk> &codeCompletionChunks)
{
CompletionChunksToTextConverter converter;
converter.setAddPlaceHolderText(true);
converter.setAddSpaces(true);
converter.setAddExtraVerticalSpaceBetweenBraces(true);
converter.parseChunks(codeCompletionChunks);
return converter.text();
}
void CompletionChunksToTextConverter::parse(const ClangBackEnd::CodeCompletionChunk &codeCompletionChunk)
{
using ClangBackEnd::CodeCompletionChunk;