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 | |
10 | QT_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: |
23 | QT_BEGIN_HAS_CHAR8_T_NAMESPACE |
24 | QT_END_HAS_CHAR8_T_NAMESPACE |
25 | QT_BEGIN_NO_CHAR8_T_NAMESPACE |
26 | QT_END_NO_CHAR8_T_NAMESPACE |
27 | |
28 | class QByteArray; |
29 | class QByteArrayView; |
30 | #if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_QDOC) |
31 | # define Q_L1S_VIEW_IS_PRIMARY |
32 | class QLatin1StringView; |
33 | using QLatin1String = QLatin1StringView; |
34 | #else |
35 | class QLatin1String; |
36 | using QLatin1StringView = QLatin1String; |
37 | #endif |
38 | class QString; |
39 | class QStringRef; // defined in qt5compat |
40 | class QStringView; |
41 | template <bool> class QBasicUtf8StringView; |
42 | class QAnyStringView; |
43 | class QChar; |
44 | class QRegularExpression; |
45 | class QRegularExpressionMatch; |
46 | |
47 | #ifdef Q_QDOC |
48 | class QUtf8StringView; |
49 | #else |
50 | // ### Qt 7: remove the non-char8_t version of QUtf8StringView |
51 | QT_BEGIN_NO_CHAR8_T_NAMESPACE |
52 | using QUtf8StringView = QBasicUtf8StringView<false>; |
53 | QT_END_NO_CHAR8_T_NAMESPACE |
54 | |
55 | QT_BEGIN_HAS_CHAR8_T_NAMESPACE |
56 | using QUtf8StringView = QBasicUtf8StringView<true>; |
57 | QT_END_HAS_CHAR8_T_NAMESPACE |
58 | #endif // Q_QDOC |
59 | |
60 | QT_END_NAMESPACE |
61 | |
62 | #endif // QSTRINGFWD_H |
63 |