-
Notifications
You must be signed in to change notification settings - Fork 97
add QSyntaxHighlighter to Span inspector #1368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 47 commits
cd9338d
413c826
00455e4
f412e4c
386c5fb
20787bc
89e8125
1e54b35
4b4a197
fd1c551
8b86bb5
eb779ba
027ec18
3e1cd66
4d2d09d
382d5b0
61f40bd
1f9acfd
c9e5422
791cb56
98bab78
4276efe
3e7f103
f8321b7
b9022e6
25e61d7
7e562f8
b9ea593
44995f0
508bd36
30346c7
cbeeee4
4954c38
1336a6f
e064f15
908a24d
eb509a0
6725695
6b4a0ec
cae488a
2e6f50d
e606ec6
548c72f
d83243f
389b1b0
2672393
992f735
320b9b8
66cf42d
96cfc2e
11b98f5
d1421f5
90edbda
0a48be6
f00ea0b
d2931f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| // SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> | ||
| // SPDX-FileContributor: Leon Matthes <leon.matthes@kdab.com> | ||
| // SPDX-FileContributor: Quentin Weber <quentin.weber@kdab.com> | ||
| // | ||
| // SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
|
||
|
|
@@ -16,5 +17,7 @@ fn main() { | |
| .qt_module("Network") | ||
| .qt_module("Quick") | ||
| .file("src/inspector.rs") | ||
| .qobject_header("include/helper.h") | ||
|
||
| .build(); | ||
| println!("cargo:rerun-if-changed=include/helper.h"); | ||
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // clang-format off | ||
| // SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> | ||
| // clang-format on | ||
| // SPDX-FileContributor: Quentin Weber <quentin.weber@kdab.com> | ||
| // | ||
| // SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
|
||
| #pragma once | ||
| #include <QSyntaxHighlighter> | ||
|
|
||
| class QSyntaxHighlighterCXX : public QSyntaxHighlighter | ||
| { | ||
| Q_OBJECT | ||
| public: | ||
| explicit QSyntaxHighlighterCXX(QTextDocument* doc) | ||
| : QSyntaxHighlighter(doc) | ||
| { | ||
| } | ||
|
|
||
| protected: | ||
| std::unique_ptr<QTextBlock> currentBlockCXX() | ||
| { | ||
| return std::unique_ptr<QTextBlock>(new QTextBlock(currentBlock())); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you used
fancy-regexand notregex?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the
regexcrate does not support lookahead or lookbehind.