diff options
-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; |