summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebengineprofile.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2016-10-18 19:01:16 +0200
committerMichal Klocek <michal.klocek@qt.io>2016-10-29 12:27:42 +0000
commit2fe08ddf9388598003cb3a30f30a2d18ab044969 (patch)
tree287851c5a4e699fe7fd4fd6277c585a50de190b1 /src/webenginewidgets/api/qwebengineprofile.cpp
parent05df6e5f4af76f10a6dc5884c1aa1599a2d7a486 (diff)
Update spellcheck api to support multiple languages
Task-number: QTBUG-56074 Change-Id: I2a66e91dd4ed1026e5ab2539cfd3f9094263b48c Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebengineprofile.cpp')
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index bd41a5126..886a7207e 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -98,8 +98,8 @@ using QtWebEngineCore::BrowserContextAdapter;
QWebEngineUrlSchemeHandler::requestStarted() as QWebEngineUrlRequestJob objects.
Spellchecking HTML form fields can be enabled per profile by using the setSpellCheckEnabled()
- method and the current language used for spellchecking can be set by using the
- setSpellCheckLanguage() method.
+ method and the current languages used for spellchecking can be set by using the
+ setSpellCheckLanguages() method.
*/
@@ -565,9 +565,9 @@ QWebEngineProfile *QWebEngineProfile::defaultProfile()
/*!
\since 5.8
- Sets the current \a language for the spell checker.
- The language should match the name of the \c .bdic dictionary.
- For example, the \a language \c en-US will load the \c en-US.bdic
+ Sets the current list of \a languages for the spell checker.
+ Each language should match the name of the \c .bdic dictionary.
+ For example, the language \c en-US will load the \c en-US.bdic
dictionary file.
Qt WebEngine checks for the \c qtwebengine_dictionaries subdirectory
@@ -603,21 +603,21 @@ QWebEngineProfile *QWebEngineProfile::defaultProfile()
\l{WebEngine Widgets Spellchecker Example}{Spellchecker Example}.
*/
-void QWebEngineProfile::setSpellCheckLanguage(const QString &language)
+void QWebEngineProfile::setSpellCheckLanguages(const QStringList &languages)
{
Q_D(QWebEngineProfile);
- d->browserContext()->setSpellCheckLanguage(language);
+ d->browserContext()->setSpellCheckLanguages(languages);
}
/*!
\since 5.8
- Returns the language used by the spell checker.
+ Returns the list of languages used by the spell checker.
*/
-QString QWebEngineProfile::spellCheckLanguage() const
+QStringList QWebEngineProfile::spellCheckLanguages() const
{
const Q_D(QWebEngineProfile);
- return d->browserContext()->spellCheckLanguage();
+ return d->browserContext()->spellCheckLanguages();
}
/*!