diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index 14fcddce7ca..d21cb9b3638 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -528,7 +528,11 @@ inline void QByteArray::squeeze() } } -class Q_CORE_EXPORT QByteRef { +class +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +Q_CORE_EXPORT +#endif +QByteRef { QByteArray &a; int i; inline QByteRef(QByteArray &array, int idx) diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 9d75b0f357c..1abb91eabe8 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -1044,8 +1044,11 @@ inline QString QString::fromWCharArray(const wchar_t *string, int size) : fromUcs4(reinterpret_cast(string), size); } - -class Q_CORE_EXPORT QCharRef { +class +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +Q_CORE_EXPORT +#endif +QCharRef { QString &s; int i; inline QCharRef(QString &str, int idx)