diff options
author | Youngjin Kim <[email protected]> | 2021-09-02 10:14:32 +0900 |
---|---|---|
committer | Jaeyoon Jung <[email protected]> | 2022-02-02 18:36:01 +0900 |
commit | 2e6aed4ffd106b34f0505047a687284c3f8ce8c2 (patch) | |
tree | ce369d72585bb780a9ea42c59262edc5210a5921 /src/tools | |
parent | 290f345d8451b32a28c42ba30a19b84e73e2abac (diff) |
Use scope resolution operator for request
If the combination of the name of the protocol interface and the name of
its request is same as another interface name, it can cause problem in
calling the constructor instead of method generated by wayland-scanner
when calling request.
For example, if you have an interface named "foo" and its request named
"bar", it might conflict with another interface named "foo_bar".
A real example for this is presentation_time protocol which has
a request "feedback" in the interface "wp_presentation" while it also
has another interface named as "wp_presentation_feedback".
Pick-to: 6.3
Change-Id: I7c007978d4aa404d10441643d5461372f33954e5
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qtwaylandscanner/qtwaylandscanner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/qtwaylandscanner/qtwaylandscanner.cpp b/src/tools/qtwaylandscanner/qtwaylandscanner.cpp index 93f4b68ff64..f84673d461a 100644 --- a/src/tools/qtwaylandscanner/qtwaylandscanner.cpp +++ b/src/tools/qtwaylandscanner/qtwaylandscanner.cpp @@ -1236,7 +1236,7 @@ bool Scanner::process() printf("\n"); } int actualArgumentCount = new_id ? int(e.arguments.size()) - 1 : int(e.arguments.size()); - printf(" %s%s_%s(\n", new_id ? "return " : "", interfaceName, e.name.constData()); + printf(" %s::%s_%s(\n", new_id ? "return " : "", interfaceName, e.name.constData()); printf(" m_%s%s", interfaceName, actualArgumentCount > 0 ? "," : ""); bool needsComma = false; for (const WaylandArgument &a : e.arguments) { |