Generate more useful methods for new_id requests
Change-Id: I3206bf7e0ffc99e9ec10d949f51ad043aca2548c Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This commit is contained in:
parent
4a014e13e0
commit
003894ecc2
@ -260,8 +260,6 @@ void printEvent(const WaylandEvent &e, const char *interfaceName, bool omitNames
|
|||||||
printf("const struct ::wl_interface *%s, uint32_t%s", omitNames ? "" : "interface", omitNames ? "" : " version");
|
printf("const struct ::wl_interface *%s, uint32_t%s", omitNames ? "" : "interface", omitNames ? "" : " version");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("struct ::%s *%s, ", interfaceName, omitNames ? "" : "object");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -965,8 +963,7 @@ void process(QXmlStreamReader &xml)
|
|||||||
printEventHandlerSignature(e, interfaceName, false);
|
printEventHandlerSignature(e, interfaceName, false);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(" {\n");
|
printf(" {\n");
|
||||||
if (!newIdArgument(e.arguments))
|
printf(" Q_UNUSED(object);\n");
|
||||||
printf(" Q_UNUSED(object);\n");
|
|
||||||
printf(" static_cast<%s *>(data)->%s_%s(", interfaceName, interfaceNameStripped, e.name.constData());
|
printf(" static_cast<%s *>(data)->%s_%s(", interfaceName, interfaceNameStripped, e.name.constData());
|
||||||
for (int i = 0; i < e.arguments.size(); ++i) {
|
for (int i = 0; i < e.arguments.size(); ++i) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
@ -974,8 +971,6 @@ void process(QXmlStreamReader &xml)
|
|||||||
QByteArray cType = waylandToCType(a.type, a.interface);
|
QByteArray cType = waylandToCType(a.type, a.interface);
|
||||||
QByteArray qtType = waylandToQtType(a.type, a.interface, e.request);
|
QByteArray qtType = waylandToQtType(a.type, a.interface, e.request);
|
||||||
const char *argumentName = a.name.constData();
|
const char *argumentName = a.name.constData();
|
||||||
if (a.type == "new_id")
|
|
||||||
printf(" object,\n");
|
|
||||||
if (a.type == "string")
|
if (a.type == "string")
|
||||||
printf(" QString::fromUtf8(%s)", argumentName);
|
printf(" QString::fromUtf8(%s)", argumentName);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user