diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-10-08 13:08:10 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-05-04 21:24:19 +0000 |
commit | 4d5efe889860f910d7d817a37df1ab08e97fa30a (patch) | |
tree | 5f388bf57ba01cb5dc5c375c6b7fcaf34e869be7 | |
parent | b914b484a9be97f0bee0a5525390ec1b2200c077 (diff) |
doc: Add a few more sentences about how it works
Change-Id: I60ce11416216f138802adb8716ae78cf13bdf4c3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r-- | src/trace/qmlmessagetrace.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/trace/qmlmessagetrace.cpp b/src/trace/qmlmessagetrace.cpp index a093e76..98e5a50 100644 --- a/src/trace/qmlmessagetrace.cpp +++ b/src/trace/qmlmessagetrace.cpp @@ -108,10 +108,14 @@ diagram will show that the method called itself. That would be incorrect: the self-call should be reserved to indicate recursion. - The category debug output should not include Q_FUNC_INFO, because that - information is already available in every log message, so including it - again would be redundant. Every qCDebug for tracing class methods should - include \c this as the first parameter. If you include extra information, e.g. + You need to configure Qt with \c {configure -developer-build ...}. (It's ok + to configure with \c {-developer-build -release} if you want it fast enough + for profiling and don't need debug symbols. But then backtraces contain + less information.) Then the category debug output does not need to include + Q_FUNC_INFO, because that information is already available in every log + message, so including it again would be redundant. Instead, every qCDebug + for tracing class methods should include \c this as the first parameter. + If you include extra information, e.g. \code qCDebug(QC_CATEGORY) << this << parameter1 << parameter2 \endcode @@ -119,6 +123,11 @@ the diagram. Typically you should include information about any interesting method parameters; but too much information will make the diagram hard to read. + + \note This only works on glibc platforms (mainly Linux) because the + feature to have backtraces in categorized logging depends on glibc + (see QTBUG-97278). On other platforms, the message trace will only show + a series of the traced function calls in one column, and omit the others. */ /*! |