summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2020-07-15 11:56:00 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2020-08-13 12:33:48 +0200
commit0c0500717e3bb329ceeef764fd6b962af10488cf (patch)
tree5abffa55b82c49f0f59e7779b4509d58d0e063a4 /src/core/web_contents_adapter.cpp
parent5189f03b0078567f6a0c1fa32780314cb7451102 (diff)
Fix almost all deprecation warnings
Replace QString::fromUtf16({const ushort * -> const char16_t}) QMap::{unite -> insert} Q{Hover,DragEnter,DragMove,Drop}Event::{posF() -> position()} Q{Hover,DragEnter,DragMove,Drop}Event::{pos() -> position().toPoint()} Q{DragEnter,Drop}Event::{mouseButtons -> buttons} Q{DragEnter,Drop}Event::{keyboardModifiers -> modifiers} QMouseEvent::{localPos -> position} QMouseEvent::{windowPos -> scenePosition} QMouseEvent::{screenPos -> globalPosition} These should all be just renames without any change in behavior (save for some floating point conversions). The one remaining issue concerns the deprecation of binary JSON in qtbase, which is recommended to be replaced with CBOR. Change-Id: I8f3b533242fe9a58c08c2b09ff5d0bdbbfa6dd17 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 389f53002..21bdea657 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -1636,19 +1636,19 @@ void WebContentsAdapter::enterDrag(QDragEnterEvent *e, const QPointF &screenPos)
content::RenderViewHost *rvh = m_webContents->GetRenderViewHost();
rvh->GetWidget()->FilterDropData(m_currentDropData.get());
- rvh->GetWidget()->DragTargetDragEnter(*m_currentDropData, toGfx(e->posF()), toGfx(screenPos),
+ rvh->GetWidget()->DragTargetDragEnter(*m_currentDropData, toGfx(e->position()), toGfx(screenPos),
toWeb(e->possibleActions()),
- toWeb(e->mouseButtons()) | toWeb(e->keyboardModifiers()));
+ toWeb(e->buttons()) | toWeb(e->modifiers()));
}
Qt::DropAction WebContentsAdapter::updateDragPosition(QDragMoveEvent *e, const QPointF &screenPos)
{
CHECK_INITIALIZED(Qt::DropAction());
content::RenderViewHost *rvh = m_webContents->GetRenderViewHost();
- m_lastDragClientPos = e->posF();
+ m_lastDragClientPos = e->position();
m_lastDragScreenPos = screenPos;
rvh->GetWidget()->DragTargetDragOver(toGfx(m_lastDragClientPos), toGfx(m_lastDragScreenPos), toWeb(e->possibleActions()),
- toWeb(e->mouseButtons()) | toWeb(e->keyboardModifiers()));
+ toWeb(e->buttons()) | toWeb(e->modifiers()));
waitForUpdateDragActionCalled();
return toQt(blink::WebDragOperation(m_currentDropAction));
}
@@ -1691,10 +1691,10 @@ void WebContentsAdapter::endDragging(QDropEvent *e, const QPointF &screenPos)
CHECK_INITIALIZED();
content::RenderViewHost *rvh = m_webContents->GetRenderViewHost();
rvh->GetWidget()->FilterDropData(m_currentDropData.get());
- m_lastDragClientPos = e->posF();
+ m_lastDragClientPos = e->position();
m_lastDragScreenPos = screenPos;
rvh->GetWidget()->DragTargetDrop(*m_currentDropData, toGfx(m_lastDragClientPos), toGfx(m_lastDragScreenPos),
- toWeb(e->mouseButtons()) | toWeb(e->keyboardModifiers()));
+ toWeb(e->buttons()) | toWeb(e->modifiers()));
m_currentDropData.reset();
}