diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-08-01 11:33:04 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-08-05 18:28:12 +0000 |
commit | 521c3f6c47e3e7e284eaaca40c1820fbcb1b56e0 (patch) | |
tree | 507991191b2b16fffacbfd070aef1f370d12cd9c /src/core/browser_context_qt.cpp | |
parent | 179463fd2b17343dae291ab6f7617311bcfbdb75 (diff) |
Make UserPrefs available without spell-checking
Autofill and other components also need user preferences, so make it
included by default.
Change-Id: Id63241b2239451456ca8a8e1cd9771df4d48b8b8
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/core/browser_context_qt.cpp')
-rw-r--r-- | src/core/browser_context_qt.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp index 7ca1c6477..42993207d 100644 --- a/src/core/browser_context_qt.cpp +++ b/src/core/browser_context_qt.cpp @@ -54,7 +54,6 @@ #include "content/public/browser/storage_partition.h" #include "net/proxy/proxy_config_service.h" -#if defined(ENABLE_SPELLCHECK) #include "base/base_paths.h" #include "components/prefs/pref_member.h" #include "components/prefs/pref_service.h" @@ -63,13 +62,13 @@ #include "components/prefs/pref_service_factory.h" #include "components/prefs/pref_registry_simple.h" #include "components/user_prefs/user_prefs.h" +#if defined(ENABLE_SPELLCHECK) #include "chrome/common/pref_names.h" #include "chrome/browser/spellchecker/spellcheck_service.h" #endif namespace QtWebEngineCore { -#if defined(ENABLE_SPELLCHECK) BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter) : m_adapter(adapter), m_prefStore(new TestingPrefStore()) @@ -79,6 +78,7 @@ BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter) factory.set_user_prefs(m_prefStore); scoped_refptr<PrefRegistrySimple> registry(new PrefRegistrySimple()); +#if defined(ENABLE_SPELLCHECK) // Initial spellcheck settings registry->RegisterListPref(prefs::kSpellCheckDictionaries, new base::ListValue()); registry->RegisterStringPref(prefs::kAcceptLanguages, std::string()); @@ -86,15 +86,10 @@ BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter) registry->RegisterBooleanPref(prefs::kSpellCheckUseSpellingService, false); registry->RegisterBooleanPref(prefs::kEnableContinuousSpellcheck, false); registry->RegisterBooleanPref(prefs::kEnableAutoSpellCorrect, false); +#endif //ENABLE_SPELLCHECK m_prefService = factory.Create(std::move(registry.get())); user_prefs::UserPrefs::Set(this, m_prefService.get()); } -#else -BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter) - : m_adapter(adapter) -{ -} -#endif //ENABLE_SPELLCHECK BrowserContextQt::~BrowserContextQt() { |