From 3483f8d26c4a6066624d99c28c05bbe31856c302 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Fri, 1 Jul 2022 16:51:26 +0200 Subject: [PATCH] Remove QStringView metatype declaration It was required back in Qt 5 times, so that we could use qvariant_cast<> or QVariant.value() on it. Not required in Qt 6 anymore. As a drive-by: cleanup some unneeded includes in qstringview.cpp Task-number: QTBUG-102350 Change-Id: Idbcdc5cfe62cf4a55b86e227106d7a997997e0ba Reviewed-by: Fabian Kosmale Reviewed-by: Thiago Macieira (cherry picked from commit 593b0a01c574e969168062011607b389eab5b983) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/text/qlocale.cpp | 1 - src/corelib/text/qlocale_p.h | 2 -- src/corelib/text/qstringview.cpp | 2 -- 3 files changed, 5 deletions(-) diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index d88c53cf004..0b229c97b43 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -48,7 +48,6 @@ QT_WARNING_DISABLE_GCC("-Wfree-nonheap-object") // false positive tracking QT_BEGIN_NAMESPACE -QT_IMPL_METATYPE_EXTERN(QStringView) QT_IMPL_METATYPE_EXTERN_TAGGED(QList, QList_Qt__DayOfWeek) #ifndef QT_NO_SYSTEMLOCALE QT_IMPL_METATYPE_EXTERN_TAGGED(QSystemLocale::CurrencyToStringArgument, diff --git a/src/corelib/text/qlocale_p.h b/src/corelib/text/qlocale_p.h index 2ec779bff69..beec496d442 100644 --- a/src/corelib/text/qlocale_p.h +++ b/src/corelib/text/qlocale_p.h @@ -494,8 +494,6 @@ enum { AsciiSpaceMask = (1u << (' ' - 1)) | QT_END_NAMESPACE -// ### move to qstringview.h -QT_DECL_METATYPE_EXTERN(QStringView, Q_CORE_EXPORT) // ### move to qnamespace.h QT_DECL_METATYPE_EXTERN_TAGGED(QList, QList_Qt__DayOfWeek, Q_CORE_EXPORT) #ifndef QT_NO_SYSTEMLOCALE diff --git a/src/corelib/text/qstringview.cpp b/src/corelib/text/qstringview.cpp index ba171360072..c13b51b4933 100644 --- a/src/corelib/text/qstringview.cpp +++ b/src/corelib/text/qstringview.cpp @@ -2,8 +2,6 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qstringview.h" -#include "qstring.h" -#include "qlocale_p.h" QT_BEGIN_NAMESPACE