summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp8
-rw-r--r--src/webengine/api/qquickwebenginesettings.cpp2
-rw-r--r--src/webengine/api/qquickwebengineview.cpp6
-rw-r--r--src/webengine/doc/src/qtwebengine-features.qdoc4
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc2
-rw-r--r--src/webengine/doc/src/webengineview_lgpl.qdoc16
-rw-r--r--src/webengine/plugin/plugin.cpp2
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp4
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp2
-rw-r--r--src/webengine/ui/ToolTip.qml8
10 files changed, 34 insertions, 20 deletions
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index 57434e296..edad7ec44 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -157,7 +157,10 @@ ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::MimeHtmlSaveFormat, QtWebEngineC
\fn QQuickWebEngineProfile::presentNotification(QWebEngineNotification *notification)
This signal is emitted whenever there is a newly created user notification.
- The \a notification argument holds the notification instance to query data and interact with.
+ The \a notification argument holds the \l {QWebEngineNotification} instance
+ to query data and interact with.
+
+ \sa WebEngineProfile::presentNotification
*/
QQuickWebEngineProfilePrivate::QQuickWebEngineProfilePrivate(ProfileAdapter *profileAdapter)
@@ -395,7 +398,8 @@ void QQuickWebEngineProfilePrivate::userScripts_clear(QQmlListProperty<QQuickWeb
\since QtWebEngine 1.9
This signal is emitted whenever there is a newly created user notification.
- The \a notification argument holds the notification instance to query data and interact with.
+ The \a notification argument holds the \l {WebEngineNotification} instance
+ to query data and interact with.
*/
/*!
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index 93a3668ed..9a102a504 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -250,7 +250,7 @@ bool QQuickWebEngineSettings::pluginsEnabled() const
Tells the web engine whether fullscreen is supported in this application or not.
- Enabled by default.
+ Disabled by default.
*/
bool QQuickWebEngineSettings::fullScreenSupportEnabled() const
{
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 58d950cd9..8a1a3c516 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -297,7 +297,7 @@ void QQuickWebEngineViewPrivate::allowCertificateError(const QSharedPointer<Cert
// mark the object for gc by creating temporary jsvalue
qmlEngine(q)->newQObject(quickController);
Q_EMIT q->certificateError(quickController);
- if (!quickController->deferred() && !quickController->answered())
+ if (!quickController->overridable() || (!quickController->deferred() && !quickController->answered()))
quickController->rejectCertificate();
else
m_certificateErrorControllers.append(errorController);
@@ -1152,9 +1152,7 @@ void QQuickWebEngineViewPrivate::updateAdapter()
adapter->setClient(this);
if (wasInitialized) {
if (!m_html.isEmpty())
- adapter->setContent(m_html.toUtf8(), defaultMimeType, m_url);
- else if (m_url.isValid())
- adapter->load(m_url);
+ adapter->setContent(m_html.toUtf8(), defaultMimeType, activeUrl);
else if (activeUrl.isValid())
adapter->load(activeUrl);
else
diff --git a/src/webengine/doc/src/qtwebengine-features.qdoc b/src/webengine/doc/src/qtwebengine-features.qdoc
index 08c189740..00b9cb496 100644
--- a/src/webengine/doc/src/qtwebengine-features.qdoc
+++ b/src/webengine/doc/src/qtwebengine-features.qdoc
@@ -126,7 +126,9 @@
so uniquely identifies the user and might violate privacy expectations.
To activate support for client certificates, an application needs to listen to
- the QWebEnginePage::selectClientCertificate signal and select one of the offered
+ the QWebEnginePage::selectClientCertificate or
+ \l{WebEnginePage::selectClientCertificate}{WebEnginePage.selectClientCertificate}
+ signals and select one of the offered
certificates. For applications that can navigate to untrusted web sites, it is
recommended to always give the user a choice before uniquely identifying them
to a remote server.
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index 5b7d750ff..5d32fa6c7 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -73,6 +73,8 @@
\list
\li Visual Studio 2017 version 15.8 or later
+ \li Active Template Library (ATL), usually included in the Visual Studio
+ installation
\li Windows 10 SDK
\endlist
diff --git a/src/webengine/doc/src/webengineview_lgpl.qdoc b/src/webengine/doc/src/webengineview_lgpl.qdoc
index 8f03774c8..9abc8f37b 100644
--- a/src/webengine/doc/src/webengineview_lgpl.qdoc
+++ b/src/webengine/doc/src/webengineview_lgpl.qdoc
@@ -396,7 +396,7 @@
runJavaScript("document.title", function(result) { console.log(result); });
\endcode
- Only "plain data" can be returned from JavaScript as the result value.
+ Only plain data can be returned from JavaScript as the result value.
Supported data types include all of the JSON data types as well as, for
example, \c{Date} and \c{ArrayBuffer}. Unsupported data types include, for
example, \c{Function} and \c{Promise}.
@@ -407,7 +407,8 @@
\warning Do not execute lengthy routines in the callback function, because it might block the
rendering of the web content.
- See WebEngineView::userScripts for an alternative API to inject scripts.
+ For more information about injecting scripts, see \l {Script Injection}.
+ For an alternative way to inject scripts, see WebEngineView::userScripts.
*/
/*!
@@ -444,14 +445,13 @@
To clear the search highlight, just pass an empty string.
- The \a resultCallback must take a boolean parameter. It will be called with
- a value of true if the \a subString was found; otherwise the callback value
- will be false.
+ The \a resultCallback must take an integer parameter. It will be called with
+ the number of found occurrences of the \a subString.
\code
- findText("Qt", WebEngineView.FindCaseSensitively, function(success) {
- if (success)
- console.log("Qt was found!");
+ findText("Qt", WebEngineView.FindCaseSensitively, function(matchCount) {
+ if (matchCount > 0)
+ console.log("'Qt' tokens found:", matchCount);
});
\endcode
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp
index e47a46a95..5fb48d867 100644
--- a/src/webengine/plugin/plugin.cpp
+++ b/src/webengine/plugin/plugin.cpp
@@ -164,10 +164,12 @@ public:
qmlRegisterUncreatableType<QWebEngineRegisterProtocolHandlerRequest>(uri, 1, 7, "RegisterProtocolHandlerRequest",
msgUncreatableType("RegisterProtocolHandlerRequest"));
qmlRegisterUncreatableType<QQuickWebEngineAction>(uri, 1, 8, "WebEngineAction", msgUncreatableType("WebEngineAction"));
+#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
qmlRegisterUncreatableType<QQuickWebEngineClientCertificateSelection>(uri, 1, 9, "WebEngineClientCertificateSelection",
msgUncreatableType("WebEngineClientCertificateSelection"));
qmlRegisterUncreatableType<QQuickWebEngineClientCertificateOption>(uri, 1, 9, "WebEngineClientCertificateOption",
msgUncreatableType("WebEngineClientCertificateOption"));
+#endif
qmlRegisterUncreatableType<QWebEngineNotification>(uri, 1, 9, "WebEngineNotification", msgUncreatableType("WebEngineNotification"));
qmlRegisterUncreatableType<QQuickWebEngineTooltipRequest>(uri, 1, 10, "TooltipRequest",
msgUncreatableType("TooltipRequest"));
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
index 3a103b9aa..ac32671aa 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -106,7 +106,11 @@ QRectF RenderWidgetHostViewQtDelegateQuick::viewGeometry() const
const QPointF p2 = mapToGlobal(mapFromScene(QPointF(width(), height())));
QRectF geometry = QRectF(p1, p2).normalized();
// But keep the size untransformed to behave like other QQuickItems.
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
geometry.setSize(size());
+#else
+ geometry.setSize(QSizeF(width(), height()));
+#endif
return geometry;
}
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
index 23b9e02c2..d3ebdbf27 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
@@ -48,7 +48,7 @@ RenderWidgetHostViewQtDelegateQuickWindow::RenderWidgetHostViewQtDelegateQuickWi
: m_realDelegate(realDelegate)
, m_virtualParent(nullptr)
{
- setFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus);
+ setFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus);
}
RenderWidgetHostViewQtDelegateQuickWindow::~RenderWidgetHostViewQtDelegateQuickWindow()
diff --git a/src/webengine/ui/ToolTip.qml b/src/webengine/ui/ToolTip.qml
index 96033e8f1..2bfe9eaf5 100644
--- a/src/webengine/ui/ToolTip.qml
+++ b/src/webengine/ui/ToolTip.qml
@@ -47,8 +47,9 @@ Item {
visible: false
property alias text: toolTip.text
- property int delayTimerInterval: 1000
- property int hideTimerInterval: 1500
+ property int delayTimerInterval: 500
+ property int hideTimerInterval: 10000
+ property int toolTipMaxWidth: 400
Timer {
id: delayTimer
@@ -77,7 +78,8 @@ Item {
Text {
id: toolTip
anchors {fill: parent; margins: 5}
- wrapMode: Text.WrapAnywhere
+ wrapMode: Text.Wrap
+ width: Math.min(toolTipMaxWidth, (toolTip.text.length +1) * 8)
}
}