summaryrefslogtreecommitdiffstats
path: root/lib/web_event_factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/web_event_factory.cpp')
-rw-r--r--lib/web_event_factory.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/web_event_factory.cpp b/lib/web_event_factory.cpp
index 388e0f9b2..40b6b5e6f 100644
--- a/lib/web_event_factory.cpp
+++ b/lib/web_event_factory.cpp
@@ -43,13 +43,14 @@
#include "web_event_factory.h"
#include "third_party/WebKit/Source/core/platform/WindowsKeyboardCodes.h"
-#include <QApplication>
#include <QElapsedTimer>
#include <QEvent>
#include <QKeyEvent>
#include <QMouseEvent>
#include <QWheelEvent>
+static const int wheelScrollLines = 3; // FIXME: Still not available in QStyleHints in 5.1
+
using namespace WebKit;
static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
@@ -593,8 +594,6 @@ WebKit::WebMouseWheelEvent WebEventFactory::toWebWheelEvent(QWheelEvent *ev)
// Use the same single scroll step as QTextEdit (in QTextEditPrivate::init [h,v]bar->setSingleStep)
static const float cDefaultQtScrollStep = 20.f;
- const int wheelScrollLines = qApp->wheelScrollLines(); // can be hardcoded to 3 if we don't want to depend on QtWidgets
-
webEvent.deltaX = webEvent.wheelTicksX * wheelScrollLines * cDefaultQtScrollStep;
webEvent.deltaY = webEvent.wheelTicksY * wheelScrollLines * cDefaultQtScrollStep;