summaryrefslogtreecommitdiffstats
path: root/src/core/web_event_factory.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-25 15:09:31 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-01 12:06:20 +0000
commitab94349cb2fa073e8aec661a797de1cfc3819752 (patch)
treed3525f63aa9b3ff041989d5cf981e0ee8b07d77d /src/core/web_event_factory.cpp
parentcb6564b11ea0a81155b59ab178ff75148017a952 (diff)
Simple adaptations to Chromium 55
The simplest adaptations to API and build changes in Chromium 55 Change-Id: I923fa188690a04902492317807f72f006bcab9c6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/web_event_factory.cpp')
-rw-r--r--src/core/web_event_factory.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index 9681ad629..ff5cc99a8 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -1036,25 +1036,25 @@ static inline double currentTimeForEvent(const QInputEvent* event)
static WebMouseEvent::Button mouseButtonForEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
- return WebMouseEvent::ButtonLeft;
+ return WebMouseEvent::Button::Left;
else if (event->button() == Qt::RightButton)
- return WebMouseEvent::ButtonRight;
+ return WebMouseEvent::Button::Right;
else if (event->button() == Qt::MidButton)
- return WebMouseEvent::ButtonMiddle;
+ return WebMouseEvent::Button::Middle;
if (event->type() != QEvent::MouseMove)
- return WebMouseEvent::ButtonNone;
+ return WebMouseEvent::Button::NoButton;
// This is technically wrong, mouse move should always have ButtonNone,
// but it is consistent with aura and selection code depends on it:
if (event->buttons() & Qt::LeftButton)
- return WebMouseEvent::ButtonLeft;
+ return WebMouseEvent::Button::Left;
else if (event->buttons() & Qt::RightButton)
- return WebMouseEvent::ButtonRight;
+ return WebMouseEvent::Button::Right;
else if (event->buttons() & Qt::MidButton)
- return WebMouseEvent::ButtonMiddle;
+ return WebMouseEvent::Button::Middle;
- return WebMouseEvent::ButtonNone;
+ return WebMouseEvent::Button::NoButton;
}
template <typename T>
@@ -1247,7 +1247,6 @@ content::NativeWebKeyboardEvent WebEventFactory::toWebKeyboardEvent(QKeyEvent *e
webKitEvent.nativeKeyCode = ev->nativeVirtualKey();
webKitEvent.windowsKeyCode = windowsKeyCodeForKeyEvent(ev->key(), ev->modifiers() & Qt::KeypadModifier);
- webKitEvent.setKeyIdentifierFromWindowsKeyCode();
webKitEvent.domKey = getDomKeyFromQKeyEvent(ev);
ui::DomCode domCode = ui::DomCode::NONE;