diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-06-05 09:11:57 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-06-20 10:51:54 +0200 |
commit | fa4bd30caa079a3b1e5eac1bb4f17365f456b8f9 (patch) | |
tree | 608f0d4ced9a7c30e45472a6397010d89944e8df /tests/auto/uic/baseline/batchtranslation.ui | |
parent | 2b1312bc954b72f59d0c1d7b1192e2f029016012 (diff) |
Place Qt logging category symbols in a QtPrivateLogging namespace. This
makes sure that the symbols cannot clash for static builds.
Since Qt-internal logging categories are now different from user logging
categories, we need to provide a special macro to declare them in
headers that may be included in user (or QPA) code.
This causes compile errors in some cases:
1. You cannot have inline logging categories in a header anymore. That
has always been a bad idea, though. You don't want the static member
to be replicated at each usage site.
2. You actually need the new export macro to declare Qt-internal logging
categories for usage in QPA plugins or autotests.
3. You actually need to use the STATIC and EXPORTED variants of the
logging category declarations rather than just prepending 'static' or
the export macro now. There was a reason for introducing them.
4. If you manually define the logging category function, but use a macro
to declare it, you need to adapt. There is one case of this in
qtdeclarative, but you really shouldn't rely on the internals of the
macro to infer what function you need to define.
5. If you have logging categories in multiple namespaces, you need to
define the logging categories before 'using' any of the namespaces.
Otherwise the compiler will not know which QtPrivateLogging namespace
you mean.
GCC before version 10 does not like weak overloads of "using"
declarations. Therefore, we repeat the "using" declaration for these
compilers. We need the weak overloads where we can have them in order
to deprecate non-static logging categories that weren't forward-declared
in the next step.
Fixes: QTBUG-67692
Change-Id: Idb26dadf709378f82046fa5b568f276848134282
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/uic/baseline/batchtranslation.ui')
0 files changed, 0 insertions, 0 deletions