forked from qt-creator/qt-creator
Clang: Fix inserting "::" after namespace
The extra "::" is showed in the tooltip right to the completion list item, but it was not inserted. Change-Id: I0ad2b816c56b8e3b5ccf0643f2c1a4f2a20b8818 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -111,6 +111,12 @@ void ClangAssistProposalItem::applyContextualContent(TextEditor::TextEditorWidge
|
||||
textToBeInserted = converter.text();
|
||||
if (converter.hasPlaceholderPositions())
|
||||
cursorOffset = converter.placeholderPositions().at(0) - converter.text().size();
|
||||
} else if (ccr.completionKind() == CodeCompletion::NamespaceCompletionKind) {
|
||||
CompletionChunksToTextConverter converter;
|
||||
|
||||
converter.parseChunks(ccr.chunks()); // Appends "::" after name space name
|
||||
|
||||
textToBeInserted = converter.text();
|
||||
} else if (!ccr.text().isEmpty()) {
|
||||
const TextEditor::CompletionSettings &completionSettings =
|
||||
TextEditor::TextEditorSettings::instance()->completionSettings();
|
||||
|
||||
Reference in New Issue
Block a user