From 4713387c052d54e0f5ea02efaeaa25931d1cd7ee Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 8 Oct 2015 23:49:26 +0200 Subject: Add spell checker support Integrate chromium spell checker: * add spellchecker and dependencies to build * underline misspelled words in html text areas * right-click context menu shows up to 4 options to correct the misspelled word * toggle spell check from context menu * add new qml and widget api calls to qwebengineprofile to enable/disable spell check, select spell check language, get list of supported languages/dictionaries * register new qml spell check properties for QtWebEngine 1.3 * CONFIG+="no_spellcheck" to remove spellcheck support Change-Id: Ie61434ab9493597d7759a6f33794f6859c4e3a4c Reviewed-by: Allan Sandfeld Jensen --- src/webengine/ui_delegates_manager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/webengine/ui_delegates_manager.cpp') diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index d819c3321..a82ed0f2e 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -166,7 +166,8 @@ bool UIDelegatesManager::ensureComponentLoaded(ComponentType type) if (!prop.isSignalProperty()) \ qWarning("%s is missing %s signal property.\n", qPrintable(location.toString()), qPrintable(prop.name())); -void UIDelegatesManager::addMenuItem(MenuItemHandler *menuItemHandler, const QString &text, const QString &iconName, bool enabled) +void UIDelegatesManager::addMenuItem(MenuItemHandler *menuItemHandler, const QString &text, const QString &iconName, bool enabled, + bool checkable, bool checked) { Q_ASSERT(menuItemHandler); if (!ensureComponentLoaded(MenuItem)) @@ -176,6 +177,8 @@ void UIDelegatesManager::addMenuItem(MenuItemHandler *menuItemHandler, const QSt QQmlProperty(it, QStringLiteral("text")).write(text); QQmlProperty(it, QStringLiteral("iconName")).write(iconName); QQmlProperty(it, QStringLiteral("enabled")).write(enabled); + QQmlProperty(it, QStringLiteral("checkable")).write(checkable); + QQmlProperty(it, QStringLiteral("checked")).write(checked); QQmlProperty signal(it, QStringLiteral("onTriggered")); CHECK_QML_SIGNAL_PROPERTY(signal, menuItemComponent->url()); -- cgit v1.2.3