summaryrefslogtreecommitdiffstats
path: root/src/qtwaylandscanner
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-09-12 14:17:43 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-09-18 12:13:30 +0000
commit54113bb70ccc2df74c55d881b543d13fd4eb9550 (patch)
tree0ecc667fa05df3d03f266fe55a0030c2a3d181a3 /src/qtwaylandscanner
parentae4326db18b99630766e73c2f873eb883db2f493 (diff)
Don't use members of wl_resource
When we switch to only including core wayland headers, wl_resource will be an opaque type. Use the getters and setter functions instead. Task-number: QTBUG-70553 Change-Id: I7d84d48a4ee3586f231a331cd15716686dcee775 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/qtwaylandscanner')
-rw-r--r--src/qtwaylandscanner/qtwaylandscanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp
index ec1341e8a..f2e2d24de 100644
--- a/src/qtwaylandscanner/qtwaylandscanner.cpp
+++ b/src/qtwaylandscanner/qtwaylandscanner.cpp
@@ -506,7 +506,7 @@ bool Scanner::process()
printf(" %s *%s_object;\n", interfaceName, interfaceNameStripped);
printf(" struct ::wl_resource *handle;\n");
printf("\n");
- printf(" struct ::wl_client *client() const { return handle->client; }\n");
+ printf(" struct ::wl_client *client() const { return wl_resource_get_client(handle); }\n");
printf(" int version() const { return wl_resource_get_version(handle); }\n");
printf("\n");
printf(" static Resource *fromResource(struct ::wl_resource *resource);\n");
@@ -806,7 +806,7 @@ bool Scanner::process()
printf(" if (Q_UNLIKELY(!resource))\n");
printf(" return nullptr;\n");
printf(" if (wl_resource_instance_of(resource, &::%s_interface, %s))\n", interfaceName, interfaceMember.constData());
- printf(" return static_cast<Resource *>(resource->data);\n");
+ printf(" return static_cast<Resource *>(wl_resource_get_user_data(resource));\n");
printf(" return nullptr;\n");
printf(" }\n");