mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 13:14:48 +08:00
72 lines
2.6 KiB
Diff
72 lines
2.6 KiB
Diff
From eda6a3559b303c9e13d755efd4af17fbe2ac9c95 Mon Sep 17 00:00:00 2001
|
|
From: Kai Koehne <kai.koehne@theqtcompany.com>
|
|
Date: Thu, 18 Feb 2016 08:35:48 +0100
|
|
Subject: ICU: Do not try to search for icudtl.dat for
|
|
WEBENGINE_CONFIG+=system_icu
|
|
|
|
Do not try to find icudt.dat if we use system ICU. This
|
|
avoids warnings like
|
|
|
|
Qt WebEngine ICU data not found at /usr/share/qt5/resources. Trying parent directory...
|
|
Qt WebEngine ICU data not found at /usr/share/qt5. Trying application directory...
|
|
Qt WebEngine ICU data not found at /bin. Trying fallback directory... The application MAY NOT work.
|
|
|
|
on every startup, e.g. for embedded linux. The defines and macros
|
|
are the same as in chromium.
|
|
|
|
Task-number: QTBUG-51156
|
|
Change-Id: I6c24b73cca88020504489695e889f49c5d7be424
|
|
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
|
|
---
|
|
src/core/content_main_delegate_qt.cpp | 7 +++++++
|
|
src/core/qtwebengine.gypi | 11 +++++++++++
|
|
2 files changed, 18 insertions(+)
|
|
|
|
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
|
|
index 0688fb0..0a72338 100644
|
|
--- a/src/core/content_main_delegate_qt.cpp
|
|
+++ b/src/core/content_main_delegate_qt.cpp
|
|
@@ -94,10 +94,17 @@ content::ContentRendererClient *ContentMainDelegateQt::CreateContentRendererClie
|
|
return new ContentRendererClientQt;
|
|
}
|
|
|
|
+// see icu_util.cc
|
|
+#define ICU_UTIL_DATA_FILE 0
|
|
+#define ICU_UTIL_DATA_SHARED 1
|
|
+#define ICU_UTIL_DATA_STATIC 2
|
|
+
|
|
bool ContentMainDelegateQt::BasicStartupComplete(int *exit_code)
|
|
{
|
|
PathService::Override(base::FILE_EXE, WebEngineLibraryInfo::getPath(base::FILE_EXE));
|
|
+#if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
|
|
PathService::Override(base::DIR_QT_LIBRARY_DATA, WebEngineLibraryInfo::getPath(base::DIR_QT_LIBRARY_DATA));
|
|
+#endif
|
|
PathService::Override(content::DIR_MEDIA_LIBS, WebEngineLibraryInfo::getPath(content::DIR_MEDIA_LIBS));
|
|
PathService::Override(ui::DIR_LOCALES, WebEngineLibraryInfo::getPath(ui::DIR_LOCALES));
|
|
|
|
diff --git a/src/core/qtwebengine.gypi b/src/core/qtwebengine.gypi
|
|
index 96b48e2..fc5f172 100644
|
|
--- a/src/core/qtwebengine.gypi
|
|
+++ b/src/core/qtwebengine.gypi
|
|
@@ -119,5 +119,16 @@
|
|
['OS=="mac"', {
|
|
'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
|
|
}],
|
|
+ ['icu_use_data_file_flag==1', {
|
|
+ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
|
|
+ }, { # else icu_use_data_file_flag !=1
|
|
+ 'conditions': [
|
|
+ ['OS=="win"', {
|
|
+ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
|
|
+ }, {
|
|
+ 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
|
|
+ }],
|
|
+ ],
|
|
+ }],
|
|
],
|
|
}
|
|
--
|
|
cgit v0.11.0
|
|
|
|
|