From 4ea591e7efdb63c26372af4af9507c5f57b42fcc Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 4 May 2017 11:09:46 +0200 Subject: Doc: Add info to QWebEngineDownloadItem::downloadProgress docs The documentation was not very informative when compared with the docs for the similar QNetworkReply::downloadProgress signal. Task-number: QTBUG-56979 Change-Id: Icade60317a7b3fd8aaa37770c60ce8f4f947382b Reviewed-by: Kai Koehne --- src/webenginewidgets/api/qwebenginedownloaditem.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/webenginewidgets') diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp index 1950221c7..d578bf0e3 100644 --- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp +++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp @@ -224,8 +224,12 @@ quint32 QWebEngineDownloadItem::id() const /*! \fn QWebEngineDownloadItem::downloadProgress(qint64 bytesReceived, qint64 bytesTotal) - This signal is emitted whenever the download's \a bytesReceived or - \a bytesTotal changes. + This signal is emitted to indicate the progress of the download request. + + The \a bytesReceived parameter indicates the number of bytes received, while + \a bytesTotal indicates the total number of bytes expected to be downloaded. + If the size of the file to be downloaded is not known, \c bytesTotal will be + 0. \sa totalBytes(), receivedBytes() */ -- cgit v1.2.3 From 757d5b1cea0d3d70b97b31f331df9ada82f45d2d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 5 May 2017 17:28:19 +0200 Subject: Fix crash on exit with url-request interceptors If the interceptor is the child of the profile, they will be deleted with the API profile which is before the underlying browser-context, they should therefore be unset from the browser context first. Task-number: QTBUG-60236 Change-Id: I2954e8106863b8b421ef166f6bf8fa79240c95ee Reviewed-by: Joerg Bornemann --- src/webenginewidgets/api/qwebengineprofile.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/webenginewidgets') diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index abed066d3..cd4fc8b02 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -156,6 +156,10 @@ QWebEngineProfilePrivate::QWebEngineProfilePrivate(QSharedPointersetRequestInterceptor(nullptr); + delete m_settings; m_settings = 0; m_browserContextRef->removeClient(this); -- cgit v1.2.3 From 9ca5d6b5f011d1b4aa916bf5c57338d0fba4aec9 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 5 May 2017 14:19:57 +0200 Subject: Remove interruptReasonChanged signal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Users should instead listen to stateChanged - we assume that the reason does not change independently of the state. Change-Id: I369f1c537013f0b9988c0d9bef4855d97e9b8736 Reviewed-by: Marc Mutz Reviewed-by: Leena Miettinen Reviewed-by: Michael BrĂ¼ning --- src/webenginewidgets/api/qwebenginedownloaditem.cpp | 13 +------------ src/webenginewidgets/api/qwebenginedownloaditem.h | 1 - 2 files changed, 1 insertion(+), 13 deletions(-) (limited to 'src/webenginewidgets') diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp index d578bf0e3..c1d9a3698 100644 --- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp +++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp @@ -131,10 +131,8 @@ void QWebEngineDownloadItemPrivate::update(const BrowserContextAdapterClient::Do Q_ASSERT(downloadState != QWebEngineDownloadItem::DownloadRequested); - if (toDownloadInterruptReason(info.downloadInterruptReason) != interruptReason) { + if (toDownloadInterruptReason(info.downloadInterruptReason) != interruptReason) interruptReason = toDownloadInterruptReason(info.downloadInterruptReason); - Q_EMIT q->interruptReasonChanged(); - } if (toDownloadState(info.state) != downloadState) { downloadState = toDownloadState(info.state); @@ -234,15 +232,6 @@ quint32 QWebEngineDownloadItem::id() const \sa totalBytes(), receivedBytes() */ -/*! - \fn QWebEngineDownloadItem::interruptReasonChanged() - \since 5.9 - - This signal is emitted whenever the reason of the download's interruption changes. - - \sa interruptReason(), QWebEngineDownloadItem::DownloadInterruptReason -*/ - /*! \enum QWebEngineDownloadItem::DownloadState diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.h b/src/webenginewidgets/api/qwebenginedownloaditem.h index 846194f40..a4b6c08aa 100644 --- a/src/webenginewidgets/api/qwebenginedownloaditem.h +++ b/src/webenginewidgets/api/qwebenginedownloaditem.h @@ -134,7 +134,6 @@ Q_SIGNALS: void finished(); void stateChanged(QWebEngineDownloadItem::DownloadState state); void downloadProgress(qint64 bytesReceived, qint64 bytesTotal); - void interruptReasonChanged(); private: Q_DISABLE_COPY(QWebEngineDownloadItem) -- cgit v1.2.3 From 6d1d6bdd85a014fb56f8616edc91677ffbb126f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Mon, 15 May 2017 16:59:12 +0200 Subject: Show "Follow link" context menu item for links without text The standard context menu currently doesn't have the "Follow link" item for e.g. the image links on https://www.qt.io . Change-Id: I5b9d620135c7a8e65bd95a0ab07a76278e56cad0 Reviewed-by: Michal Klocek --- src/webenginewidgets/api/qwebenginepage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webenginewidgets') diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 82720ae3f..09d05a438 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -1581,7 +1581,7 @@ QMenu *QWebEnginePage::createStandardContextMenu() menu->addSeparator(); } - if (!contextMenuData.linkText().isEmpty() && contextMenuData.linkUrl().isValid()) { + if (contextMenuData.linkUrl().isValid()) { action = QWebEnginePage::action(OpenLinkInThisWindow); action->setText(tr("Follow Link")); menu->addAction(action); -- cgit v1.2.3