diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-06-10 08:15:49 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-06-11 06:44:52 +0000 |
commit | 479c1e5baac753a71e3edb9929654b7e5705cb09 (patch) | |
tree | f6de03e7fa166b15262aa1b67165fde9ef55d4e6 /tests/manual/browser | |
parent | 4f737256c0a698ff3ba380cbaef1ba80a16fc3a8 (diff) |
We should not rely on the internals of Q_LOGGING_CATEGORY to place the
'static' and we should make logging categories static where we can.
Since qlitehtml can be built against multiple versions of Qt, check for
the existence of Q_STATIC_LOGGING_CATEGORY before using it.
Task-number: QTBUG-67692
Change-Id: I75cb38f513a6d09fe3f85f3acc6d1360ed15bb63
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'tests/manual/browser')
-rw-r--r-- | tests/manual/browser/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/manual/browser/main.cpp b/tests/manual/browser/main.cpp index 4b4c7da..4b65480 100644 --- a/tests/manual/browser/main.cpp +++ b/tests/manual/browser/main.cpp @@ -22,7 +22,11 @@ #include <QVBoxLayout> #include <QWidget> -Q_LOGGING_CATEGORY(log, "qlitehtml.browser") +#ifdef Q_STATIC_LOGGING_CATEGORY +Q_STATIC_LOGGING_CATEGORY(log, "qlitehtml.browser") +#else +static Q_LOGGING_CATEGORY(log, "qlitehtml.browser") +#endif class BrowserWindow : public QWidget { |