summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2018-12-14 13:15:31 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-18 15:58:19 +0100
commit50fac0d1d7e82f2423e0a3e557b4a1f30be5bf33 (patch)
treeb085f03fdafa4ecbcfcb5a96b68404e155879b6a /src/webenginewidgets
parent8124f0bc1893e0997989913044665fa1c5cf79d7 (diff)
parent4f1e0003d98116e33a847360e0e95c46daae25fc (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: src/core/compositor/delegated_frame_node.cpp src/core/profile_adapter.cpp src/core/profile_io_data_qt.cpp src/webengine/api/qquickwebengineprofile.cpp src/webenginewidgets/api/qwebengineprofile.cpp Change-Id: I35ec8480e758bbcb6c5942a5401cb1b6dbdcc428
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp3
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc32
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp9
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h1
4 files changed, 25 insertions, 20 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index d80ed997c..7b2f398ba 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -52,6 +52,7 @@
#include "visited_links_manager_qt.h"
#include "web_engine_settings.h"
+#include <QtWebEngineCore/qwebengineurlscheme.h>
QT_BEGIN_NAMESPACE
@@ -675,7 +676,7 @@ const QWebEngineUrlSchemeHandler *QWebEngineProfile::urlSchemeHandler(const QByt
Registers a handler \a handler for custom URL scheme \a scheme in the profile.
- It is recommended to first register the scheme with \l
+ It is necessary to first register the scheme with \l
QWebEngineUrlScheme::registerScheme at application startup.
*/
void QWebEngineProfile::installUrlSchemeHandler(const QByteArray &scheme, QWebEngineUrlSchemeHandler *handler)
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index f91b71ea1..d012c678c 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -109,9 +109,11 @@
This enum describes the types of action which can be performed on the web page.
- Actions only have an effect when they are applicable. The availability of
- actions can be be determined by checking \l{QAction::}{isEnabled()} on the
- action returned by action().
+ Actions only have an effect when they are applicable.
+
+ The availability of actions can be be determined by checking
+ \l{QAction::}{isEnabled()} on the action returned by action(). Context-dependent
+ actions are always enabled.
\value NoWebAction No action is triggered.
\value Back Navigate back in the history of navigated links.
@@ -128,9 +130,12 @@
\value PasteAndMatchStyle Paste content from the clipboard with current style.
\value OpenLinkInThisWindow Open the current link in the current window. (Added in Qt 5.6)
- \value OpenLinkInNewWindow Open the current link in a new window. (Added in Qt 5.6)
- \value OpenLinkInNewTab Open the current link in a new tab. (Added in Qt 5.6)
- \value OpenLinkInNewBackgroundTab Open the current link in a new background tab. (Added in Qt 5.7)
+ \value OpenLinkInNewWindow Open the current link in a new window. Requires implementation of
+ \l createWindow(). (Added in Qt 5.6)
+ \value OpenLinkInNewTab Open the current link in a new tab. Requires implementation of
+ \l createWindow(). (Added in Qt 5.6)
+ \value OpenLinkInNewBackgroundTab Open the current link in a new background tab. Requires
+ implementation of \l createWindow(). (Added in Qt 5.7)
\value CopyLinkToClipboard Copy the current link to the clipboard. (Added in Qt 5.6)
\value CopyImageToClipboard Copy the clicked image to the clipboard. (Added in Qt 5.6)
@@ -143,9 +148,12 @@
\value ToggleMediaPlayPause Toggle the play/pause state of the hovered audio or video element.
(Added in Qt 5.6)
\value ToggleMediaMute Mute or unmute the hovered audio or video element. (Added in Qt 5.6)
- \value DownloadLinkToDisk Download the current link to the disk. (Added in Qt 5.6)
- \value DownloadImageToDisk Download the highlighted image to the disk. (Added in Qt 5.6)
- \value DownloadMediaToDisk Download the hovered audio or video to the disk. (Added in Qt 5.6)
+ \value DownloadLinkToDisk Download the current link to the disk. Requires a slot for
+ \l{QWebEngineProfile::}{downloadRequested()}. (Added in Qt 5.6)
+ \value DownloadImageToDisk Download the highlighted image to the disk. Requires a slot for
+ \l{QWebEngineProfile::}{downloadRequested()}. (Added in Qt 5.6)
+ \value DownloadMediaToDisk Download the hovered audio or video to the disk. Requires a slot for
+ \l{QWebEngineProfile::}{downloadRequested()}. (Added in Qt 5.6)
\value InspectElement Trigger any attached Web Inspector to inspect the highlighed element.
(Added in Qt 5.6)
@@ -155,8 +163,10 @@
request is confirmed, \c windowCloseRequested is emitted. (Added in Qt 5.6)
\value Unselect Clear the current selection. (Added in Qt 5.7)
\value SavePage Save the current page to disk. MHTML is the default format that is used to store
- the web page on disk. (Added in Qt 5.7)
- \value ViewSource Show the source of the current page in a new tab. (Added in Qt 5.8)
+ the web page on disk. Requires a slot for \l{QWebEngineProfile::}{downloadRequested()}.
+ (Added in Qt 5.7)
+ \value ViewSource Show the source of the current page in a new tab. Requires implementation of
+ \l createWindow(). (Added in Qt 5.8)
\value ToggleBold
Toggles boldness for the selection or at the cursor position.
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index 45e87477f..5b464a461 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -107,7 +107,6 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende
, m_client(client)
, m_rootItem(new RenderWidgetHostViewQuickItem(client))
, m_isPopup(false)
- , m_isPasswordInput(false)
{
setFocusPolicy(Qt::StrongFocus);
@@ -347,14 +346,10 @@ void RenderWidgetHostViewQtDelegateWidget::move(const QPoint &screenPos)
void RenderWidgetHostViewQtDelegateWidget::inputMethodStateChanged(bool editorVisible, bool passwordInput)
{
- if (qApp->inputMethod()->isVisible() == editorVisible && m_isPasswordInput == passwordInput)
- return;
-
QQuickWidget::setAttribute(Qt::WA_InputMethodEnabled, editorVisible && !passwordInput);
- m_isPasswordInput = passwordInput;
-
qApp->inputMethod()->update(Qt::ImQueryInput | Qt::ImEnabled | Qt::ImHints);
- qApp->inputMethod()->setVisible(editorVisible);
+ if (qApp->inputMethod()->isVisible() != editorVisible)
+ qApp->inputMethod()->setVisible(editorVisible);
}
void RenderWidgetHostViewQtDelegateWidget::setInputMethodHints(Qt::InputMethodHints hints)
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
index e23f13d86..c1cd90093 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
@@ -110,7 +110,6 @@ private:
RenderWidgetHostViewQtDelegateClient *m_client;
QScopedPointer<QQuickItem> m_rootItem;
bool m_isPopup;
- bool m_isPasswordInput;
QColor m_clearColor;
QPoint m_lastGlobalPos;
QList<QMetaObject::Connection> m_windowConnections;