diff options
author | Michal Klocek <michal.klocek@qt.io> | 2020-10-19 09:57:50 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-11-13 09:26:22 +0100 |
commit | 2dcca95c142499baa7f10ffd99c9f085a06c52cf (patch) | |
tree | 40660cae1fe9836c1d7fbd88b5997830ac1825c2 /src/core/web_contents_view_qt.cpp | |
parent | 6ca2cfe2c29f41202491c51ef897c4f211c28c27 (diff) |
Small refactor of startDragging
This is required to decouple 'view' logic from page.
Change-Id: I84ef8cf729ef87d9339cae3f1bb1f0c709035ccf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_view_qt.cpp')
-rw-r--r-- | src/core/web_contents_view_qt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp index 41f1c601e..1ab09895f 100644 --- a/src/core/web_contents_view_qt.cpp +++ b/src/core/web_contents_view_qt.cpp @@ -285,7 +285,8 @@ void WebContentsViewQt::StartDragging(const content::DropData &drop_data, #if QT_CONFIG(draganddrop) Q_UNUSED(event_info); - if (!m_client->supportsDragging()) { + QObject *dragSource = m_client->dragSource(); + if (!dragSource) { if (source_rwh) source_rwh->DragSourceSystemDragEnded(); return; @@ -299,7 +300,7 @@ void WebContentsViewQt::StartDragging(const content::DropData &drop_data, hotspot.setY(image_offset.y()); } - m_client->startDragging(drop_data, toQtDropActions(allowed_ops), pixmap, hotspot); + m_client->webContentsAdapter()->startDragging(dragSource, drop_data, toQtDropActions(allowed_ops), pixmap, hotspot); #endif // QT_CONFIG(draganddrop) } |