diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-09-02 12:35:21 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-12-02 09:18:39 +0100 |
commit | 4f285f7b2a1316bbad6e74258305613933f574c8 (patch) | |
tree | 5e4cc05334c25dc5a99915c5f314db9e86bb4906 /src/core/web_contents_adapter.cpp | |
parent | da019632bfc0227e2d0d0cc676a80a352fc27a62 (diff) |
Adaptations for Chromium 91
Change-Id: Ie0236697615fd67e4f53df3dca013ce39628cc29
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 0a83b248f..763564ad1 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -165,7 +165,7 @@ static QVariant fromJSValue(const base::Value *result) } case base::Value::Type::STRING: { - base::string16 out; + std::u16string out; if (result->GetAsString(&out)) ret.setValue(toQt(out)); break; @@ -1552,7 +1552,8 @@ void WebContentsAdapter::startDragging(QObject *dragSource, const content::DropD if (rvh) { rvh->GetWidget()->DragSourceEndedAt(gfx::PointF(m_lastDragClientPos.x(), m_lastDragClientPos.y()), gfx::PointF(m_lastDragScreenPos.x(), m_lastDragScreenPos.y()), - ui::mojom::DragOperation(m_currentDropAction)); + ui::mojom::DragOperation(m_currentDropAction), + base::DoNothing()); rvh->GetWidget()->DragSourceSystemDragEnded(); } } @@ -1664,7 +1665,8 @@ void WebContentsAdapter::enterDrag(QDragEnterEvent *e, const QPointF &screenPos) rvh->GetWidget()->FilterDropData(m_currentDropData.get()); rvh->GetWidget()->DragTargetDragEnter(*m_currentDropData, toGfx(e->position()), toGfx(screenPos), toWeb(e->possibleActions()), - toWeb(e->buttons()) | toWeb(e->modifiers())); + toWeb(e->buttons()) | toWeb(e->modifiers()), + base::DoNothing()); } Qt::DropAction WebContentsAdapter::updateDragPosition(QDragMoveEvent *e, const QPointF &screenPos) @@ -1674,7 +1676,7 @@ Qt::DropAction WebContentsAdapter::updateDragPosition(QDragMoveEvent *e, const Q m_lastDragClientPos = e->position(); m_lastDragScreenPos = screenPos; rvh->GetWidget()->DragTargetDragOver(toGfx(m_lastDragClientPos), toGfx(m_lastDragScreenPos), toWeb(e->possibleActions()), - toWeb(e->buttons()) | toWeb(e->modifiers())); + toWeb(e->buttons()) | toWeb(e->modifiers()), base::DoNothing()); waitForUpdateDragActionCalled(); return toQt(ui::mojom::DragOperation(m_currentDropAction)); } @@ -1720,7 +1722,7 @@ void WebContentsAdapter::endDragging(QDropEvent *e, const QPointF &screenPos) m_lastDragClientPos = e->position(); m_lastDragScreenPos = screenPos; rvh->GetWidget()->DragTargetDrop(*m_currentDropData, toGfx(m_lastDragClientPos), toGfx(m_lastDragScreenPos), - toWeb(e->buttons()) | toWeb(e->modifiers())); + toWeb(e->buttons()) | toWeb(e->modifiers()), base::DoNothing()); m_currentDropData.reset(); } @@ -1764,7 +1766,7 @@ void WebContentsAdapter::resetSelection() if (auto rwhv = static_cast<RenderWidgetHostViewQt *>(m_webContents->GetRenderWidgetHostView())) { if (auto mgr = rwhv->GetTextInputManager()) if (auto selection = const_cast<content::TextInputManager::TextSelection *>(mgr->GetTextSelection(rwhv))) - selection->SetSelection(base::string16(), 0, gfx::Range(), false); + selection->SetSelection(std::u16string(), 0, gfx::Range(), false); } } |