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 <jaroslaw.kobus@qt.io>
This commit is contained in:
Francisco Boni
2024-08-20 07:58:00 -03:00
parent 2b2256b1c9
commit 30989b8074
2 changed files with 4 additions and 2 deletions

View File

@@ -62,7 +62,9 @@
#include <memory> #include <memory>
#include <optional> #include <optional>
namespace Designer::Internal {
Q_LOGGING_CATEGORY(log, "qtc.designer", QtWarningMsg); Q_LOGGING_CATEGORY(log, "qtc.designer", QtWarningMsg);
} // namespace Designer::Internal
using namespace Designer::Internal; using namespace Designer::Internal;
using namespace CPlusPlus; using namespace CPlusPlus;

View File

@@ -25,13 +25,13 @@
#include <QLoggingCategory> #include <QLoggingCategory>
#include <QPointer> #include <QPointer>
Q_LOGGING_CATEGORY(log, "qtc.modeleditor.modelindexer", QtWarningMsg)
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;
namespace ModelEditor::Internal { namespace ModelEditor::Internal {
Q_LOGGING_CATEGORY(log, "qtc.modeleditor.modelindexer", QtWarningMsg)
class QueuedFile class QueuedFile
{ {
friend size_t qHash(const QueuedFile &queuedFile); friend size_t qHash(const QueuedFile &queuedFile);