diff options
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r-- | src/webenginewidgets/api/qwebenginecontextmenudata.cpp | 20 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginecontextmenudata.h | 2 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 28 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.h | 2 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.cpp | 61 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.h | 5 |
6 files changed, 0 insertions, 118 deletions
diff --git a/src/webenginewidgets/api/qwebenginecontextmenudata.cpp b/src/webenginewidgets/api/qwebenginecontextmenudata.cpp index 17a562ea1..c7019977b 100644 --- a/src/webenginewidgets/api/qwebenginecontextmenudata.cpp +++ b/src/webenginewidgets/api/qwebenginecontextmenudata.cpp @@ -187,26 +187,6 @@ bool QWebEngineContextMenuData::isContentEditable() const } /*! - If the context is a word considered misspelled by the spell-checker, returns the misspelled word. -*/ -QString QWebEngineContextMenuData::misspelledWord() const -{ - if (d) - return d->misspelledWord; - return QString(); -} - -/*! - If the context is a word considered misspelled by the spell-checker, returns a list of suggested replacements. -*/ -QStringList QWebEngineContextMenuData::spellCheckerSuggestions() const -{ - if (d) - return d->spellCheckerSuggestions; - return QStringList(); -} - -/*! \internal */ QWebEngineContextMenuData &QWebEngineContextMenuData::operator=(const QWebEngineContextDataPrivate &priv) diff --git a/src/webenginewidgets/api/qwebenginecontextmenudata.h b/src/webenginewidgets/api/qwebenginecontextmenudata.h index fd1080eec..4bea34ee0 100644 --- a/src/webenginewidgets/api/qwebenginecontextmenudata.h +++ b/src/webenginewidgets/api/qwebenginecontextmenudata.h @@ -76,8 +76,6 @@ public: QUrl mediaUrl() const; MediaType mediaType() const; bool isContentEditable() const; - QString misspelledWord() const; - QStringList spellCheckerSuggestions() const; private: void reset(); diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index e41271471..0e7f02f16 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -1098,22 +1098,6 @@ void QWebEnginePage::triggerAction(WebAction action, bool) } } -/*! - * \since 5.7 - * Replace the current misspelled word with \a replacement. - * - * The current misspelled word can be found in QWebEngineContextMenuData::misspelledWord(), - * and suggested replacements in QWebEngineContextMenuData::spellCheckerSuggestions(). - * - * \sa contextMenuData(), - */ - -void QWebEnginePage::replaceMisspelledWord(const QString &replacement) -{ - Q_D(QWebEnginePage); - d->adapter->replaceMisspelling(replacement); -} - void QWebEnginePage::findText(const QString &subString, FindFlags options, const QWebEngineCallback<bool> &resultCallback) { Q_D(QWebEnginePage); @@ -1292,18 +1276,6 @@ QMenu *QWebEnginePage::createStandardContextMenu() QAction *action = 0; const WebEngineContextMenuData &contextMenuData = *d->contextData.d; - if (contextMenuData.isEditable && !contextMenuData.spellCheckerSuggestions.isEmpty()) { - QPointer<QWebEnginePage> thisRef(this); - for (int i=0; i < contextMenuData.spellCheckerSuggestions.count() && i < 4; i++) { - QAction *action = new QAction(menu); - QString replacement = contextMenuData.spellCheckerSuggestions.at(i); - QObject::connect(action, &QAction::triggered, [thisRef, replacement] { if (thisRef) thisRef->replaceMisspelledWord(replacement); }); - action->setText(replacement); - menu->addAction(action); - } - menu->addSeparator(); - } - if (!contextMenuData.linkText.isEmpty() && contextMenuData.linkUrl.isValid()) { action = QWebEnginePage::action(OpenLinkInThisWindow); action->setText(tr("Follow Link")); diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h index 7b99270c0..0c6450d20 100644 --- a/src/webenginewidgets/api/qwebenginepage.h +++ b/src/webenginewidgets/api/qwebenginepage.h @@ -206,8 +206,6 @@ public: #endif virtual void triggerAction(WebAction action, bool checked = false); - void replaceMisspelledWord(const QString &replacement); - virtual bool event(QEvent*); #ifdef Q_QDOC void findText(const QString &subString, FindFlags options = 0); diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index 361a60944..664323034 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -556,67 +556,6 @@ QWebEngineProfile *QWebEngineProfile::defaultProfile() } /*! - \since 5.7 - - 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 - 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: - - \list - \li QCoreApplication::applicationDirPath()/qtwebengine_dictionaries - \li [QLibraryInfo::DataPath]/qtwebengine_dictionaries - \endlist - - For more information about how to compile \c .bdic dictionaries, see the - \l{WebEngine Widgets Spellchecker Example}{Spellchecker Example}. - -*/ -void QWebEngineProfile::setSpellCheckLanguage(const QString &language) -{ - Q_D(QWebEngineProfile); - d->browserContext()->setSpellCheckLanguage(language); -} - -/*! - \since 5.7 - - Returns the language used by the spell checker. -*/ -QString QWebEngineProfile::spellCheckLanguage() const -{ - const Q_D(QWebEngineProfile); - return d->browserContext()->spellCheckLanguage(); -} - -/*! - \since 5.7 - - Enables spell checker if \a enable is \c true, otherwise disables it. - \sa isSpellCheckEnabled() - */ -void QWebEngineProfile::setSpellCheckEnabled(bool enable) -{ - Q_D(QWebEngineProfile); - d->browserContext()->setSpellCheckEnabled(enable); -} -/*! - \since 5.7 - - Returns \c true if the spell checker is enabled; otherwise returns \c false. - \sa setSpellCheckEnabled() - */ -bool QWebEngineProfile::isSpellCheckEnabled() const -{ - const Q_D(QWebEngineProfile); - return d->browserContext()->isSpellCheckEnabled(); -} - -/*! Returns the default settings for all pages in this profile. */ QWebEngineSettings *QWebEngineProfile::settings() const diff --git a/src/webenginewidgets/api/qwebengineprofile.h b/src/webenginewidgets/api/qwebengineprofile.h index 868b4b0f5..22a913fb2 100644 --- a/src/webenginewidgets/api/qwebengineprofile.h +++ b/src/webenginewidgets/api/qwebengineprofile.h @@ -121,11 +121,6 @@ public: void clearHttpCache(); - void setSpellCheckLanguage(const QString &language); - QString spellCheckLanguage() const; - void setSpellCheckEnabled(bool enabled); - bool isSpellCheckEnabled() const; - static QWebEngineProfile *defaultProfile(); Q_SIGNALS: |