From 873119210675c0e38e076c46ec3ecabf9d2ed97e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 7 Jul 2021 08:39:54 -0700 Subject: [PATCH] Fix qt_error_string() and QSystemError::string's lack of i18n There are four messages that we, for some reason I don't understand, have our own text for instead of using strerror(). But even though they were marked for extraction, they weren't translated. Fixes: QTBUG-95039 Pick-to: 6.2 Change-Id: I266f1bf9a4d84db39086fffd168f8c6dfe9c2cf4 Reviewed-by: Oswald Buddenhagen --- src/corelib/kernel/qsystemerror.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qsystemerror.cpp b/src/corelib/kernel/qsystemerror.cpp index 3edc7f95f8..4be4874cf1 100644 --- a/src/corelib/kernel/qsystemerror.cpp +++ b/src/corelib/kernel/qsystemerror.cpp @@ -46,6 +46,9 @@ #ifdef Q_OS_WIN # include #endif +#ifndef QT_BOOTSTRAPPED +# include +#endif QT_BEGIN_NAMESPACE @@ -127,9 +130,11 @@ static QString standardLibraryErrorString(int errorCode) break; } } if (s) { - // ######## this breaks moc build currently - // ret = QCoreApplication::translate("QIODevice", s); +#ifndef QT_BOOTSTRAPPED + ret = QCoreApplication::translate("QIODevice", s); +#else ret = QString::fromLatin1(s); +#endif } return ret.trimmed(); }