diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-09-10 15:43:22 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-09-11 11:30:55 +0200 |
commit | 756c65d3676d2b3ce5c7b56145e5f0f7cf7178ad (patch) | |
tree | b16eb8ec1668042a3721f1ee0cfb2a57bc89fc90 /src | |
parent | 37e7c3c11698812f07d8b78c90d0adcffd1d0d33 (diff) | |
download | qtbase-756c65d3676d2b3ce5c7b56145e5f0f7cf7178ad.tar.gz |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/qtgui.tracepoints | 2 | ||||
-rw-r--r-- | src/tools/tracegen/lttng.cpp | 3 | ||||
-rw-r--r-- | src/tools/tracegen/panic.cpp | 13 | ||||
-rw-r--r-- | src/tools/tracegen/panic.h | 1 |
4 files changed, 17 insertions, 2 deletions
diff --git a/src/gui/qtgui.tracepoints b/src/gui/qtgui.tracepoints index 2b09c6a1e2..932115fd97 100644 --- a/src/gui/qtgui.tracepoints +++ b/src/gui/qtgui.tracepoints @@ -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) diff --git a/src/tools/tracegen/lttng.cpp b/src/tools/tracegen/lttng.cpp index 1aef1b3d17..e628fbd680 100644 --- a/src/tools/tracegen/lttng.cpp +++ b/src/tools/tracegen/lttng.cpp @@ -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; } } diff --git a/src/tools/tracegen/panic.cpp b/src/tools/tracegen/panic.cpp index d1e207764e..ac95b2e9e8 100644 --- a/src/tools/tracegen/panic.cpp +++ b/src/tools/tracegen/panic.cpp @@ -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); +} diff --git a/src/tools/tracegen/panic.h b/src/tools/tracegen/panic.h index c6b195af00..58e56c0116 100644 --- a/src/tools/tracegen/panic.h +++ b/src/tools/tracegen/panic.h @@ -41,5 +41,6 @@ #define PANIC_H void panic(const char *fmt, ...); +void justified_worry(const char *fmt, ...); #endif // PANIC_H |