[Qt][WK2] Touch mocking is broken with Qt 5 post refactor merge
Created attachment 110123 [details] Patch
Comment on attachment 110123 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=110123&action=review r=me with some tweaks: > Tools/MiniBrowser/qt/MiniBrowserApplication.cpp:96 > + if (isMouseEvent(event) && targetWindow) { Nit: The targetWindow null check is cheaper so it should be first. > Tools/MiniBrowser/qt/MiniBrowserApplication.cpp:100 > + touchPoint.area = QRectF(mouseEvent->globalPos(), QSizeF(1., 1.)); Style: Unless required in order to force floating point math, do not append .0, .f and .0f to floating point literals. > Tools/MiniBrowser/qt/MiniBrowserApplication.cpp:132 > + for (QHash<int, QWindowSystemInterface::TouchPoint>::iterator it = m_touchPoints.begin(); it != m_touchPoints.end(); ++it) { Nit: I like it when we cache the end iterator. :) > Tools/MiniBrowser/qt/MiniBrowserApplication.cpp:142 > + QEvent::Type eventType; > + switch (touchPoint.state) { Something goes wrong with indentation here. > Tools/MiniBrowser/qt/MiniBrowserApplication.cpp:150 > + // don't send the event if nothing changed Style: comments should be in sentence form.
Committed r96931: <http://trac.webkit.org/changeset/96931>