From 9b50f20005aae1e7d2e3687ee4750bb4323fe17a Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Date: Wed, 12 Nov 2014 12:09:07 +0100
Subject: [PATCH] windeployqt: Deploy translation files of the QtWebEngine
 module.

Task-number: QTBUG-42083
Change-Id: Ibc52780c52399ba13cfa5c501b67bd37ea727d1f
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
---
 src/windeployqt/main.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp
index c156519be..a1568fa5b 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)
-- 
GitLab