aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-09-11 12:31:01 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-09-11 15:11:31 +0200
commit15ae3f532b1328c377d9775fbf75dc2647cc016b (patch)
tree1f72ae31759e7f16dbf31926ce440113f08b6e1e
parent252048b9561a7b27e84bf14c84659d6fec96a58b (diff)
Fix Unity build of QtQml
Move the logging categories out of the namespaces, fixing errors like: qtdeclarative/src/qmlls/qqmlformatting.cpp: In function 'const QLoggingCategory& formatLog()': qtdeclarative/src/qmlls/qqmlformatting.cpp:14:13: error: reference to 'QtPrivateLogging' is ambiguous In file included qt-dev/qt-dev/qtdeclarative/src/qmldom/qqmldomitem_p.h:24, qt-dev/build-qt-dev/qtdeclarative/include/QtQmlDom/6.9.0/QtQmlDom/private/qqmldomitem_p.h:1, qt-dev/build-qt-dev/qtdeclarative/src/qmlls/QmlLSPrivate_autogen/EWIEGA46WW/../../../../../../../../..qtdeclarative/src/qmlls/qqmlcodemodel_p.h:25, qt-dev/build-qt-dev/qtdeclarative/src/qmlls/QmlLSPrivate_autogen/EWIEGA46WW/moc_qqmlcodemodel_p.cpp:9, qt-dev/build-qt-dev/qtdeclarative/src/qmlls/QmlLSPrivate_autogen/mocs_compilation.cpp:3, qt-dev/build-qt-dev/qtdeclarative/src/qmlls/CMakeFiles/QmlLSPrivate.dir/Unity/unity_0_cxx.cxx:4: qt-dev/qt-dev/qtdeclarative/src/qmldom/qqmldomerrormessage_p.h:35:11: note: candidates are: 'namespace QQmlJS::Dom::QtPrivateLogging { }' In file included qt-dev/install-qt-dev/include/QtLanguageServer/6.9.0/QtLanguageServer/private/qlanguageservergen_p.h:22, qt-dev/install-qt-dev/include/QtLanguageServer/6.9.0/QtLanguageServer/private/qlanguageserverprotocol_p.h:19, qt-dev/build-qt-dev/qtdeclarative/src/qmlls/QmlLSPrivate_autogen Task-number: QTBUG-115140 Pick-to: 6.8 Change-Id: Ia21dce6cc37e8b8a9cced6cb6e267125dba0df9f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--src/qmldom/qqmldomerrormessage.cpp4
-rw-r--r--src/qmldom/qqmldomerrormessage_p.h4
-rw-r--r--src/qmldom/qqmldomitem.cpp6
-rw-r--r--src/qmldom/qqmldomitem_p.h4
4 files changed, 9 insertions, 9 deletions
diff --git a/src/qmldom/qqmldomerrormessage.cpp b/src/qmldom/qqmldomerrormessage.cpp
index b48702822f..5241c2ee41 100644
--- a/src/qmldom/qqmldomerrormessage.cpp
+++ b/src/qmldom/qqmldomerrormessage.cpp
@@ -10,11 +10,11 @@
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(domLog, "qt.qmldom", QtWarningMsg);
+
namespace QQmlJS {
namespace Dom {
-Q_LOGGING_CATEGORY(domLog, "qt.qmldom", QtWarningMsg);
-
enum {
FatalMsgMaxLen=511
};
diff --git a/src/qmldom/qqmldomerrormessage_p.h b/src/qmldom/qqmldomerrormessage_p.h
index 20e2d817e0..28e319670c 100644
--- a/src/qmldom/qqmldomerrormessage_p.h
+++ b/src/qmldom/qqmldomerrormessage_p.h
@@ -29,11 +29,11 @@
QT_BEGIN_NAMESPACE
+Q_DECLARE_LOGGING_CATEGORY(domLog);
+
namespace QQmlJS {
namespace Dom {
-Q_DECLARE_LOGGING_CATEGORY(domLog);
-
QMLDOM_EXPORT ErrorLevel errorLevelFromQtMsgType(QtMsgType msgType);
class ErrorGroups;
diff --git a/src/qmldom/qqmldomitem.cpp b/src/qmldom/qqmldomitem.cpp
index 8e4f8acd40..319e392277 100644
--- a/src/qmldom/qqmldomitem.cpp
+++ b/src/qmldom/qqmldomitem.cpp
@@ -43,12 +43,12 @@
QT_BEGIN_NAMESPACE
-namespace QQmlJS {
-namespace Dom {
-
Q_LOGGING_CATEGORY(writeOutLog, "qt.qmldom.writeOut", QtWarningMsg);
Q_STATIC_LOGGING_CATEGORY(refLog, "qt.qmldom.ref", QtWarningMsg);
+namespace QQmlJS {
+namespace Dom {
+
template<class... TypeList>
struct CheckDomElementT;
diff --git a/src/qmldom/qqmldomitem_p.h b/src/qmldom/qqmldomitem_p.h
index 7f96853583..6291101f97 100644
--- a/src/qmldom/qqmldomitem_p.h
+++ b/src/qmldom/qqmldomitem_p.h
@@ -50,14 +50,14 @@
QT_BEGIN_NAMESPACE
+QT_DECLARE_EXPORTED_QT_LOGGING_CATEGORY(writeOutLog, QMLDOM_EXPORT);
+
namespace QQmlJS {
// we didn't have enough 'O's to properly name everything...
namespace Dom {
class Path;
-QT_DECLARE_EXPORTED_QT_LOGGING_CATEGORY(writeOutLog, QMLDOM_EXPORT);
-
constexpr bool domTypeIsObjWrap(DomType k);
constexpr bool domTypeIsValueWrap(DomType k);
constexpr bool domTypeIsDomElement(DomType);