forked from qt-creator/qt-creator
CppEditor: Fix highlighting of raw string literals
... with the built-in highlighter. Pass the necessary context information in and out of the SimpleLexer. Task-number: QTCREATORBUG-26211 Fixes: QTCREATORBUG-26425 Fixes: QTCREATORBUG-26615 Change-Id: Id72f743e07ae117ca51b0d5e527b208dda133b7e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -523,6 +523,22 @@ void TextDocumentLayout::setFolded(const QTextBlock &block, bool folded)
|
||||
emit layout->foldChanged(block.blockNumber(), folded);
|
||||
}
|
||||
|
||||
void TextDocumentLayout::setExpectedRawStringSuffix(const QTextBlock &block,
|
||||
const QByteArray &suffix)
|
||||
{
|
||||
if (TextBlockUserData * const data = textUserData(block))
|
||||
data->setExpectedRawStringSuffix(suffix);
|
||||
else if (!suffix.isEmpty())
|
||||
userData(block)->setExpectedRawStringSuffix(suffix);
|
||||
}
|
||||
|
||||
QByteArray TextDocumentLayout::expectedRawStringSuffix(const QTextBlock &block)
|
||||
{
|
||||
if (TextBlockUserData *userData = textUserData(block))
|
||||
return userData->expectedRawStringSuffix();
|
||||
return {};
|
||||
}
|
||||
|
||||
void TextDocumentLayout::requestExtraAreaUpdate()
|
||||
{
|
||||
emit updateExtraArea();
|
||||
|
||||
Reference in New Issue
Block a user