From f9c73e540a0a4a7dcd7dbf0a172b119f16ed7e5f Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 1 Aug 2022 14:02:42 +0200 Subject: [PATCH] Move qt_error_string to qlogging.h qcontainerfwd.h was relying on the forward declaration of QString in qglobal.h, so add the missing forward declaration there. Task-number: QTBUG-99313 Change-Id: Id3ecaed5ce3b64dabb8454647a43d1520d30e713 Reviewed-by: Thiago Macieira Reviewed-by: Qt CI Bot --- src/corelib/global/qglobal.h | 4 ---- src/corelib/global/qlogging.h | 3 +++ src/corelib/tools/qcontainerfwd.h | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 705438cea6..9d482e7107 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -633,10 +633,6 @@ Q_CORE_EXPORT Q_DECL_CONST_FUNCTION bool qSharedBuild() noexcept; # define QT_DEBUG #endif -class QString; -Q_DECL_COLD_FUNCTION -Q_CORE_EXPORT QString qt_error_string(int errorCode = -1); - #ifndef Q_CC_MSVC Q_NORETURN #endif diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h index 871179a65a..b0d8d37a37 100644 --- a/src/corelib/global/qlogging.h +++ b/src/corelib/global/qlogging.h @@ -172,5 +172,8 @@ Q_CORE_EXPORT void qSetMessagePattern(const QString &messagePattern); Q_CORE_EXPORT QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, const QString &buf); +Q_DECL_COLD_FUNCTION +Q_CORE_EXPORT QString qt_error_string(int errorCode = -1); + QT_END_NAMESPACE #endif // QLOGGING_H diff --git a/src/corelib/tools/qcontainerfwd.h b/src/corelib/tools/qcontainerfwd.h index 73e8896472..c8d791f200 100644 --- a/src/corelib/tools/qcontainerfwd.h +++ b/src/corelib/tools/qcontainerfwd.h @@ -27,6 +27,7 @@ template class QSet; template class QStack; template class QVarLengthArray; template class QList; +class QString; #ifndef Q_CLANG_QDOC template using QVector = QList; using QStringList = QList;