From 30989b8074891451fcfbb39a9c74aecf48a5a7e5 Mon Sep 17 00:00:00 2001 From: Francisco Boni Date: Tue, 20 Aug 2024 07:58:00 -0300 Subject: [PATCH] Designer, ModelEditor: Scope logging categories to respective namespaces Move the logging category declarations of Designer and ModelEditor plugins into their respective internal namespaces. This change aligns with the approach used in other plugins and addresses potential symbol clashes when building with QTC_STATIC_BUILD under flto. - Scope Q_LOGGING_CATEGORY declaration for Designer to the Designer::Internal namespace - Scope Q_LOGGING_CATEGORY declaration for ModelEditor to the ModelEditor::Internal namespace Fixes: QTCREATORBUG-31458 Change-Id: I27ee3fdf6a649d0daccfcd9780caf57e6c403023 Reviewed-by: Jarek Kobus --- src/plugins/designer/qtcreatorintegration.cpp | 2 ++ src/plugins/modeleditor/modelindexer.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index 3d8362180c2..9abc9382e98 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -62,7 +62,9 @@ #include #include +namespace Designer::Internal { Q_LOGGING_CATEGORY(log, "qtc.designer", QtWarningMsg); +} // namespace Designer::Internal using namespace Designer::Internal; using namespace CPlusPlus; diff --git a/src/plugins/modeleditor/modelindexer.cpp b/src/plugins/modeleditor/modelindexer.cpp index a04baf06b66..391e30441df 100644 --- a/src/plugins/modeleditor/modelindexer.cpp +++ b/src/plugins/modeleditor/modelindexer.cpp @@ -25,13 +25,13 @@ #include #include -Q_LOGGING_CATEGORY(log, "qtc.modeleditor.modelindexer", QtWarningMsg) - using namespace ProjectExplorer; using namespace Utils; namespace ModelEditor::Internal { +Q_LOGGING_CATEGORY(log, "qtc.modeleditor.modelindexer", QtWarningMsg) + class QueuedFile { friend size_t qHash(const QueuedFile &queuedFile);