diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-04-11 15:31:36 +0200 |
---|---|---|
committer | Michael BrĂ¼ning <michael.bruning@theqtcompany.com> | 2016-04-18 13:10:09 +0000 |
commit | 7d172fcf39fa2a5d7d5202f20c599eb678f6cb58 (patch) | |
tree | 98ece282fa13332cc52352b65f941126f0fc88d5 /src/webenginewidgets/api/qwebenginepage.cpp | |
parent | ee2b1e71a80f88de90a03e10a89ba491ef99d308 (diff) |
Update spellchecker APIs
* marks new properties in QQuickWebEngineProfile as FINAL
* removes QT_NO_SPELLCHECK from API headers
* renames spellCheckLanguages() to availableDictionaries()
* removes "togle spellcheck" methods and actions
* use WEBENGINE_CONFIG instead of CONFIG for disable the feature at
compile time: WEBENGINE_CONFIG+=no_spellcheck
Done-With: Peter Varga <pvarga@inf.u-szeged.hu>
Task-number: QTBUG-52371
Change-Id: I8c8eff497b9e7afe0cec2edc97dec248151487f2
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 00dffa3a2..8ba6c8770 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -896,11 +896,6 @@ QAction *QWebEnginePage::action(WebAction action) const case SavePage: text = tr("Save &Page"); break; -#if !defined(QT_NO_SPELLCHECK) - case ToggleSpellcheck: - text = tr("Check Spelling"); - break; -#endif default: break; } @@ -1089,17 +1084,11 @@ void QWebEnginePage::triggerAction(WebAction action, bool) case SavePage: d->adapter->save(); break; -#if !defined(QT_NO_SPELLCHECK) - case ToggleSpellcheck: - d->adapter->toogleSpellCheckEnabled(); - break; -#endif default: Q_UNREACHABLE(); } } -#if !defined(QT_NO_SPELLCHECK) /*! * \since 5.7 * Replace the current misspelled word with \a replacement. @@ -1115,7 +1104,6 @@ void QWebEnginePage::replaceMisspelledWord(const QString &replacement) Q_D(QWebEnginePage); d->adapter->replaceMisspelling(replacement); } -#endif void QWebEnginePage::findText(const QString &subString, FindFlags options, const QWebEngineCallback<bool> &resultCallback) { @@ -1298,7 +1286,6 @@ QMenu *QWebEnginePage::createStandardContextMenu() QAction *action = 0; const WebEngineContextMenuData &contextMenuData = *d->contextData.d; -#if !defined(QT_NO_SPELLCHECK) if (contextMenuData.isEditable && !contextMenuData.spellCheckerSuggestions.isEmpty()) { QPointer<QWebEnginePage> thisRef(this); for (int i=0; i < contextMenuData.spellCheckerSuggestions.count() && i < 4; i++) { @@ -1310,7 +1297,6 @@ QMenu *QWebEnginePage::createStandardContextMenu() } menu->addSeparator(); } -#endif if (!contextMenuData.linkText.isEmpty() && contextMenuData.linkUrl.isValid()) { action = QWebEnginePage::action(OpenLinkInThisWindow); @@ -1374,15 +1360,6 @@ QMenu *QWebEnginePage::createStandardContextMenu() if (d->isFullScreenMode()) menu->addAction(QWebEnginePage::action(ExitFullScreen)); -#if !defined(QT_NO_SPELLCHECK) - if (contextMenuData.isEditable) { - QAction* spellcheckAction(QWebEnginePage::action(ToggleSpellcheck)); - menu->addAction(spellcheckAction); - spellcheckAction->setCheckable(true); - spellcheckAction->setChecked(contextMenuData.isSpellCheckerEnabled); - } -#endif - return menu; } |