diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-09-09 17:09:42 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-10-17 16:38:34 +0000 |
commit | 7b7c9cb4183651b496501e89deb497490199b320 (patch) | |
tree | 8f75ba32ab826cfd5c1d689c24ca88f20520c50f /src/core/content_browser_client_qt.cpp | |
parent | 1eb814230515ffb3417e0ac9533fc24847c1ebb9 (diff) |
Fix spellchecking for macOS
The change fixes spellchecking to work on macOS.
A new WebEngine configure option is available to allow spellchecking on
macOS to use either Hunspell like the other platforms, or the native
spellchecker that comes with the OS. The default is to use Hunspell.
Task-number: QTBUG-53135
Change-Id: I3e45b2e0d728b1bf2659c35f3d0a042b0ecd6239
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/content_browser_client_qt.cpp')
-rw-r--r-- | src/core/content_browser_client_qt.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 64964dc09..a57c3b00f 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -44,6 +44,9 @@ #include "base/threading/thread_restrictions.h" #if defined(ENABLE_SPELLCHECK) #include "chrome/browser/spellchecker/spellcheck_message_filter.h" +#if defined(USE_BROWSER_SPELLCHECKER) +#include "chrome/browser/spellchecker/spellcheck_message_filter_platform.h" +#endif #endif #include "content/browser/renderer_host/render_view_host_delegate.h" #include "content/public/browser/browser_main_parts.h" @@ -377,8 +380,12 @@ void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost* host->AddFilter(new BrowserMessageFilterQt(id)); #endif #if defined(ENABLE_SPELLCHECK) + // SpellCheckMessageFilter is required for both Hunspell and Native configurations. host->AddFilter(new SpellCheckMessageFilter(id)); #endif +#if defined(Q_OS_MACOS) && defined(USE_BROWSER_SPELLCHECKER) + host->AddFilter(new SpellCheckMessageFilterPlatform(id)); +#endif #if defined(ENABLE_BASIC_PRINTING) host->AddFilter(new PrintingMessageFilterQt(host->GetID())); #endif // defined(ENABLE_BASIC_PRINTING) |