forked from qt-creator/qt-creator
Editor: Add replacement helper to document layout
More inline with the other text block user data members and cleaner on the client side. Additionally add some & for const arguments and remove test function call. Change-Id: I19e646aa204eedf447c02a2f76b89c3430280169 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -373,7 +373,7 @@ QAction *TextDocument::createDiffAgainstCurrentFileAction(
|
||||
return diffAction;
|
||||
}
|
||||
|
||||
void TextDocument::insertSuggestion(const QString text, const QTextBlock &block)
|
||||
void TextDocument::insertSuggestion(const QString &text, const QTextBlock &block)
|
||||
{
|
||||
TextDocumentLayout::userData(block)->setReplacement(block.text() + text);
|
||||
TextDocumentLayout::updateReplacmentFormats(block, fontSettings());
|
||||
|
||||
Reference in New Issue
Block a user