summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineprofile.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2016-09-09 17:09:42 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2016-10-17 16:38:34 +0000
commit7b7c9cb4183651b496501e89deb497490199b320 (patch)
tree8f75ba32ab826cfd5c1d689c24ca88f20520c50f /src/webengine/api/qquickwebengineprofile.cpp
parent1eb814230515ffb3417e0ac9533fc24847c1ebb9 (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/webengine/api/qquickwebengineprofile.cpp')
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index 1ca97adea..6a4846ddf 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -632,13 +632,33 @@ QQuickWebEngineProfile *QQuickWebEngineProfile::defaultProfile()
For example, the \a language \c en-US will load the \c en-US.bdic
dictionary file.
- The web engine checks for the \c qtwebengine_dictionaries subdirectory
- first in the local directory and if it is not found in the Qt
- installation directory:
+ Qt WebEngine checks for the \c qtwebengine_dictionaries subdirectory
+ first in the local directory and if it is not found, in the Qt
+ installation directory.
+
+ On macOS, depending on how Qt WebEngine is configured at build time, there are two possibilities
+ how spellchecking data is found:
+
+ \list
+ \li Hunspell dictionaries (default) - .bdic dictionaries are used, just like on other
+ platforms
+ \li Native dictionaries - the macOS spellchecking APIs are used (which means the results
+ will depend on the installed OS dictionaries)
+ \endlist
+
+ Thus, in the macOS Hunspell case, Qt WebEngine will look in the \e qtwebengine_dictionaries
+ subdirectory located inside the application bundle \c Resources directory, and also in the
+ \c Resources directory located inside the Qt framework bundle.
+
+ To summarize, in case of Hunspell usage, the following paths are considered:
\list
\li QCoreApplication::applicationDirPath()/qtwebengine_dictionaries
+ or QCoreApplication::applicationDirPath()/../Contents/Resources/qtwebengine_dictionaries
+ (on macOS)
\li [QLibraryInfo::DataPath]/qtwebengine_dictionaries
+ or path/to/QtWebEngineCore.framework/Resources/qtwebengine_dictionaries (Qt framework
+ bundle on macOS)
\endlist
For more information about how to compile \c .bdic dictionaries, see the