summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextengine.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2012-09-18 22:41:59 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-19 16:12:33 +0200
commit8e3e34defd0e19d49be090046ba76decc2adb526 (patch)
tree800bc71b7a63e3886eca3e2e01734efc92713f44 /src/gui/text/qtextengine.cpp
parent1e37d854f71a965ae34c41b7f437683db5e4b6fb (diff)
Remove qUpperBound usages from qtbase
Replace them with std::upper_bound; this allows for deprecation of qUpperBound. Change-Id: Idef01d2228b9a70eee3d52931d7aedb5bb6ba902 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/gui/text/qtextengine.cpp')
-rw-r--r--src/gui/text/qtextengine.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index a07c562aca6..e4572e77a2a 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -58,6 +58,7 @@
#include "qrawfont_p.h"
#include <qguiapplication.h>
#include <qinputmethod.h>
+#include <algorithm>
#include <stdlib.h>
#include "qfontengine_qpa_p.h"
@@ -2552,8 +2553,8 @@ void QTextEngine::setBoundary(int strPos) const
if (strPos <= 0 || strPos >= layoutData->string.length())
return;
- const QScriptItem* it = qUpperBound(layoutData->items.constBegin(), layoutData->items.constEnd(),
- strPos, QScriptItemComparator());
+ const QScriptItem* it = std::upper_bound(layoutData->items.constBegin(), layoutData->items.constEnd(),
+ strPos, QScriptItemComparator());
Q_ASSERT(it > layoutData->items.constBegin());
--it;
if (it->position == strPos) {
@@ -2743,7 +2744,7 @@ void QTextEngine::resolveAdditionalFormats() const
while (startIt != addFormatSortedByStart.end() &&
specialData->addFormats.at(*startIt).start <= si->position) {
- currentFormats.insert(qUpperBound(currentFormats.begin(), currentFormats.end(), *startIt),
+ currentFormats.insert(std::upper_bound(currentFormats.begin(), currentFormats.end(), *startIt),
*startIt);
++startIt;
}