summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineprofile.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/webengine/api/qquickwebengineprofile.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/webengine/api/qquickwebengineprofile.cpp')
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index 6a4846ddf..871428f33 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -87,8 +87,8 @@ ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::MimeHtmlSaveFormat, QtWebEngineC
register custom URL schemes (QQuickWebEngineProfile::installUrlSchemeHandler).
Spellchecking HTML form fields can be enabled per profile by setting the \l spellCheckEnabled
- property and the current language used for spellchecking can be set by using the
- \l spellCheckLanguage property.
+ property and the current languages used for spellchecking can be set by using the
+ \l spellCheckLanguages property.
*/
/*!
@@ -618,18 +618,18 @@ QQuickWebEngineProfile *QQuickWebEngineProfile::defaultProfile()
}
/*!
- \property QQuickWebEngineProfile::spellCheckLanguage
- \brief the language used by the spell checker.
+ \property QQuickWebEngineProfile::spellCheckLanguages
+ \brief The languages used by the spell checker.
\since QtWebEngine 1.4
*/
/*!
- \qmlproperty QString WebEngineProfile::spellCheckLanguage
+ \qmlproperty list<string> WebEngineProfile::spellCheckLanguages
- This property holds the language used by 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
+ This property holds the list of languages used by 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
@@ -666,24 +666,24 @@ QQuickWebEngineProfile *QQuickWebEngineProfile::defaultProfile()
\since QtWebEngine 1.4
*/
-void QQuickWebEngineProfile::setSpellCheckLanguage(const QString &language)
+void QQuickWebEngineProfile::setSpellCheckLanguages(const QStringList &languages)
{
Q_D(QQuickWebEngineProfile);
- if (language != d->browserContext()->spellCheckLanguage()) {
- d->browserContext()->setSpellCheckLanguage(language);
- emit spellCheckLanguageChanged();
+ if (languages != d->browserContext()->spellCheckLanguages()) {
+ d->browserContext()->setSpellCheckLanguages(languages);
+ emit spellCheckLanguagesChanged();
}
}
/*!
\since 5.8
- Returns the language used by the spell checker.
+ Returns the list of languages used by the spell checker.
*/
-QString QQuickWebEngineProfile::spellCheckLanguage() const
+QStringList QQuickWebEngineProfile::spellCheckLanguages() const
{
const Q_D(QQuickWebEngineProfile);
- return d->browserContext()->spellCheckLanguage();
+ return d->browserContext()->spellCheckLanguages();
}
/*!
@@ -694,7 +694,7 @@ QString QQuickWebEngineProfile::spellCheckLanguage() const
*/
/*!
- \qmlproperty QString WebEngineProfile::spellCheckEnabled
+ \qmlproperty bool WebEngineProfile::spellCheckEnabled
This property holds whether the web engine spell checker is enabled.