Skip to content

Commit

Permalink
QStringView: use qstringfwd.h
Browse files Browse the repository at this point in the history
... instead of fwd-declaring a bunch of stuff manually.

Also move the fake QDoc decalaration of a "class QUtf8StringView"
over.

Pick-to: 6.9 6.8 6.5
Change-Id: I80bc3240d69f69602c127fc0e8fe694dd46765f1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
  • Loading branch information
marcmutz committed Dec 13, 2024
1 parent 5def8ff commit 8404c21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/corelib/text/qstringfwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<false>;
Expand Down
6 changes: 1 addition & 5 deletions src/corelib/text/qstringview.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <QtCore/qcompare.h>
#include <QtCore/qcontainerfwd.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qstringfwd.h>
#include <QtCore/qstringliteral.h>
#include <QtCore/qstringalgorithms.h>

Expand All @@ -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 <typename Char>
Expand Down

0 comments on commit 8404c21

Please sign in to comment.