diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2018-09-25 12:57:35 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-23 21:20:43 +0000 |
commit | 80d73da6e89dc06e2d4a16df14df3e2a1119cce1 (patch) | |
tree | f36730f95492761434f264f58a114835a72e107f /src/webenginewidgets/api | |
parent | 5b865551348e695187f4d7c3bbcd77ebd8736248 (diff) |
Unify updating navigation actions
On the Quick side, navigation actions were dependent on the context menu.
They were only updated when requesting a new context menu and this is
obviously wrong if an action is tied to a button or another type of UI
element.
Change-Id: I5f14b019b66215f16d027fb57d76f052b1604365
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginewidgets/api')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 7 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage_p.h | 4 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 953cb4168..3a2a07520 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -368,12 +368,6 @@ void QWebEnginePagePrivate::loadStarted(const QUrl &provisionalUrl, bool isError isLoading = true; QTimer::singleShot(0, q, &QWebEnginePage::loadStarted); - updateNavigationActions(); -} - -void QWebEnginePagePrivate::loadCommitted() -{ - updateNavigationActions(); } void QWebEnginePagePrivate::loadFinished(bool success, const QUrl &url, bool isErrorPage, int errorCode, const QString &errorDescription) @@ -401,7 +395,6 @@ void QWebEnginePagePrivate::loadFinished(bool success, const QUrl &url, bool isE emit q->loadFinished(success); }); } - updateNavigationActions(); } void QWebEnginePagePrivate::didPrintPageToPdf(const QString &filePath, bool success) diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h index 66a92dec9..dc8a34af6 100644 --- a/src/webenginewidgets/api/qwebenginepage_p.h +++ b/src/webenginewidgets/api/qwebenginepage_p.h @@ -100,7 +100,7 @@ public: qreal dpiScale() const override; QColor backgroundColor() const override; void loadStarted(const QUrl &provisionalUrl, bool isErrorPage = false) override; - void loadCommitted() override; + void loadCommitted() override { } void loadVisuallyCommitted() override { } void loadFinished(bool success, const QUrl &url, bool isErrorPage = false, int errorCode = 0, const QString &errorDescription = QString()) override; void focusContainer() override; @@ -141,6 +141,7 @@ public: void requestGeometryChange(const QRect &geometry, const QRect &frameGeometry) override; void updateScrollPosition(const QPointF &position) override; void updateContentsSize(const QSizeF &size) override; + void updateNavigationActions() override; void startDragging(const content::DropData &dropData, Qt::DropActions allowedActions, const QPixmap &pixmap, const QPoint &offset) override; bool supportsDragging() const override; @@ -154,7 +155,6 @@ public: QtWebEngineCore::WebContentsAdapter *webContentsAdapter() override; void updateAction(QWebEnginePage::WebAction) const; - void updateNavigationActions(); void _q_webActionTriggered(bool checked); void wasShown(); |