QLatin1StringView: put qstringfwd.h in control of Q_L1S_VIEW_IS_PRIMARY

Less duplication, matches what we do for q_no_char8_t namespaces, too.

Amends 94addad4dd1c89df9c6820d34b9a90424456c492.

Pick-to: 6.8 6.5
Change-Id: I5d98babcb66d1196d3aed31c33289a1b11212a3d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 2d2ee569421338dbc07a479a7df2531bd37f0ebe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-12-12 11:49:20 +01:00 committed by Qt Cherry-pick Bot
parent 137da0326a
commit 1f0dc7635e
2 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@
#include <QtCore/qcontainerfwd.h>
#include <QtCore/qnamespace.h>
#include <QtCore/qtversionchecks.h>
#include <QtCore/qstringfwd.h>
#include <QtCore/qstringview.h>
#if 0
@ -24,8 +25,7 @@ QT_BEGIN_NAMESPACE
class QString;
#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_QDOC)
# define Q_L1S_VIEW_IS_PRIMARY
#ifdef Q_L1S_VIEW_IS_PRIMARY
class QLatin1StringView
#else
class QLatin1String

View File

@ -28,6 +28,7 @@ QT_END_NO_CHAR8_T_NAMESPACE
class QByteArray;
class QByteArrayView;
#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_QDOC)
# define Q_L1S_VIEW_IS_PRIMARY
class QLatin1StringView;
using QLatin1String = QLatin1StringView;
#else