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/widgets/widgets/qwidgettextcontrol.cpp | |
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/widgets/widgets/qwidgettextcontrol.cpp')
-rw-r--r-- | src/widgets/widgets/qwidgettextcontrol.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 7b887c0306..c60aa4b02d 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -94,6 +94,8 @@ #define ACCEL_KEY(k) QString() #endif +#include <algorithm> + QT_BEGIN_NAMESPACE // could go into QTextCursor... @@ -1422,8 +1424,8 @@ static QRectF boundingRectOfFloatsInSelection(const QTextCursor &cursor) QTextFrame *frame = cursor.currentFrame(); const QList<QTextFrame *> children = frame->childFrames(); - const QList<QTextFrame *>::ConstIterator firstFrame = qLowerBound(children.constBegin(), children.constEnd(), - cursor.selectionStart(), firstFramePosLessThanCursorPos); + const QList<QTextFrame *>::ConstIterator firstFrame = std::lower_bound(children.constBegin(), children.constEnd(), + cursor.selectionStart(), firstFramePosLessThanCursorPos); const QList<QTextFrame *>::ConstIterator lastFrame = qUpperBound(children.constBegin(), children.constEnd(), cursor.selectionEnd(), cursorPosLessThanLastFramePos); for (QList<QTextFrame *>::ConstIterator it = firstFrame; it != lastFrame; ++it) { |