summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter_client.h
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2020-04-23 12:55:58 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2020-04-26 18:10:39 +0200
commit6c7148af789af401b39f0283f8060624432c5b56 (patch)
tree81988d97a69741602f80ae7e31f0982c0f1a3f0e /src/core/web_contents_adapter_client.h
parentd4004e30ba9a09f75a810d4734dd6be18616b5e5 (diff)
Restore behavior of OpenURLFromTab if createWindow returns this
Instead of using QSharedPointer's reference count to communicate adoption/non-adoption, change adoptNewWindow to return a adapter pointer, with null meaning non-adoption. Then change QWebEnginePage's implementation to reuse already existing adapters if possible, restoring previous behavior of OpenURLFromTab when createWindow returns this. Task-number: QTBUG-80596 Change-Id: I8ee7c31e4294aabd3207c504cba67d6171c66cb0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter_client.h')
-rw-r--r--src/core/web_contents_adapter_client.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
index 250801f51..04df99f0e 100644
--- a/src/core/web_contents_adapter_client.h
+++ b/src/core/web_contents_adapter_client.h
@@ -469,7 +469,10 @@ public:
virtual void loadFinished(bool success, const QUrl &url, bool isErrorPage = false, int errorCode = 0, const QString &errorDescription = QString()) = 0;
virtual void focusContainer() = 0;
virtual void unhandledKeyEvent(QKeyEvent *event) = 0;
- virtual void adoptNewWindow(QSharedPointer<WebContentsAdapter> newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect & initialGeometry, const QUrl &targetUrl) = 0;
+ virtual QSharedPointer<WebContentsAdapter>
+ adoptNewWindow(QSharedPointer<WebContentsAdapter> newWebContents,
+ WindowOpenDisposition disposition, bool userGesture,
+ const QRect &initialGeometry, const QUrl &targetUrl) = 0;
virtual bool isBeingAdopted() = 0;
virtual void close() = 0;
virtual void windowCloseRejected() = 0;