diff --git a/src/qml/jsruntime/qv4mm.cpp b/src/qml/jsruntime/qv4mm.cpp index 67ae5d688802cc6f1711025ecffde1e46af61ace..2d53fa3fe5235f43cb2d9aa9b820b4e699919a29 100644 --- a/src/qml/jsruntime/qv4mm.cpp +++ b/src/qml/jsruntime/qv4mm.cpp @@ -582,7 +582,7 @@ void MemoryManager::collectFromStack() const if (genericPtr < *heapChunkBoundaries || genericPtr > *(heapChunkBoundariesEnd - 1)) continue; - int index = qLowerBound(heapChunkBoundaries, heapChunkBoundariesEnd, genericPtr) - heapChunkBoundaries; + int index = std::lower_bound(heapChunkBoundaries, heapChunkBoundariesEnd, genericPtr) - heapChunkBoundaries; // An odd index means the pointer is _before_ the end of a heap chunk and therefore valid. assert(index >= 0 && index < m_d->heapChunks.count() * 2); if (index & 1) { diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 6ee05700ae151a9347cbc5191e186ff17b5700fc..d79de5d1b1edf305adcd2366693626c54ebcadea 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -57,7 +57,6 @@ #include <QtGui/qtextobject.h> #include <QtGui/qtexttable.h> #include <QtCore/qmath.h> -#include <QtCore/qalgorithms.h> #include <private/qqmlglobal_p.h> #include <private/qqmlproperty_p.h> @@ -66,6 +65,8 @@ #include "qquicktextdocument.h" +#include <algorithm> + QT_BEGIN_NAMESPACE /*! @@ -1859,7 +1860,7 @@ QSGNode *QQuickTextEdit::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData * if ((it.atEnd()) || (firstCleanNode && block.next().position() >= firstCleanNode->startPos())) // last node that needed replacing or last block of the frame break; - QList<int>::const_iterator lowerBound = qLowerBound(frameBoundaries, block.next().position()); + QList<int>::const_iterator lowerBound = std::lower_bound(frameBoundaries.constBegin(), frameBoundaries.constEnd(), block.next().position()); if (currentNodeSize > nodeBreakingSize || *lowerBound > nodeStart) { currentNodeSize = 0; d->addCurrentTextNodeToRoot(rootNode, node, nodeIterator, nodeStart); @@ -2039,13 +2040,13 @@ void QQuickTextEdit::markDirtyNodesForRange(int start, int end, int charDelta) return; TextNode dummyNode(start, 0); - TextNodeIterator it = qLowerBound(d->textNodeMap.begin(), d->textNodeMap.end(), &dummyNode, &comesBefore); + TextNodeIterator it = std::lower_bound(d->textNodeMap.begin(), d->textNodeMap.end(), &dummyNode, &comesBefore); // qLowerBound gives us the first node past the start of the affected portion, rewind to the first node // that starts at the last position before the edit position. (there might be several because of images) if (it != d->textNodeMap.begin()) { --it; TextNode otherDummy((*it)->startPos(), 0); - it = qLowerBound(d->textNodeMap.begin(), d->textNodeMap.end(), &otherDummy, &comesBefore); + it = std::lower_bound(d->textNodeMap.begin(), d->textNodeMap.end(), &otherDummy, &comesBefore); } // mark the affected nodes as dirty