Fix build with -trace lttng

Fix superfluous space in qtgui.tracepoints and make tracegen more
lenient towards unknown types (the ETW implementation outright ignores
those).

Pick-to: 5.15
Fixes: QTBUG-86546
Change-Id: I71cc323afa1009dbaefe20e55818ecb6c0b09c59
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
This commit is contained in:
Joerg Bornemann 2020-09-10 15:43:22 +02:00
parent 37e7c3c116
commit 756c65d367
4 changed files with 17 additions and 2 deletions

View File

@ -27,7 +27,7 @@ QImage_scaledToHeight_entry(int h, Qt::TransformationMode mode)
QImage_scaledToHeight_exit()
QImage_rgbSwapped_helper_entry()
QImage_rgbSwapped_helper_exit()
QImage_transformed_entry(const QTransform &matrix, Qt::TransformationMode mode )
QImage_transformed_entry(const QTransform &matrix, Qt::TransformationMode mode)
QImage_transformed_exit()
QPixmap_scaled_entry(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::TransformationMode mode)

View File

@ -98,7 +98,8 @@ static void writeCtfMacro(QTextStream &stream, const Tracepoint::Field &field)
<< "ctf_integer(int, height, " << name << ".height()) ";
return;
case Tracepoint::Field::Unknown:
panic("Cannot deduce CTF type for '%s %s", qPrintable(paramType), qPrintable(name));
justified_worry("Cannot deduce CTF type for '%s %s'", qPrintable(paramType),
qPrintable(name));
break;
}
}

View File

@ -57,3 +57,16 @@ void panic(const char *fmt, ...)
exit(EXIT_FAILURE);
}
void justified_worry(const char *fmt, ...)
{
va_list ap;
fprintf(stderr, "tracegen: warning: ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
fputc('\n', stderr);
}

View File

@ -41,5 +41,6 @@
#define PANIC_H
void panic(const char *fmt, ...);
void justified_worry(const char *fmt, ...);
#endif // PANIC_H