diff options
Diffstat (limited to 'WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp')
-rw-r--r-- | WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp index 63dbd2a..fd7c925 100644 --- a/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp +++ b/WebKitTools/DumpRenderTree/qt/EventSenderQt.cpp @@ -381,7 +381,6 @@ void EventSender::scheduleAsynchronousClick() void EventSender::addTouchPoint(int x, int y) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) // Use index to refer to the position in the vector that this touch // is stored. We then create a unique id for the touch that will be // passed into WebCore. @@ -391,24 +390,20 @@ void EventSender::addTouchPoint(int x, int y) m_touchPoints.append(point); updateTouchPoint(index, x, y); m_touchPoints[index].setState(Qt::TouchPointPressed); -#endif } void EventSender::updateTouchPoint(int index, int x, int y) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) if (index < 0 || index >= m_touchPoints.count()) return; QTouchEvent::TouchPoint &p = m_touchPoints[index]; p.setPos(QPointF(x, y)); p.setState(Qt::TouchPointMoved); -#endif } void EventSender::setTouchModifier(const QString &modifier, bool enable) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) Qt::KeyboardModifier mod = Qt::NoModifier; if (!modifier.compare(QLatin1String("shift"), Qt::CaseInsensitive)) mod = Qt::ShiftModifier; @@ -423,30 +418,24 @@ void EventSender::setTouchModifier(const QString &modifier, bool enable) m_touchModifiers |= mod; else m_touchModifiers &= ~mod; -#endif } void EventSender::touchStart() { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) if (!m_touchActive) { sendTouchEvent(QEvent::TouchBegin); m_touchActive = true; } else sendTouchEvent(QEvent::TouchUpdate); -#endif } void EventSender::touchMove() { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) sendTouchEvent(QEvent::TouchUpdate); -#endif } void EventSender::touchEnd() { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) for (int i = 0; i < m_touchPoints.count(); ++i) if (m_touchPoints[i].state() != Qt::TouchPointReleased) { sendTouchEvent(QEvent::TouchUpdate); @@ -454,31 +443,25 @@ void EventSender::touchEnd() } sendTouchEvent(QEvent::TouchEnd); m_touchActive = false; -#endif } void EventSender::clearTouchPoints() { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) m_touchPoints.clear(); m_touchModifiers = Qt::KeyboardModifiers(); m_touchActive = false; -#endif } void EventSender::releaseTouchPoint(int index) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) if (index < 0 || index >= m_touchPoints.count()) return; m_touchPoints[index].setState(Qt::TouchPointReleased); -#endif } void EventSender::sendTouchEvent(QEvent::Type type) { -#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QTouchEvent event(type, QTouchEvent::TouchScreen, m_touchModifiers); event.setTouchPoints(m_touchPoints); sendEvent(m_page, &event); @@ -491,7 +474,6 @@ void EventSender::sendTouchEvent(QEvent::Type type) ++it; } } -#endif } void EventSender::zoomPageIn() |