From e63278bb38fc518e1dd7db8a86f689abb8a11b20 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 26 Jan 2023 15:13:02 +0100 Subject: [PATCH] QtCore/QCalendarRegistry: Move helper CaseInsensitiveAnyStringViewLessThan out of anonymous namespace It causes a warning in CMake Unity (Jumbo) builds: src/corelib/time/qcalendar.cpp:46: warning: QtPrivate::QCalendarRegistry has a field QtPrivate::QCalendarRegistry::byName whose type uses the anonymous namespace [-Wsubobject-linkage] Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ie9598c3e87dd835b06cafe5392766bddc258b5ec Reviewed-by: Thiago Macieira --- src/corelib/time/qcalendar.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/corelib/time/qcalendar.cpp b/src/corelib/time/qcalendar.cpp index a6801fe725..5eaecedbbd 100644 --- a/src/corelib/time/qcalendar.cpp +++ b/src/corelib/time/qcalendar.cpp @@ -25,9 +25,8 @@ QT_BEGIN_NAMESPACE -namespace { - -struct CaseInsensitiveAnyStringViewLessThan { +struct QCalendarRegistryCaseInsensitiveAnyStringViewLessThan +{ struct is_transparent {}; bool operator()(QAnyStringView lhs, QAnyStringView rhs) const { @@ -35,8 +34,6 @@ struct CaseInsensitiveAnyStringViewLessThan { } }; -} // unnamed namespace - namespace QtPrivate { /* @@ -70,7 +67,7 @@ class QCalendarRegistry */ QFlatMap< QString, QCalendarBackend *, - CaseInsensitiveAnyStringViewLessThan, + QCalendarRegistryCaseInsensitiveAnyStringViewLessThan, QStringList, std::vector > byName;