diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2017-05-09 14:52:45 +0200 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2017-06-07 14:20:47 +0000 |
commit | fa19227c3ac7df7c0d2f8a548a9a36ac9a7b803c (patch) | |
tree | f25e8bf0aea2d8194f39ac0d0495de12ae48b289 /src/core/web_contents_adapter_client.h | |
parent | 1ad5b3b680d71ab6f97503398fbcc4c0f313aacb (diff) |
Fix copying JavaScript URLs
Wire unfiltered link URL to the API layer.
[ChangeLog][QtWebEngine] linkUrl member of
QWebEngineContextMenuData and ContextMenuRequest was previously
returning with "about:blank" in case of non-standard URLs.
Now it contains the unvalidated URL and CopyLinkToClipboard action
has been fixed to handle such URLs (like javascript:) correctly.
Task-number: QTBUG-59307
Change-Id: I2e49767e1cc9ec8324d230c1bf346e21d7b8d9bb
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.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h index d4b2974fc..9b454832e 100644 --- a/src/core/web_contents_adapter_client.h +++ b/src/core/web_contents_adapter_client.h @@ -90,6 +90,7 @@ public: uint mediaFlags; QPoint pos; QUrl linkUrl; + QUrl unfilteredLinkUrl; QUrl mediaUrl; QString linkText; QString selectedText; @@ -156,6 +157,14 @@ public: return d->linkUrl; } + void setUnfilteredLinkUrl(const QUrl &url) { + d->unfilteredLinkUrl = url; + } + + QUrl unfilteredLinkUrl() const { + return d->unfilteredLinkUrl; + } + void setLinkText(const QString &text) { d->linkText = text; } |