aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/accessible/qaccessiblequickitem.cpp6
-rw-r--r--src/quick/designer/qqmldesignermetaobject.cpp12
-rw-r--r--src/quick/designer/qquickdesignersupport.cpp6
-rw-r--r--src/quick/designer/qquickdesignersupport_p.h2
-rw-r--r--src/quick/items/qquickspriteengine.cpp4
-rw-r--r--src/quick/items/qquickspriteengine_p.h4
-rw-r--r--src/quick/items/qquicktextnodeengine.cpp22
-rw-r--r--src/quick/items/qquicktextnodeengine_p.h4
-rw-r--r--src/quick/items/qquickwindow.cpp2
-rw-r--r--src/quick/items/qquickwindow_p.h2
-rw-r--r--src/quick/items/qsginternaltextnode_p.h2
-rw-r--r--src/quick/scenegraph/qsgcurveprocessor.cpp18
-rw-r--r--src/quick/scenegraph/qsgcurveprocessor_p.h2
-rw-r--r--src/quick/scenegraph/qsgcurvestrokenode.cpp2
-rw-r--r--src/quick/util/qquickdeliveryagent.cpp6
-rw-r--r--src/quick/util/qquickpropertychanges.cpp12
-rw-r--r--src/quick/util/qquickstyledtext.cpp20
-rw-r--r--src/quick/util/qquicktimeline.cpp14
18 files changed, 70 insertions, 70 deletions
diff --git a/src/quick/accessible/qaccessiblequickitem.cpp b/src/quick/accessible/qaccessiblequickitem.cpp
index 7ed5f64f88..c7663723d4 100644
--- a/src/quick/accessible/qaccessiblequickitem.cpp
+++ b/src/quick/accessible/qaccessiblequickitem.cpp
@@ -827,7 +827,7 @@ QString QAccessibleQuickItem::textBeforeOffset(int offset, QAccessible::TextBoun
if (m_doc) {
QTextCursor cursor = QTextCursor(m_doc);
cursor.setPosition(offset);
- QPair<int, int> boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType);
+ std::pair<int, int> boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType);
cursor.setPosition(boundaries.first - 1);
boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType);
@@ -849,7 +849,7 @@ QString QAccessibleQuickItem::textAfterOffset(int offset, QAccessible::TextBound
if (m_doc) {
QTextCursor cursor = QTextCursor(m_doc);
cursor.setPosition(offset);
- QPair<int, int> boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType);
+ std::pair<int, int> boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType);
cursor.setPosition(boundaries.second);
boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType);
@@ -871,7 +871,7 @@ QString QAccessibleQuickItem::textAtOffset(int offset, QAccessible::TextBoundary
if (m_doc) {
QTextCursor cursor = QTextCursor(m_doc);
cursor.setPosition(offset);
- QPair<int, int> boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType);
+ std::pair<int, int> boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType);
*startOffset = boundaries.first;
*endOffset = boundaries.second;
diff --git a/src/quick/designer/qqmldesignermetaobject.cpp b/src/quick/designer/qqmldesignermetaobject.cpp
index d81ac88e4b..025bebff52 100644
--- a/src/quick/designer/qqmldesignermetaobject.cpp
+++ b/src/quick/designer/qqmldesignermetaobject.cpp
@@ -16,14 +16,14 @@ static QHash<QDynamicMetaObjectData *, bool> nodeInstanceMetaObjectList;
static void (*notifyPropertyChangeCallBack)(QObject*, const QQuickDesignerSupport::PropertyName &propertyName) = nullptr;
struct MetaPropertyData {
- inline QPair<QVariant, bool> &getDataRef(int idx) {
+ inline std::pair<QVariant, bool> &getDataRef(int idx) {
while (m_data.size() <= idx)
- m_data << QPair<QVariant, bool>(QVariant(), false);
+ m_data << std::pair<QVariant, bool>(QVariant(), false);
return m_data[idx];
}
inline QVariant &getData(int idx) {
- QPair<QVariant, bool> &prop = getDataRef(idx);
+ std::pair<QVariant, bool> &prop = getDataRef(idx);
if (!prop.second) {
prop.first = QVariant();
prop.second = true;
@@ -39,7 +39,7 @@ struct MetaPropertyData {
inline int count() { return m_data.size(); }
- QVector<QPair<QVariant, bool> > m_data;
+ QVector<std::pair<QVariant, bool> > m_data;
};
QQmlDesignerMetaObject* QQmlDesignerMetaObject::getNodeInstanceMetaObject(QObject *object, QQmlEngine *engine)
@@ -113,7 +113,7 @@ int QQmlDesignerMetaObject::createProperty(const char *name, const char *passAlo
void QQmlDesignerMetaObject::setValue(int id, const QVariant &value)
{
- QPair<QVariant, bool> &prop = m_data->getDataRef(id);
+ std::pair<QVariant, bool> &prop = m_data->getDataRef(id);
prop.first = propertyWriteValue(id, value);
prop.second = true;
QMetaObject::activate(myObject(), id + type()->signalOffset(), nullptr);
@@ -145,7 +145,7 @@ int QQmlDesignerMetaObject::openMetaCall(QObject *o, QMetaObject::Call call, int
} else if (call == QMetaObject::WriteProperty) {
if (propId <= m_data->count() || m_data->m_data[propId].first != *reinterpret_cast<QVariant *>(a[0])) {
//propertyWrite(propId);
- QPair<QVariant, bool> &prop = m_data->getDataRef(propId);
+ std::pair<QVariant, bool> &prop = m_data->getDataRef(propId);
prop.first = propertyWriteValue(propId, *reinterpret_cast<QVariant *>(a[0]));
prop.second = true;
//propertyWritten(propId);
diff --git a/src/quick/designer/qquickdesignersupport.cpp b/src/quick/designer/qquickdesignersupport.cpp
index f59c366a20..062a4fdf8a 100644
--- a/src/quick/designer/qquickdesignersupport.cpp
+++ b/src/quick/designer/qquickdesignersupport.cpp
@@ -286,7 +286,7 @@ QQuickItem *QQuickDesignerSupport::anchorCenterInTargetItem(QQuickItem *item)
-QPair<QString, QObject*> QQuickDesignerSupport::anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context)
+std::pair<QString, QObject*> QQuickDesignerSupport::anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context)
{
QObject *targetObject = nullptr;
QString targetName;
@@ -298,7 +298,7 @@ QPair<QString, QObject*> QQuickDesignerSupport::anchorLineTarget(QQuickItem *ite
} else {
QQmlProperty metaProperty(item, name, context);
if (!metaProperty.isValid())
- return QPair<QString, QObject*>();
+ return std::pair<QString, QObject*>();
QQuickAnchorLine anchorLine = metaProperty.read().value<QQuickAnchorLine>();
if (anchorLine.anchorLine != QQuickAnchors::InvalidAnchor) {
@@ -308,7 +308,7 @@ QPair<QString, QObject*> QQuickDesignerSupport::anchorLineTarget(QQuickItem *ite
}
- return QPair<QString, QObject*>(targetName, targetObject);
+ return std::pair<QString, QObject*>(targetName, targetObject);
}
void QQuickDesignerSupport::resetAnchor(QQuickItem *item, const QString &name)
diff --git a/src/quick/designer/qquickdesignersupport_p.h b/src/quick/designer/qquickdesignersupport_p.h
index 26ae3f5c8d..5a7b107216 100644
--- a/src/quick/designer/qquickdesignersupport_p.h
+++ b/src/quick/designer/qquickdesignersupport_p.h
@@ -89,7 +89,7 @@ public:
static bool hasAnchor(QQuickItem *item, const QString &name);
static QQuickItem *anchorFillTargetItem(QQuickItem *item);
static QQuickItem *anchorCenterInTargetItem(QQuickItem *item);
- static QPair<QString, QObject*> anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context);
+ static std::pair<QString, QObject*> anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context);
static void resetAnchor(QQuickItem *item, const QString &name);
static void emitComponentCompleteSignalForAttachedProperty(QObject *item);
diff --git a/src/quick/items/qquickspriteengine.cpp b/src/quick/items/qquickspriteengine.cpp
index 5d33092e6d..c1737bfe9d 100644
--- a/src/quick/items/qquickspriteengine.cpp
+++ b/src/quick/items/qquickspriteengine.cpp
@@ -739,13 +739,13 @@ void QQuickStochasticEngine::addToUpdateList(uint t, int idx)
} else if (m_stateUpdates.at(i).first > t) {
QVector<int> tmpList;
tmpList << idx;
- m_stateUpdates.insert(i, qMakePair(t, tmpList));
+ m_stateUpdates.insert(i, std::make_pair(t, tmpList));
return;
}
}
QVector<int> tmpList;
tmpList << idx;
- m_stateUpdates << qMakePair(t, tmpList);
+ m_stateUpdates << std::make_pair(t, tmpList);
}
QT_END_NAMESPACE
diff --git a/src/quick/items/qquickspriteengine_p.h b/src/quick/items/qquickspriteengine_p.h
index 3bd129cf98..8cd8ff9ca7 100644
--- a/src/quick/items/qquickspriteengine_p.h
+++ b/src/quick/items/qquickspriteengine_p.h
@@ -26,10 +26,10 @@ QT_REQUIRE_CONFIG(quick_sprite);
#include <QList>
#include <QQmlListProperty>
#include <QImage>
-#include <QPair>
#include <QRandomGenerator>
#include <private/qquickpixmap_p.h>
#include <private/qtquickglobal_p.h>
+#include <utility>
QT_BEGIN_NAMESPACE
@@ -216,7 +216,7 @@ protected:
QVector<int> m_goals;
QVector<int> m_duration;
QVector<int> m_startTimes;
- QVector<QPair<uint, QVector<int> > > m_stateUpdates;//### This could be done faster - priority queue?
+ QVector<std::pair<uint, QVector<int> > > m_stateUpdates;//### This could be done faster - priority queue?
QElapsedTimer m_advanceTimer;
uint m_timeOffset;
diff --git a/src/quick/items/qquicktextnodeengine.cpp b/src/quick/items/qquicktextnodeengine.cpp
index 1be5e34e37..34b8ed938c 100644
--- a/src/quick/items/qquicktextnodeengine.cpp
+++ b/src/quick/items/qquicktextnodeengine.cpp
@@ -51,7 +51,7 @@ QQuickTextNodeEngine::BinaryTreeNode::BinaryTreeNode(const QGlyphRun &g,
, rightChildIndex(-1)
{
QGlyphRunPrivate *d = QGlyphRunPrivate::get(g);
- ranges.append(qMakePair(d->textRangeStart, d->textRangeEnd));
+ ranges.append(std::make_pair(d->textRangeStart, d->textRangeEnd));
}
@@ -261,7 +261,7 @@ void QQuickTextNodeEngine::processCurrentLine()
pendingStrikeOuts.append(textDecoration);
if (currentDecorations & Decoration::Background)
- m_backgrounds.append(qMakePair(decorationRect, lastBackgroundColor));
+ m_backgrounds.append(std::make_pair(decorationRect, lastBackgroundColor));
}
// If we've reached an unselected node from a selected node, we add the
@@ -626,10 +626,10 @@ void QQuickTextNodeEngine::addBorder(const QRectF &rect, qreal border,
// Currently we don't support other styles than solid
Q_UNUSED(borderStyle);
- m_backgrounds.append(qMakePair(QRectF(rect.left(), rect.top(), border, rect.height() + border), color));
- m_backgrounds.append(qMakePair(QRectF(rect.left() + border, rect.top(), rect.width(), border), color));
- m_backgrounds.append(qMakePair(QRectF(rect.right(), rect.top() + border, border, rect.height() - border), color));
- m_backgrounds.append(qMakePair(QRectF(rect.left() + border, rect.bottom(), rect.width(), border), color));
+ m_backgrounds.append(std::make_pair(QRectF(rect.left(), rect.top(), border, rect.height() + border), color));
+ m_backgrounds.append(std::make_pair(QRectF(rect.left() + border, rect.top(), rect.width(), border), color));
+ m_backgrounds.append(std::make_pair(QRectF(rect.right(), rect.top() + border, border, rect.height() - border), color));
+ m_backgrounds.append(std::make_pair(QRectF(rect.left() + border, rect.bottom(), rect.width(), border), color));
}
void QQuickTextNodeEngine::addFrameDecorations(QTextDocument *document, QTextFrame *frame)
@@ -647,7 +647,7 @@ void QQuickTextNodeEngine::addFrameDecorations(QTextDocument *document, QTextFra
QBrush bg = frame->frameFormat().background();
if (bg.style() != Qt::NoBrush)
- m_backgrounds.append(qMakePair(boundingRect, bg.color()));
+ m_backgrounds.append(std::make_pair(boundingRect, bg.color()));
if (!frameFormat.hasProperty(QTextFormat::FrameBorder))
return;
@@ -832,12 +832,12 @@ void QQuickTextNodeEngine::addToSceneGraph(QSGInternalTextNode *parentNode,
bool drawCurrent = false;
if (previousNode != nullptr || nextNode != nullptr) {
for (int i = 0; i < node->ranges.size(); ++i) {
- const QPair<int, int> &range = node->ranges.at(i);
+ const std::pair<int, int> &range = node->ranges.at(i);
int rangeLength = range.second - range.first + 1;
if (previousNode != nullptr) {
for (int j = 0; j < previousNode->ranges.size(); ++j) {
- const QPair<int, int> &otherRange = previousNode->ranges.at(j);
+ const std::pair<int, int> &otherRange = previousNode->ranges.at(j);
if (range.first < otherRange.second && range.second > otherRange.first) {
int start = qMax(range.first, otherRange.first);
@@ -851,7 +851,7 @@ void QQuickTextNodeEngine::addToSceneGraph(QSGInternalTextNode *parentNode,
if (nextNode != nullptr && rangeLength > 0) {
for (int j = 0; j < nextNode->ranges.size(); ++j) {
- const QPair<int, int> &otherRange = nextNode->ranges.at(j);
+ const std::pair<int, int> &otherRange = nextNode->ranges.at(j);
if (range.first < otherRange.second && range.second > otherRange.first) {
int start = qMax(range.first, otherRange.first);
@@ -975,7 +975,7 @@ void QQuickTextNodeEngine::addTextBlock(QTextDocument *textDocument, const QText
}
if (charFormat.background().style() != Qt::NoBrush)
- m_backgrounds.append(qMakePair(blockBoundingRect, charFormat.background().color()));
+ m_backgrounds.append(std::make_pair(blockBoundingRect, charFormat.background().color()));
if (QTextList *textList = block.textList()) {
QPointF pos = blockBoundingRect.topLeft();
diff --git a/src/quick/items/qquicktextnodeengine_p.h b/src/quick/items/qquicktextnodeengine_p.h
index 1ed98ce208..f874320eb3 100644
--- a/src/quick/items/qquicktextnodeengine_p.h
+++ b/src/quick/items/qquicktextnodeengine_p.h
@@ -80,7 +80,7 @@ public:
int leftChildIndex;
int rightChildIndex;
- QList<QPair<int, int> > ranges;
+ QList<std::pair<int, int> > ranges;
static void insert(QVarLengthArray<BinaryTreeNode, 16> *binaryTree, const QRectF &rect, const QImage &image, qreal ascent, SelectionState selectionState)
{ insert(binaryTree, BinaryTreeNode(rect, image, selectionState, ascent)); }
@@ -224,7 +224,7 @@ private:
QTextLine m_currentLine;
Qt::LayoutDirection m_currentTextDirection;
- QList<QPair<QRectF, QColor> > m_backgrounds;
+ QList<std::pair<QRectF, QColor> > m_backgrounds;
QList<QRectF> m_selectionRects;
QVarLengthArray<BinaryTreeNode, 16> m_currentLineTree;
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index c9f6fe9ab9..c839d37e19 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1812,7 +1812,7 @@ void QQuickWindowPrivate::updateCursor(const QPointF &scenePos, QQuickItem *root
}
}
-QPair<QQuickItem*, QQuickPointerHandler*> QQuickWindowPrivate::findCursorItemAndHandler(QQuickItem *item, const QPointF &scenePos) const
+std::pair<QQuickItem*, QQuickPointerHandler*> QQuickWindowPrivate::findCursorItemAndHandler(QQuickItem *item, const QPointF &scenePos) const
{
QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
if (itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) {
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index 9496cf82d0..f4769a8c7f 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -142,7 +142,7 @@ public:
QQuickItem *cursorItem = nullptr;
QQuickPointerHandler *cursorHandler = nullptr;
void updateCursor(const QPointF &scenePos, QQuickItem *rootItem = nullptr);
- QPair<QQuickItem*, QQuickPointerHandler*> findCursorItemAndHandler(QQuickItem *item, const QPointF &scenePos) const;
+ std::pair<QQuickItem*, QQuickPointerHandler*> findCursorItemAndHandler(QQuickItem *item, const QPointF &scenePos) const;
#endif
void clearFocusObject() override;
diff --git a/src/quick/items/qsginternaltextnode_p.h b/src/quick/items/qsginternaltextnode_p.h
index 4cd5953a40..986a5f8089 100644
--- a/src/quick/items/qsginternaltextnode_p.h
+++ b/src/quick/items/qsginternaltextnode_p.h
@@ -163,7 +163,7 @@ public:
QSGNode *parentNode = 0);
QSGInternalRectangleNode *cursorNode() const { return m_cursorNode; }
- QPair<int, int> renderedLineRange() const { return { m_firstLineInViewport, m_firstLinePastViewport }; }
+ std::pair<int, int> renderedLineRange() const { return { m_firstLineInViewport, m_firstLinePastViewport }; }
protected:
void doAddTextLayout(QPointF position,
diff --git a/src/quick/scenegraph/qsgcurveprocessor.cpp b/src/quick/scenegraph/qsgcurveprocessor.cpp
index e222674a21..7fe27e7cb6 100644
--- a/src/quick/scenegraph/qsgcurveprocessor.cpp
+++ b/src/quick/scenegraph/qsgcurveprocessor.cpp
@@ -101,7 +101,7 @@ bool checkEdge(const QVector2D &p1, const QVector2D &p2, const QVector2D &p, flo
// Check if lines l1 and l2 are intersecting and return the respective value. Solutions are stored to
// the optional pointer solution.
-bool lineIntersection(const LinePoints &l1, const LinePoints &l2, QList<QPair<float, float>> *solution = nullptr)
+bool lineIntersection(const LinePoints &l1, const LinePoints &l2, QList<std::pair<float, float>> *solution = nullptr)
{
constexpr double eps2 = 1e-5; // Epsilon for parameter space t1-t2
@@ -127,7 +127,7 @@ bool lineIntersection(const LinePoints &l1, const LinePoints &l2, QList<QPair<fl
bool intersecting = (s >= 0 && s <= 1. - eps2 && t >= 0 && t <= 1. - eps2);
if (solution && intersecting)
- solution->append(QPair<float, float>(t, s));
+ solution->append(std::pair<float, float>(t, s));
return intersecting;
}
@@ -217,7 +217,7 @@ static float angleBetween(const QVector2D v1, const QVector2D v2)
return atan2(cross, dot);
}
-static bool isIntersecting(const TrianglePoints &t1, const TrianglePoints &t2, QList<QPair<float, float>> *solutions = nullptr)
+static bool isIntersecting(const TrianglePoints &t1, const TrianglePoints &t2, QList<std::pair<float, float>> *solutions = nullptr)
{
constexpr double eps = 1e-5; // Epsilon for coordinate space x-y
constexpr double eps2 = 1e-5; // Epsilon for parameter space t1-t2
@@ -304,7 +304,7 @@ static bool isIntersecting(const TrianglePoints &t1, const TrianglePoints &t2, Q
return false;
}
-static bool isIntersecting(const QQuadPath &path, int e1, int e2, QList<QPair<float, float>> *solutions = nullptr)
+static bool isIntersecting(const QQuadPath &path, int e1, int e2, QList<std::pair<float, float>> *solutions = nullptr)
{
const QQuadPath::Element &elem1 = path.elementAt(e1);
@@ -859,7 +859,7 @@ bool QSGCurveProcessor::solveOverlaps(QQuadPath &path)
// triangles that define the elements.
// We will order the elements first and then pool them depending on their x-values. This should
// reduce the complexity to O(n log n), where n is the number of elements in the path.
-QList<QPair<int, int>> QSGCurveProcessor::findOverlappingCandidates(const QQuadPath &path)
+QList<std::pair<int, int>> QSGCurveProcessor::findOverlappingCandidates(const QQuadPath &path)
{
struct BRect { float xmin; float xmax; float ymin; float ymax; };
@@ -887,7 +887,7 @@ QList<QPair<int, int>> QSGCurveProcessor::findOverlappingCandidates(const QQuadP
std::sort(elementEnds.begin(), elementEnds.end(), compareXmax);
QList<int> bRpool;
- QList<QPair<int, int>> overlappingBB;
+ QList<std::pair<int, int>> overlappingBB;
// Start from x = xmin and move towards xmax. Add a rectangle to the pool and check for
// intersections with all other rectangles in the pool. If a rectangles xmax is smaller
@@ -930,7 +930,7 @@ QList<QPair<int, int>> QSGCurveProcessor::findOverlappingCandidates(const QQuadP
if (!isNeighbor && (r1.ymax < newR.ymin || newR.ymax < r1.ymin))
continue;
// If the bounding boxes are overlapping it is a candidate for an intersection.
- overlappingBB.append(QPair<int, int>(i, addIndex));
+ overlappingBB.append(std::pair<int, int>(i, addIndex));
}
bRpool.append(addIndex); //Add the new element to the pool.
}
@@ -1097,10 +1097,10 @@ bool QSGCurveProcessor::solveIntersections(QQuadPath &path, bool removeNestedPat
};
// First make a O(n log n) search for candidates.
- const QList<QPair<int, int>> candidates = findOverlappingCandidates(path);
+ const QList<std::pair<int, int>> candidates = findOverlappingCandidates(path);
// Then check the candidates for actual intersections.
for (const auto &candidate : candidates) {
- QList<QPair<float,float>> res;
+ QList<std::pair<float,float>> res;
int e1 = candidate.first;
int e2 = candidate.second;
if (isIntersecting(path, e1, e2, &res)) {
diff --git a/src/quick/scenegraph/qsgcurveprocessor_p.h b/src/quick/scenegraph/qsgcurveprocessor_p.h
index fa94f03c44..b4f40b5431 100644
--- a/src/quick/scenegraph/qsgcurveprocessor_p.h
+++ b/src/quick/scenegraph/qsgcurveprocessor_p.h
@@ -48,7 +48,7 @@ public:
addStrokeTriangleCallback addTriangle,
int subdivisions = 3);
static bool solveOverlaps(QQuadPath &path);
- static QList<QPair<int, int>> findOverlappingCandidates(const QQuadPath &path);
+ static QList<std::pair<int, int>> findOverlappingCandidates(const QQuadPath &path);
static bool removeNestedSubpaths(QQuadPath &path);
static bool solveIntersections(QQuadPath &path, bool removeNestedPaths = true);
};
diff --git a/src/quick/scenegraph/qsgcurvestrokenode.cpp b/src/quick/scenegraph/qsgcurvestrokenode.cpp
index c0ba84fdca..fd5761c746 100644
--- a/src/quick/scenegraph/qsgcurvestrokenode.cpp
+++ b/src/quick/scenegraph/qsgcurvestrokenode.cpp
@@ -64,7 +64,7 @@ void QSGCurveStrokeNode::appendTriangle(const std::array<QVector2D, 3> &v,
int currentVertex = m_uncookedVertexes.count();
-// for (auto v : QList<QPair<QVector2D, QVector2D>>({{v0, n0}, {v1, n1}, {v2, n2}})) {
+// for (auto v : QList<std::pair<QVector2D, QVector2D>>({{v0, n0}, {v1, n1}, {v2, n2}})) {
for (int i = 0; i < 3; ++i) {
m_uncookedVertexes.append( { v[i].x(), v[i].y(),
A.x(), A.y(), B.x(), B.y(), C.x(), C.y(),
diff --git a/src/quick/util/qquickdeliveryagent.cpp b/src/quick/util/qquickdeliveryagent.cpp
index bb521d03bb..85261bc520 100644
--- a/src/quick/util/qquickdeliveryagent.cpp
+++ b/src/quick/util/qquickdeliveryagent.cpp
@@ -1022,7 +1022,7 @@ void QQuickDeliveryAgentPrivate::deliverToPassiveGrabbers(const QVector<QPointer
{
const QVector<QObject *> &eventDeliveryTargets =
QQuickPointerHandlerPrivate::deviceDeliveryTargets(pointerEvent->device());
- QVarLengthArray<QPair<QQuickItem *, bool>, 4> sendFilteredPointerEventResult;
+ QVarLengthArray<std::pair<QQuickItem *, bool>, 4> sendFilteredPointerEventResult;
hasFiltered.clear();
for (QObject *grabberObject : passiveGrabbers) {
// a null pointer in passiveGrabbers is unlikely, unless the grabbing handler was deleted dynamically
@@ -1036,14 +1036,14 @@ void QQuickDeliveryAgentPrivate::deliverToPassiveGrabbers(const QVector<QPointer
// see if we already have sent a filter event to the parent
auto it = std::find_if(sendFilteredPointerEventResult.begin(), sendFilteredPointerEventResult.end(),
- [par](const QPair<QQuickItem *, bool> &pair) { return pair.first == par; });
+ [par](const std::pair<QQuickItem *, bool> &pair) { return pair.first == par; });
if (it != sendFilteredPointerEventResult.end()) {
// Yes, the event was sent to that parent for filtering: do not call it again, but use
// the result of the previous call to determine whether we should call the handler.
alreadyFiltered = it->second;
} else if (par) {
alreadyFiltered = sendFilteredPointerEvent(pointerEvent, par);
- sendFilteredPointerEventResult << qMakePair(par, alreadyFiltered);
+ sendFilteredPointerEventResult << std::make_pair(par, alreadyFiltered);
}
if (!alreadyFiltered) {
if (par)
diff --git a/src/quick/util/qquickpropertychanges.cpp b/src/quick/util/qquickpropertychanges.cpp
index 18054f48b8..2b3cecef91 100644
--- a/src/quick/util/qquickpropertychanges.cpp
+++ b/src/quick/util/qquickpropertychanges.cpp
@@ -207,7 +207,7 @@ public:
int column;
};
- QList<QPair<QString, QVariant> > properties;
+ QList<std::pair<QString, QVariant> > properties;
QList<ExpressionChange> expressions;
QList<QQuickReplaceSignalHandler*> signalReplacements;
@@ -332,7 +332,7 @@ void QQuickPropertyChangesPrivate::decodeBinding(const QString &propertyPrefix,
break;
}
- properties << qMakePair(propertyName, var);
+ properties << std::make_pair(propertyName, var);
}
void QQuickPropertyChangesParser::verifyBindings(
@@ -549,7 +549,7 @@ void QQuickPropertyChanges::setIsExplicit(bool e)
bool QQuickPropertyChanges::containsValue(const QString &name) const
{
Q_D(const QQuickPropertyChanges);
- typedef QPair<QString, QVariant> PropertyEntry;
+ typedef std::pair<QString, QVariant> PropertyEntry;
for (const PropertyEntry &entry : d->properties) {
if (entry.first == name) {
@@ -582,7 +582,7 @@ bool QQuickPropertyChanges::containsProperty(const QString &name) const
void QQuickPropertyChanges::changeValue(const QString &name, const QVariant &value)
{
Q_D(QQuickPropertyChanges);
- typedef QPair<QString, QVariant> PropertyEntry;
+ typedef std::pair<QString, QVariant> PropertyEntry;
for (auto it = d->expressions.begin(), end = d->expressions.end(); it != end; ++it) {
if (it->name == name) {
@@ -705,7 +705,7 @@ void QQuickPropertyChanges::changeExpression(const QString &name, const QString
QVariant QQuickPropertyChanges::property(const QString &name) const
{
Q_D(const QQuickPropertyChanges);
- typedef QPair<QString, QVariant> PropertyEntry;
+ typedef std::pair<QString, QVariant> PropertyEntry;
typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry;
for (const PropertyEntry &entry : d->properties) {
@@ -747,7 +747,7 @@ void QQuickPropertyChanges::removeProperty(const QString &name)
QVariant QQuickPropertyChanges::value(const QString &name) const
{
Q_D(const QQuickPropertyChanges);
- typedef QPair<QString, QVariant> PropertyEntry;
+ typedef std::pair<QString, QVariant> PropertyEntry;
for (const PropertyEntry &entry : d->properties) {
if (entry.first == name) {
diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp
index bb003c19a6..6880056aa1 100644
--- a/src/quick/util/qquickstyledtext.cpp
+++ b/src/quick/util/qquickstyledtext.cpp
@@ -72,7 +72,7 @@ public:
bool parseUnorderedListAttributes(const QChar *&ch, const QString &textIn);
bool parseAnchorAttributes(const QChar *&ch, const QString &textIn, QTextCharFormat &format);
void parseImageAttributes(const QChar *&ch, const QString &textIn, QString &textOut);
- QPair<QStringView,QStringView> parseAttribute(const QChar *&ch, const QString &textIn);
+ std::pair<QStringView,QStringView> parseAttribute(const QChar *&ch, const QString &textIn);
QStringView parseValue(const QChar *&ch, const QString &textIn);
void setFontSize(int size, QTextCharFormat &format);
@@ -552,7 +552,7 @@ void QQuickStyledTextPrivate::parseEntity(const QChar *&ch, const QString &textI
bool QQuickStyledTextPrivate::parseFontAttributes(const QChar *&ch, const QString &textIn, QTextCharFormat &format)
{
bool valid = false;
- QPair<QStringView,QStringView> attr;
+ std::pair<QStringView,QStringView> attr;
do {
attr = parseAttribute(ch, textIn);
if (is_equal_ignoring_case(attr.first, QLatin1String("color"))) {
@@ -580,7 +580,7 @@ bool QQuickStyledTextPrivate::parseOrderedListAttributes(const QChar *&ch, const
listItem.type = Ordered;
listItem.format = Decimal;
- QPair<QStringView,QStringView> attr;
+ std::pair<QStringView,QStringView> attr;
do {
attr = parseAttribute(ch, textIn);
if (is_equal_ignoring_case(attr.first, QLatin1String("type"))) {
@@ -609,7 +609,7 @@ bool QQuickStyledTextPrivate::parseUnorderedListAttributes(const QChar *&ch, con
listItem.type = Unordered;
listItem.format = Bullet;
- QPair<QStringView,QStringView> attr;
+ std::pair<QStringView,QStringView> attr;
do {
attr = parseAttribute(ch, textIn);
if (is_equal_ignoring_case(attr.first, QLatin1String("type"))) {
@@ -629,7 +629,7 @@ bool QQuickStyledTextPrivate::parseAnchorAttributes(const QChar *&ch, const QStr
{
bool valid = false;
- QPair<QStringView,QStringView> attr;
+ std::pair<QStringView,QStringView> attr;
do {
attr = parseAttribute(ch, textIn);
if (is_equal_ignoring_case(attr.first, QLatin1String("href"))) {
@@ -654,7 +654,7 @@ void QQuickStyledTextPrivate::parseImageAttributes(const QChar *&ch, const QStri
QQuickStyledTextImgTag *image = new QQuickStyledTextImgTag;
image->position = textOut.size() + (trailingSpace ? 0 : 1);
- QPair<QStringView,QStringView> attr;
+ std::pair<QStringView,QStringView> attr;
do {
attr = parseAttribute(ch, textIn);
if (is_equal_ignoring_case(attr.first, QLatin1String("src"))) {
@@ -703,7 +703,7 @@ void QQuickStyledTextPrivate::parseImageAttributes(const QChar *&ch, const QStri
image->position = textOut.size() + (trailingSpace ? 0 : 1);
imgWidth = image->size.width();
image->offset = -std::fmod(imgWidth, spaceWidth) / 2.0;
- QPair<QStringView,QStringView> attr;
+ std::pair<QStringView,QStringView> attr;
do {
attr = parseAttribute(ch, textIn);
} while (!ch->isNull() && !attr.first.isEmpty());
@@ -716,7 +716,7 @@ void QQuickStyledTextPrivate::parseImageAttributes(const QChar *&ch, const QStri
textOut += padding + QLatin1Char(' ');
}
-QPair<QStringView,QStringView> QQuickStyledTextPrivate::parseAttribute(const QChar *&ch, const QString &textIn)
+std::pair<QStringView,QStringView> QQuickStyledTextPrivate::parseAttribute(const QChar *&ch, const QString &textIn)
{
skipSpace(ch);
@@ -738,7 +738,7 @@ QPair<QStringView,QStringView> QQuickStyledTextPrivate::parseAttribute(const QCh
auto attr = QStringView(textIn).mid(attrStart, attrLength);
QStringView val = parseValue(ch, textIn);
if (!val.isEmpty())
- return QPair<QStringView,QStringView>(attr,val);
+ return std::pair<QStringView,QStringView>(attr,val);
break;
} else {
++attrLength;
@@ -746,7 +746,7 @@ QPair<QStringView,QStringView> QQuickStyledTextPrivate::parseAttribute(const QCh
++ch;
}
- return QPair<QStringView,QStringView>();
+ return std::pair<QStringView,QStringView>();
}
QStringView QQuickStyledTextPrivate::parseValue(const QChar *&ch, const QString &textIn)
diff --git a/src/quick/util/qquicktimeline.cpp b/src/quick/util/qquicktimeline.cpp
index d79d835900..4cb25dbca3 100644
--- a/src/quick/util/qquicktimeline.cpp
+++ b/src/quick/util/qquicktimeline.cpp
@@ -96,7 +96,7 @@ struct QQuickTimeLinePrivate
QQuickTimeLine::SyncMode syncMode;
int syncAdj;
- QList<QPair<int, Update> > *updateQueue;
+ QList<std::pair<int, Update> > *updateQueue;
};
QQuickTimeLinePrivate::QQuickTimeLinePrivate(QQuickTimeLine *parent)
@@ -696,8 +696,8 @@ void QQuickTimeLine::debugAnimation(QDebug d) const
d << "QuickTimeLine(" << Qt::hex << (const void *) this << Qt::dec << ")";
}
-bool operator<(const QPair<int, Update> &lhs,
- const QPair<int, Update> &rhs)
+bool operator<(const std::pair<int, Update> &lhs,
+ const std::pair<int, Update> &rhs)
{
return lhs.first < rhs.first;
}
@@ -726,7 +726,7 @@ int QQuickTimeLinePrivate::advance(int t)
// Process until then. A zero length advance time will only process
// sets.
- QList<QPair<int, Update> > updates;
+ QList<std::pair<int, Update> > updates;
for (Ops::Iterator iter = ops.begin(); iter != ops.end(); ) {
QQuickTimeLineValue *v = static_cast<QQuickTimeLineValue *>(iter.key());
@@ -746,12 +746,12 @@ int QQuickTimeLinePrivate::advance(int t)
if ((tl.consumedOpLength + advanceTime) == op.length) {
// Finishing operation, the timeline value will be the operation's target value.
if (op.type == Op::Execute) {
- updates << qMakePair(op.order, Update(op.event));
+ updates << std::make_pair(op.order, Update(op.event));
} else {
bool changed = false;
qreal val = value(op, op.length, tl.base, &changed);
if (changed)
- updates << qMakePair(op.order, Update(v, val));
+ updates << std::make_pair(op.order, Update(v, val));
}
tl.length -= qMin(advanceTime, tl.length);
tl.consumedOpLength = 0;
@@ -763,7 +763,7 @@ int QQuickTimeLinePrivate::advance(int t)
bool changed = false;
qreal val = value(op, tl.consumedOpLength, tl.base, &changed);
if (changed)
- updates << qMakePair(op.order, Update(v, val));
+ updates << std::make_pair(op.order, Update(v, val));
tl.length -= qMin(advanceTime, tl.length);
break;
}