1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include <QtCore/qtconfigmacros.h>
5#include <QtCore/qtversionchecks.h>
6
7#ifndef QSTRINGFWD_H
8#define QSTRINGFWD_H
9
10QT_BEGIN_NAMESPACE
11
12#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
13# define QT_BEGIN_HAS_CHAR8_T_NAMESPACE inline namespace q_has_char8_t {
14# define QT_BEGIN_NO_CHAR8_T_NAMESPACE namespace q_no_char8_t {
15#else
16# define QT_BEGIN_HAS_CHAR8_T_NAMESPACE namespace q_has_char8_t {
17# define QT_BEGIN_NO_CHAR8_T_NAMESPACE inline namespace q_no_char8_t {
18#endif
19#define QT_END_HAS_CHAR8_T_NAMESPACE }
20#define QT_END_NO_CHAR8_T_NAMESPACE }
21
22// declare namespaces:
23QT_BEGIN_HAS_CHAR8_T_NAMESPACE
24QT_END_HAS_CHAR8_T_NAMESPACE
25QT_BEGIN_NO_CHAR8_T_NAMESPACE
26QT_END_NO_CHAR8_T_NAMESPACE
27
28class QByteArray;
29class QByteArrayView;
30#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_QDOC)
31# define Q_L1S_VIEW_IS_PRIMARY
32class QLatin1StringView;
33using QLatin1String = QLatin1StringView;
34#else
35class QLatin1String;
36using QLatin1StringView = QLatin1String;
37#endif
38class QString;
39class QStringRef; // defined in qt5compat
40class QStringView;
41template <bool> class QBasicUtf8StringView;
42class QAnyStringView;
43class QChar;
44class QRegularExpression;
45class QRegularExpressionMatch;
46
47#ifdef Q_QDOC
48class QUtf8StringView;
49#else
50// ### Qt 7: remove the non-char8_t version of QUtf8StringView
51QT_BEGIN_NO_CHAR8_T_NAMESPACE
52using QUtf8StringView = QBasicUtf8StringView<false>;
53QT_END_NO_CHAR8_T_NAMESPACE
54
55QT_BEGIN_HAS_CHAR8_T_NAMESPACE
56using QUtf8StringView = QBasicUtf8StringView<true>;
57QT_END_HAS_CHAR8_T_NAMESPACE
58#endif // Q_QDOC
59
60QT_END_NAMESPACE
61
62#endif // QSTRINGFWD_H
63

source code of qtbase/src/corelib/text/qstringfwd.h