From 2cd71a18fc842f2a9749adbc9d1973987dc1ffc5 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 24 May 2023 16:21:17 +0200 Subject: [PATCH 1/2] CppEditor: Fix raw string highlighting with embedded empty lines We missed an early return in highlightBlock(). Task-number: QTCREATORBUG-29200 Change-Id: I3f32c2948ff778a9b558850235058537fcd48fd1 Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: Fabian Kosmale Reviewed-by: David Schulz --- src/plugins/cppeditor/cpphighlighter.cpp | 1 + src/plugins/cppeditor/testcases/highlightingtestcase.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp index 1f83b317ada..90bea637095 100644 --- a/src/plugins/cppeditor/cpphighlighter.cpp +++ b/src/plugins/cppeditor/cpphighlighter.cpp @@ -76,6 +76,7 @@ void CppHighlighter::highlightBlock(const QString &text) setFormat(0, text.length(), formatForCategory(C_VISUAL_WHITESPACE)); } TextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent); + TextDocumentLayout::setExpectedRawStringSuffix(currentBlock(), inheritedRawStringSuffix); return; } diff --git a/src/plugins/cppeditor/testcases/highlightingtestcase.cpp b/src/plugins/cppeditor/testcases/highlightingtestcase.cpp index 20fa2526467..36e3a4b17bb 100644 --- a/src/plugins/cppeditor/testcases/highlightingtestcase.cpp +++ b/src/plugins/cppeditor/testcases/highlightingtestcase.cpp @@ -1,7 +1,7 @@ auto func() { return R"(foo - foobar + R"notaprefix!( barfoobar)" R"(second)" /* comment */ R"(third)"; } From 13e9125d1d628d418a54baa1aa62ab6986280f02 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 26 May 2023 09:40:36 +0200 Subject: [PATCH 2/2] Update qbs submodule to HEAD of 2.0 branch Change-Id: I44c759f26b98da440cc75cce4b8da97d4b202054 Reviewed-by: Christian Stenger --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index dc4da2ef8aa..eaeba4a45e7 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit dc4da2ef8aaf63ab837da0aa7689a5b18e34ace8 +Subproject commit eaeba4a45e7d95b7bb3f4fe907e862d947faf092