diff options
Diffstat (limited to 'src/quick/handlers')
| -rw-r--r-- | src/quick/handlers/qquickdraghandler_p.h | 4 | ||||
| -rw-r--r-- | src/quick/handlers/qquicktaphandler.cpp | 16 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/quick/handlers/qquickdraghandler_p.h b/src/quick/handlers/qquickdraghandler_p.h index 18c1fd841d..e8f47163ed 100644 --- a/src/quick/handlers/qquickdraghandler_p.h +++ b/src/quick/handlers/qquickdraghandler_p.h @@ -62,7 +62,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickDragHandler : public QQuickMultiPointHandler Q_PROPERTY(QQuickDragAxis * xAxis READ xAxis CONSTANT) Q_PROPERTY(QQuickDragAxis * yAxis READ yAxis CONSTANT) Q_PROPERTY(QVector2D translation READ translation NOTIFY translationChanged) - Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged) + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged REVISION 14) public: enum SnapMode { @@ -89,7 +89,7 @@ public: Q_SIGNALS: void translationChanged(); - void snapModeChanged(); + Q_REVISION(14) void snapModeChanged(); protected: void onActiveChanged() override; diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index 255e47d73a..a10064a665 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -78,8 +78,8 @@ int QQuickTapHandler::m_touchMultiTapDistanceSquared(-1); \l gesturePolicy to \c TapHandler.ReleaseWithinBounds. For multi-tap gestures (double-tap, triple-tap etc.), the distance moved - must not exceed QPlatformTheme::MouseDoubleClickDistance with mouse and - QPlatformTheme::TouchDoubleTapDistance with touch, and the time between + must not exceed QStyleHints::mouseDoubleClickDistance() with mouse and + QStyleHints::touchDoubleTapDistance() with touch, and the time between taps must not exceed QStyleHints::mouseDoubleClickInterval(). \sa MouseArea @@ -90,11 +90,9 @@ QQuickTapHandler::QQuickTapHandler(QQuickItem *parent) { if (m_mouseMultiClickDistanceSquared < 0) { m_multiTapInterval = qApp->styleHints()->mouseDoubleClickInterval() / 1000.0; - m_mouseMultiClickDistanceSquared = QGuiApplicationPrivate::platformTheme()-> - themeHint(QPlatformTheme::MouseDoubleClickDistance).toInt(); + m_mouseMultiClickDistanceSquared = qApp->styleHints()->mouseDoubleClickDistance(); m_mouseMultiClickDistanceSquared *= m_mouseMultiClickDistanceSquared; - m_touchMultiTapDistanceSquared = QGuiApplicationPrivate::platformTheme()-> - themeHint(QPlatformTheme::TouchDoubleTapDistance).toInt(); + m_touchMultiTapDistanceSquared = qApp->styleHints()->touchDoubleTapDistance(); m_touchMultiTapDistanceSquared *= m_touchMultiTapDistanceSquared; } } @@ -410,9 +408,9 @@ void QQuickTapHandler::updateTimeHeld() \since 5.11 This signal is emitted when the \c parent Item is tapped twice within a - short span of time (QStyleHints::mouseDoubleClickInterval) and distance - (QPlatformTheme::MouseDoubleClickDistance or - QPlatformTheme::TouchDoubleTapDistance). This signal always occurs after + short span of time (QStyleHints::mouseDoubleClickInterval()) and distance + (QStyleHints::mouseDoubleClickDistance() or + QStyleHints::touchDoubleTapDistance()). This signal always occurs after \l singleTapped, \l tapped, and \l tapCountChanged. The \c eventPoint signal parameter contains information from the release event about the point that was tapped. |
