From 28d25144280503cf9131b6f9325d1d7f168af8d9 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 9 Mar 2022 22:29:03 +0100 Subject: [PATCH] Use qstringfwd.h when forward declaring string classes Task-number: QTBUG-98434 Change-Id: I37b70a1b7bc164fa7dc9cb702827297ca66a6fdc Reviewed-by: Thiago Macieira --- src/corelib/text/qbytearrayview.h | 4 +--- src/corelib/text/qregularexpression.h | 2 -- src/corelib/text/qutf8stringview.h | 5 +---- src/corelib/tools/qhashfunctions.h | 4 +--- src/testlib/qtestresult_p.h | 4 +--- 5 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/corelib/text/qbytearrayview.h b/src/corelib/text/qbytearrayview.h index 57d4711fdb..8d3ff0be67 100644 --- a/src/corelib/text/qbytearrayview.h +++ b/src/corelib/text/qbytearrayview.h @@ -40,14 +40,12 @@ #define QBYTEARRAYVIEW_H #include +#include #include QT_BEGIN_NAMESPACE -class QByteArray; -class QLatin1String; - namespace QtPrivate { template diff --git a/src/corelib/text/qregularexpression.h b/src/corelib/text/qregularexpression.h index 2d81d0c254..b5fee16057 100644 --- a/src/corelib/text/qregularexpression.h +++ b/src/corelib/text/qregularexpression.h @@ -54,8 +54,6 @@ QT_REQUIRE_CONFIG(regularexpression); QT_BEGIN_NAMESPACE -class QLatin1String; - class QRegularExpressionMatch; class QRegularExpressionMatchIterator; struct QRegularExpressionPrivate; diff --git a/src/corelib/text/qutf8stringview.h b/src/corelib/text/qutf8stringview.h index bec6f96953..76fd86b668 100644 --- a/src/corelib/text/qutf8stringview.h +++ b/src/corelib/text/qutf8stringview.h @@ -40,6 +40,7 @@ #define QUTF8STRINGVIEW_H #include +#include #include // for QContainerImplHelper #include @@ -47,10 +48,6 @@ QT_BEGIN_NAMESPACE -template class QBasicUtf8StringView; -class QByteArray; -class QLatin1String; - namespace QtPrivate { template using IsCompatibleChar8TypeHelper = std::disjunction< diff --git a/src/corelib/tools/qhashfunctions.h b/src/corelib/tools/qhashfunctions.h index a3e1600600..7aecd2c012 100644 --- a/src/corelib/tools/qhashfunctions.h +++ b/src/corelib/tools/qhashfunctions.h @@ -42,6 +42,7 @@ #define QHASHFUNCTIONS_H #include +#include #include #include // for std::accumulate @@ -60,9 +61,6 @@ QT_BEGIN_NAMESPACE class QBitArray; -class QByteArray; -class QString; -class QLatin1String; #if QT_DEPRECATED_SINCE(6,6) QT_DEPRECATED_VERSION_X_6_6("Use QHashSeed instead") diff --git a/src/testlib/qtestresult_p.h b/src/testlib/qtestresult_p.h index 2034c006ad..d4a64e26ab 100644 --- a/src/testlib/qtestresult_p.h +++ b/src/testlib/qtestresult_p.h @@ -52,13 +52,11 @@ // #include +#include #include QT_BEGIN_NAMESPACE -class QLatin1String; -class QStringView; - class QTestResultPrivate; class QTestData;