forked from qt-creator/qt-creator
Fix of a spelling error in the Html5 template code
Change-Id: Id0b0186b66254e275cb1648e57055ab44530a64a Reviewed-by: Eike Ziller <eike.ziller@nokia.com> Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
This commit is contained in:
@@ -34,7 +34,7 @@ bool WebTouchPhysics::inMotion()
|
||||
void WebTouchPhysics::stop()
|
||||
{
|
||||
m_decelerationTimer.stop();
|
||||
m_cumlativeDistance = QPoint();
|
||||
m_cumulativeDistance = QPoint();
|
||||
m_previousPoint = QPoint();
|
||||
m_startPressPoint = QPoint();
|
||||
m_decelerationPoints.clear();
|
||||
@@ -67,7 +67,7 @@ bool WebTouchPhysics::move(const QPointF &pressPoint)
|
||||
bool WebTouchPhysics::release(const QPointF &pressPoint)
|
||||
{
|
||||
// use the cumulative distance in this case because it seems like a positive user experience
|
||||
if (m_cumlativeDistance.manhattanLength() > KCumlativeDistanceThreshold) {
|
||||
if (m_cumulativeDistance.manhattanLength() > KCumulativeDistanceThreshold) {
|
||||
m_decelerationSpeed = (m_decelerationPoints.back() - pressPoint) / (m_decelerationPoints.count() + 1);
|
||||
m_decelerationTimer.start();
|
||||
return true;
|
||||
@@ -83,7 +83,7 @@ void WebTouchPhysics::changePosition(const QPointF &point)
|
||||
QPointF diff = m_previousPoint - point;
|
||||
emit positionChanged(diff, m_startPressPoint);
|
||||
|
||||
m_cumlativeDistance += (point - m_previousPoint);
|
||||
m_cumulativeDistance += (point - m_previousPoint);
|
||||
m_previousPoint = point;
|
||||
m_decelerationPoints.push_front(point);
|
||||
if (m_decelerationPoints.count() > KDecelerationCount)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <QTimer>
|
||||
#include "webtouchphysicsinterface.h"
|
||||
|
||||
static const int KCumlativeDistanceThreshold = 40;
|
||||
static const int KCumulativeDistanceThreshold = 40;
|
||||
static const int KDecelerationCount = 4;
|
||||
static const int KDecelerationTimerSpeed = 10;
|
||||
static const int KFlickScrollThreshold = 400;
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
QPointF m_decelerationSpeed;
|
||||
QList<QPointF> m_decelerationPoints;
|
||||
QTimer m_decelerationTimer;
|
||||
QPointF m_cumlativeDistance;
|
||||
QPointF m_cumulativeDistance;
|
||||
const QWebFrame* m_frame;
|
||||
bool m_inMotion;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user