diff options
author | Nicolas Guichard <nicolas.guichard@kdab.com> | 2020-07-16 15:25:41 +0200 |
---|---|---|
committer | Nicolas Guichard <nicolas.guichard@kdab.com> | 2020-07-16 16:15:12 +0200 |
commit | 13067bf7313e2e0e9c16e952bc97dd8854695967 (patch) | |
tree | e1ae00eae71d4e169ec326c2a680a80ecfff8a34 /tests/manual | |
parent | 81d4c607660dd1eb116ada95b5878fd51531442c (diff) |
rhi: fix SubmissionContext::loadShader for Unicode files
QRegularExpression::match takes a QString and not a QByteArray, so
QRegularExpressionMatch::capturedStart is not reliable to locate bytes
in a QByteArray which might contain Unicode data.
This fixes the issue by explicitly working on QStrings.
Pick-to: 5.15
Change-Id: Ia32ee169718d98e7197d7bfa19ca23e6e243dc25
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/rhi/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/manual/rhi/main.cpp b/tests/manual/rhi/main.cpp index bca544a20..123647ac1 100644 --- a/tests/manual/rhi/main.cpp +++ b/tests/manual/rhi/main.cpp @@ -98,6 +98,10 @@ static const constexpr auto vertex_shader = R"_(#version 450 +/** + * Unicode comment: Ѧ𝙱ƇᗞΣ + */ + layout(location = 0) in vec3 vertexPosition; layout(location = 1) in vec3 vertexColor; layout(location = 0) out vec3 color; @@ -136,6 +140,10 @@ void main() static const constexpr auto fragment_shader = R"_(#version 450 +/** + * Unicode comment: Ѧ𝙱ƇᗞΣ + */ + layout(location = 0) out vec4 fragColor; layout(location = 0) in vec3 color; |