aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cpphighlighter.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-07-05 17:09:52 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2023-07-07 08:55:20 +0000
commit6bf6c093cddbe0f7af61877aadc807fc117e33bd (patch)
tree5da9d0d36a1c6640fe0afcb8f809c18d3080bcc8 /src/plugins/cppeditor/cpphighlighter.h
parent29ca86ce6589252674a7055a522bcf3b34c374d3 (diff)
CppEditor: Fix parentheses mismatch on comment followed by backslash
Apparently, it was mistakenly assumed that a non-zero lexer state implies that the comment continues on the next line when it can also mean that the line ends in a backslash. Adapt the check accordingly. Fixes: QTCREATORBUG-29339 Change-Id: Ib239aca86dae9983d920f7715ae628ab4bf80220 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/cppeditor/cpphighlighter.h')
-rw-r--r--src/plugins/cppeditor/cpphighlighter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/cpphighlighter.h b/src/plugins/cppeditor/cpphighlighter.h
index 1728ffeb77..e2fac20bba 100644
--- a/src/plugins/cppeditor/cpphighlighter.h
+++ b/src/plugins/cppeditor/cpphighlighter.h
@@ -52,6 +52,8 @@ public:
private slots:
void test_data();
void test();
+ void testParentheses_data();
+ void testParentheses();
private:
QTextDocument m_doc;