diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index c156519be0a5cf06a11f7f456d8a4987bc3b1fed..a1568fa5bb23590e5cc581118d729925e58f9b99 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -1302,7 +1302,16 @@ static bool deployWebEngine(const QMap<QString, QString> &qmakeVariables, return false; } } - return true; + const QFileInfo translations(qmakeVariables.value(QStringLiteral("QT_INSTALL_TRANSLATIONS")) + + QStringLiteral("/qtwebengine_locales")); + if (!translations.isDir()) { + std::wcerr << "Warning: Cannot find the translation files of the QtWebEngine module at " + << QDir::toNativeSeparators(translations.absoluteFilePath()) << '.'; + return true; + } + // Missing translations may cause crashes, ignore --no-translations. + return updateFile(translations.absoluteFilePath(), options.directory, + options.updateFileFlags, options.json, errorMessage); } int main(int argc, char **argv)