diff options
author | Vyacheslav Koscheev <v.koscheev@2gis.ru> | 2017-08-29 04:27:06 +0700 |
---|---|---|
committer | Vyacheslav Koscheev <vok1980@gmail.com> | 2017-09-01 11:07:52 +0000 |
commit | 60eaf0f9432697416abdc758e003c9ac44962324 (patch) | |
tree | 602a07a6fe6fec8d6ff834692cc8891ffaaea9c8 | |
parent | bc2f84ad4a80401afd7d7b482fcab2487e87e1db (diff) |
Android: fix clang compilation with -qreal float
Change-Id: Ica7a417aa1bb531bc63e3fa9dda0505a6e552b67
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
-rw-r--r-- | src/quicktemplates2/qquickdelaybutton.cpp | 6 | ||||
-rw-r--r-- | src/quicktemplates2/qquickdrawer.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickswipedelegate.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/quicktemplates2/qquickdelaybutton.cpp b/src/quicktemplates2/qquickdelaybutton.cpp index f8a495b0..842713e0 100644 --- a/src/quicktemplates2/qquickdelaybutton.cpp +++ b/src/quicktemplates2/qquickdelaybutton.cpp @@ -125,7 +125,7 @@ void QQuickDelayTransitionManager::transition(QQuickTransition *transition, qrea void QQuickDelayTransitionManager::finished() { - if (qFuzzyCompare(m_button->progress(), 1.0)) + if (qFuzzyCompare(m_button->progress(), qreal(1.0))) emit m_button->activated(); } @@ -154,7 +154,7 @@ void QQuickDelayButtonPrivate::beginTransition(qreal to) void QQuickDelayButtonPrivate::finishTransition() { Q_Q(QQuickDelayButton); - if (qFuzzyCompare(progress, 1.0)) + if (qFuzzyCompare(progress, qreal(1.0))) emit q->activated(); } @@ -260,7 +260,7 @@ void QQuickDelayButton::buttonChange(ButtonChange change) void QQuickDelayButton::nextCheckState() { Q_D(QQuickDelayButton); - setChecked(!d->checked && qFuzzyCompare(d->progress, 1.0)); + setChecked(!d->checked && qFuzzyCompare(d->progress, qreal(1.0))); } QFont QQuickDelayButton::defaultFont() const diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp index 45c9a3fe..c63d40d1 100644 --- a/src/quicktemplates2/qquickdrawer.cpp +++ b/src/quicktemplates2/qquickdrawer.cpp @@ -411,7 +411,7 @@ bool QQuickDrawerPrivate::handleMove(QQuickItem *item, const QPointF &point, ulo return false; // limit/reset the offset to the edge of the drawer when pushed from the outside - if (qFuzzyCompare(position, 1.0) && !contains(point)) + if (qFuzzyCompare(position, qreal(1.0)) && !contains(point)) offset = 0; bool isGrabbed = popupItem->keepMouseGrab() || popupItem->keepTouchGrab(); diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp index 8e0cf3fe..0524b2cc 100644 --- a/src/quicktemplates2/qquickswipedelegate.cpp +++ b/src/quicktemplates2/qquickswipedelegate.cpp @@ -433,7 +433,7 @@ void QQuickSwipePrivate::beginTransition(qreal newPosition) void QQuickSwipePrivate::finishTransition() { Q_Q(QQuickSwipe); - q->setComplete(qFuzzyCompare(qAbs(position), 1.0)); + q->setComplete(qFuzzyCompare(qAbs(position), qreal(1.0))); if (complete) emit q->opened(); else @@ -693,7 +693,7 @@ void QQuickSwipe::setTransition(QQuickTransition *transition) void QQuickSwipe::open(QQuickSwipeDelegate::Side side) { Q_D(QQuickSwipe); - if (qFuzzyCompare(qAbs(d->position), 1.0)) + if (qFuzzyCompare(qAbs(d->position), qreal(1.0))) return; if ((side != QQuickSwipeDelegate::Left && side != QQuickSwipeDelegate::Right) |