diff options
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r-- | src/webenginewidgets/api/qwebenginedownloaditem.cpp | 21 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginedownloaditem.h | 1 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 2 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.cpp | 4 |
4 files changed, 12 insertions, 16 deletions
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp index 1950221c7..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); @@ -224,19 +222,14 @@ 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. - - \sa totalBytes(), receivedBytes() -*/ - -/*! - \fn QWebEngineDownloadItem::interruptReasonChanged() - \since 5.9 + This signal is emitted to indicate the progress of the download request. - This signal is emitted whenever the reason of the download's interruption changes. + 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 interruptReason(), QWebEngineDownloadItem::DownloadInterruptReason + \sa totalBytes(), receivedBytes() */ /*! 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) diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 40180d9b8..03e5ac3f5 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -1656,7 +1656,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); 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(QSharedPointer<BrowserContext QWebEngineProfilePrivate::~QWebEngineProfilePrivate() { + // In the case the user sets this profile as the parent of the interceptor + // it can be deleted before the browser-context still referencing it is. + m_browserContextRef->setRequestInterceptor(nullptr); + delete m_settings; m_settings = 0; m_browserContextRef->removeClient(this); |