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

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