diff --git a/src/corelib/text/qstringfwd.h b/src/corelib/text/qstringfwd.h index fe5bd4e544e..6d75201f7eb 100644 --- a/src/corelib/text/qstringfwd.h +++ b/src/corelib/text/qstringfwd.h @@ -42,7 +42,9 @@ class QChar; class QRegularExpression; class QRegularExpressionMatch; -#ifndef Q_QDOC +#ifdef Q_QDOC +class QUtf8StringView; +#else // ### Qt 7: remove the non-char8_t version of QUtf8StringView QT_BEGIN_NO_CHAR8_T_NAMESPACE using QUtf8StringView = QBasicUtf8StringView; diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h index 3dcfa3771ab..b050a9aef7c 100644 --- a/src/corelib/text/qstringview.h +++ b/src/corelib/text/qstringview.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -22,13 +23,8 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSString); QT_BEGIN_NAMESPACE -class QString; -class QStringView; class QRegularExpression; class QRegularExpressionMatch; -#ifdef Q_QDOC -class QUtf8StringView; -#endif namespace QtPrivate { template