diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2012-09-18 22:41:59 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-19 16:12:30 +0200 |
commit | 1e37d854f71a965ae34c41b7f437683db5e4b6fb (patch) | |
tree | 6cea974ef251d4d584ec5487bcca4c83b5080d18 /src/corelib/animation | |
parent | 21d344524355af7baf9f140bd05d3b5e6bdd154d (diff) |
Remove qLowerBound usages from qtbase
Replace them with std::lower_bound; this allows for deprecation of
qLowerBound.
Change-Id: I536e7338eb85ea6c7c1a5bf23121292767927e0b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/corelib/animation')
-rw-r--r-- | src/corelib/animation/qvariantanimation.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
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 <QtCore/qline.h> #include <QtCore/qmutex.h> +#include <algorithm> + #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 { |