diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-07-28 15:01:41 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-03-16 15:19:03 +0100 |
commit | 807a2c8ba7d8ae7116872dabb82aa34ada025e67 (patch) | |
tree | c6ab593109c3ab4204084f3cda6e5dea1edcc3cd | |
parent | fcc58cc405d0e68d7b7ee56e100a13ee0203d634 (diff) | |
download | qtwebengine-chromium-807a2c8ba7d8ae7116872dabb82aa34ada025e67.tar.gz |
<chromium> Add a hook to provide our own icu data file path
Qt will always use QLibraryInfo to determine where this file was
installed, regardless of the platform.
Change-Id: I79374655356d872b2bc766ec8a33fcba343e9c95
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
-rw-r--r-- | chromium/base/base_paths.h | 2 | ||||
-rw-r--r-- | chromium/base/i18n/icu_util.cc | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/chromium/base/base_paths.h b/chromium/base/base_paths.h index 55043361821..ca36027dda6 100644 --- a/chromium/base/base_paths.h +++ b/chromium/base/base_paths.h @@ -47,6 +47,8 @@ enum BasePathKey { DIR_TEST_DATA, // Used only for testing. + DIR_QT_LIBRARY_DATA, + PATH_END }; diff --git a/chromium/base/i18n/icu_util.cc b/chromium/base/i18n/icu_util.cc index 5a77011b5c0..1c25d1c57b7 100644 --- a/chromium/base/i18n/icu_util.cc +++ b/chromium/base/i18n/icu_util.cc @@ -142,8 +142,13 @@ std::unique_ptr<PfRegion> OpenIcuDataFile(const std::string& filename, return result; } #endif // defined(OS_ANDROID) +#if defined(TOOLKIT_QT) + FilePath data_path; + bool path_ok = PathService::Get(base::DIR_QT_LIBRARY_DATA, &data_path); + DCHECK(path_ok); + data_path = data_path.AppendASCII(kIcuDataFileName); +#elif !defined(OS_APPLE) // For unit tests, data file is located on disk, so try there as a fallback. -#if !defined(OS_APPLE) FilePath data_path; if (!PathService::Get(DIR_ASSETS, &data_path)) { LOG(ERROR) << "Can't find " << filename; |