From 1e37d854f71a965ae34c41b7f437683db5e4b6fb Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 18 Sep 2012 22:41:59 +0100 Subject: Remove qLowerBound usages from qtbase Replace them with std::lower_bound; this allows for deprecation of qLowerBound. Change-Id: I536e7338eb85ea6c7c1a5bf23121292767927e0b Reviewed-by: Marc Mutz Reviewed-by: Robin Burchell --- src/corelib/animation/qvariantanimation.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/corelib/animation') diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index d776c04f72..8ef6c23d19 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -46,6 +46,8 @@ #include #include +#include + #ifndef QT_NO_ANIMATION QT_BEGIN_NAMESPACE @@ -243,10 +245,10 @@ void QVariantAnimationPrivate::recalculateCurrentInterval(bool force/*=false*/) if (force || (currentInterval.start.first > 0 && progress < currentInterval.start.first) || (currentInterval.end.first < 1 && progress > currentInterval.end.first)) { //let's update currentInterval - QVariantAnimation::KeyValues::const_iterator it = qLowerBound(keyValues.constBegin(), - keyValues.constEnd(), - qMakePair(progress, QVariant()), - animationValueLessThan); + QVariantAnimation::KeyValues::const_iterator it = std::lower_bound(keyValues.constBegin(), + keyValues.constEnd(), + qMakePair(progress, QVariant()), + animationValueLessThan); if (it == keyValues.constBegin()) { //the item pointed to by it is the start element in the range if (it->first == 0 && keyValues.count() > 1) { @@ -321,7 +323,7 @@ void QVariantAnimationPrivate::setValueAt(qreal step, const QVariant &value) QVariantAnimation::KeyValue pair(step, value); - QVariantAnimation::KeyValues::iterator result = qLowerBound(keyValues.begin(), keyValues.end(), pair, animationValueLessThan); + QVariantAnimation::KeyValues::iterator result = std::lower_bound(keyValues.begin(), keyValues.end(), pair, animationValueLessThan); if (result == keyValues.end() || result->first != step) { keyValues.insert(result, pair); } else { -- cgit v1.2.3