File: no-icudtl-dat.patch

package info (click to toggle)
qtwebengine-opensource-src 5.11.3%2Bdfsg-2%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,551,988 kB
  • sloc: cpp: 10,064,061; ansic: 3,832,841; asm: 590,489; python: 455,759; xml: 261,729; sh: 90,157; objc: 77,089; perl: 71,296; makefile: 27,041; cs: 23,492; yacc: 14,360; tcl: 12,756; php: 4,714; lex: 4,028; pascal: 3,741; ml: 3,543; ruby: 1,497; lisp: 1,490; awk: 183; csh: 117; sed: 54
file content (44 lines) | stat: -rw-r--r-- 2,215 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Description: Do not check for ICU data file
 quick hack to avoid checking for the nonexistent icudtl.dat and silence the
 resulting warnings - not upstreamable as is because it removes the fallback
 mechanism for the ICU data directory (which is not used in our builds because
 we use the system ICU, which embeds the data statically) completely
Author: Kevin Kofler
Origin: Fedora, http://pkgs.fedoraproject.org/cgit/rpms/qt5-qtwebengine.git/commit/qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch?id=4f844a7b2b6550e1d13c2ea973059eef0abcda99
Forwarded: not-needed
Reviewed-by: Sandro Knauß <hefee@debian.org>
Last-Update: 2018-07-01
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -258,29 +258,12 @@ QString dictionariesPath()
 
 QString icuDataPath()
 {
-    static bool initialized = false;
     static QString potentialResourcesPath =
 #if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
             getResourcesPath(frameworkBundle());
 #else
             QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources");
 #endif
-    if (!initialized) {
-        initialized = true;
-        if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) {
-            qWarning("Qt WebEngine ICU data not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath));
-            potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath);
-        }
-        if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) {
-            qWarning("Qt WebEngine ICU data not found at %s. Trying application directory...", qPrintable(potentialResourcesPath));
-            potentialResourcesPath = QCoreApplication::applicationDirPath();
-        }
-        if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/icudtl.dat"))) {
-            qWarning("Qt WebEngine ICU data not found at %s. Trying fallback directory... The application MAY NOT work.", qPrintable(potentialResourcesPath));
-            potentialResourcesPath = fallbackDir();
-        }
-    }
-
     return potentialResourcesPath;
 }