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