tracegen: add support for QSize

Change-Id: I7228f5ebbcbd577a66a7a368fb4d64c4c7e55a25
Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
bb10
Rafael Roquetto 2022-07-28 09:41:21 +10:00 committed by Rafael Roquetto
parent 28693abb64
commit 5d58aee53a
4 changed files with 11 additions and 1 deletions

View File

@ -41,6 +41,10 @@ static void writeEtwMacro(QTextStream &stream, const Tracepoint::Field &field)
<< "TraceLoggingValue(" << name << ".width(), \"width\"), "
<< "TraceLoggingValue(" << name << ".height(), \"height\")";
return;
case Tracepoint::Field::QtSize:
stream << "TraceLoggingValue(" << name << ".width(), \"width\"), "
<< "TraceLoggingValue(" << name << ".height(), \"height\")";
return;
case Tracepoint::Field::Pointer:
stream << "TraceLoggingPointer(" << name << ", \"" << name << "\")";
return;

View File

@ -61,6 +61,10 @@ static void writeCtfMacro(QTextStream &stream, const Tracepoint::Field &field)
<< "ctf_integer(int, width, " << name << ".width()) "
<< "ctf_integer(int, height, " << name << ".height()) ";
return;
case Tracepoint::Field::QtSize:
stream << "ctf_integer(int, width, " << name << ".width()) "
<< "ctf_integer(int, height, " << name << ".height()) ";
return;
case Tracepoint::Field::Unknown:
justified_worry("Cannot deduce CTF type for '%s %s'", qPrintable(paramType),
qPrintable(name));

View File

@ -134,7 +134,8 @@ static Tracepoint::Field::BackendType backendType(QString rawType)
{ "QString", Tracepoint::Field::QtString },
{ "QByteArray", Tracepoint::Field::QtByteArray },
{ "QUrl", Tracepoint::Field::QtUrl },
{ "QRect", Tracepoint::Field::QtRect }
{ "QRect", Tracepoint::Field::QtRect },
{ "QSize", Tracepoint::Field::QtSize }
};
auto backendType = [](const QString &rawType) {

View File

@ -32,6 +32,7 @@ struct Tracepoint
QtByteArray,
QtUrl,
QtRect,
QtSize,
Unknown
};