Revert "Fix build with -trace lttng"

This reverts commit 756c65d367.

"justified_worry" is an incorrect workaround which attempted to silence
tracegen when invalid types were being used. This caused Qt to compile,
but with broken/invalid tracepoints.

The proper solution involves fixing the tracepoints in question.

Change-Id: I96de254944f0367808527d215e87a5d66bb442f4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Rafael Roquetto 2022-07-28 09:44:12 +10:00 committed by Rafael Roquetto
parent 8539e641f6
commit 42c1e3c334
4 changed files with 2 additions and 17 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

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

View File

@ -21,16 +21,3 @@ 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

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