diff options
Diffstat (limited to 'src')
72 files changed, 212 insertions, 206 deletions
diff --git a/src/labs/wavefrontmesh/qwavefrontmesh.cpp b/src/labs/wavefrontmesh/qwavefrontmesh.cpp index 7aa47032d6..86458e2ecb 100644 --- a/src/labs/wavefrontmesh/qwavefrontmesh.cpp +++ b/src/labs/wavefrontmesh/qwavefrontmesh.cpp @@ -36,7 +36,7 @@ public: return mesh->d_func(); } - QVector<QPair<ushort, ushort> > indexes; + QVector<std::pair<ushort, ushort> > indexes; QVector<QVector3D> vertexes; QVector<QVector2D> textureCoordinates; @@ -349,9 +349,9 @@ void QWavefrontMesh::readData() return; } - d->indexes.append(qMakePair(ushort(p1), ushort(t1))); - d->indexes.append(qMakePair(ushort(p2), ushort(t2))); - d->indexes.append(qMakePair(ushort(p3), ushort(t3))); + d->indexes.append(std::make_pair(ushort(p1), ushort(t1))); + d->indexes.append(std::make_pair(ushort(p2), ushort(t2))); + d->indexes.append(std::make_pair(ushort(p3), ushort(t3))); } else { setLastError(UnsupportedFaceShapeError); return; @@ -385,9 +385,9 @@ void QWavefrontMesh::readData() // ### Assumes convex quad, correct algorithm is to find the concave corner, // and if there is one, do the split on the line between this and the corner it is // not connected to. Also assumes order of vertices is counter clockwise. - d->indexes.append(qMakePair(ushort(p3), ushort(t3))); - d->indexes.append(qMakePair(ushort(p4), ushort(t4))); - d->indexes.append(qMakePair(ushort(p1), ushort(t1))); + d->indexes.append(std::make_pair(ushort(p3), ushort(t3))); + d->indexes.append(std::make_pair(ushort(p4), ushort(t4))); + d->indexes.append(std::make_pair(ushort(p1), ushort(t1))); } } } diff --git a/src/particles/qquickcustomaffector.cpp b/src/particles/qquickcustomaffector.cpp index 2240dbfcef..cd75f2d5b4 100644 --- a/src/particles/qquickcustomaffector.cpp +++ b/src/particles/qquickcustomaffector.cpp @@ -116,7 +116,7 @@ void QQuickCustomAffector::affectSystem(qreal dt) if (justAffected) { for (const QQuickParticleData *d : std::as_const(toAffect)) {//Not postAffect to avoid saying the particle changed if (m_onceOff) - m_onceOffed << qMakePair(d->groupId, d->index); + m_onceOffed << std::make_pair(d->groupId, d->index); emit affected(d->curX(m_system), d->curY(m_system)); } return; diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp index c838550744..2b63ee5771 100644 --- a/src/particles/qquickimageparticle.cpp +++ b/src/particles/qquickimageparticle.cpp @@ -1437,7 +1437,7 @@ void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node) m_nodes.insert(groupId, node); m_idxStarts.insert(groupId, m_lastIdxStart); - m_startsIdx.append(qMakePair(m_lastIdxStart, groupId)); + m_startsIdx.append(std::make_pair(m_lastIdxStart, groupId)); m_lastIdxStart += count; //Create Particle Geometry diff --git a/src/particles/qquickimageparticle_p.h b/src/particles/qquickimageparticle_p.h index f0bfb8a1d6..371d520db6 100644 --- a/src/particles/qquickimageparticle_p.h +++ b/src/particles/qquickimageparticle_p.h @@ -379,7 +379,7 @@ private: QSGNode *m_outgoingNode; QHash<int, QSGGeometryNode *> m_nodes; QHash<int, int> m_idxStarts;//TODO: Proper resizing will lead to needing a spriteEngine per particle - do this after sprite engine gains transparent sharing? - QList<QPair<int, int> > m_startsIdx;//Same data, optimized for alternate retrieval + QList<std::pair<int, int> > m_startsIdx;//Same data, optimized for alternate retrieval int m_lastIdxStart; QSGMaterial *m_material; diff --git a/src/particles/qquickparticleaffector.cpp b/src/particles/qquickparticleaffector.cpp index 051ea1c9f5..d0cba7a658 100644 --- a/src/particles/qquickparticleaffector.cpp +++ b/src/particles/qquickparticleaffector.cpp @@ -137,7 +137,7 @@ bool QQuickParticleAffector::shouldAffect(QQuickParticleData* d) return false; if (activeGroup(d->groupId)){ - if ((m_onceOff && m_onceOffed.contains(qMakePair(d->groupId, d->index))) + if ((m_onceOff && m_onceOffed.contains(std::make_pair(d->groupId, d->index))) || !d->stillAlive(m_system)) return false; //Need to have previous location for affected anyways @@ -159,7 +159,7 @@ void QQuickParticleAffector::postAffect(QQuickParticleData* d) m_system->needsReset << d; if (m_onceOff) - m_onceOffed << qMakePair(d->groupId, d->index); + m_onceOffed << std::make_pair(d->groupId, d->index); if (isAffectedConnected()) emit affected(d->curX(m_system), d->curY(m_system)); } @@ -215,7 +215,7 @@ void QQuickParticleAffector::reset(QQuickParticleData* pd) {//TODO: This, among other ones, should be restructured so they don't all need to remember to call the superclass if (m_onceOff) if (activeGroup(pd->groupId)) - m_onceOffed.remove(qMakePair(pd->groupId, pd->index)); + m_onceOffed.remove(std::make_pair(pd->groupId, pd->index)); } void QQuickParticleAffector::updateOffsets() diff --git a/src/particles/qquickparticleaffector_p.h b/src/particles/qquickparticleaffector_p.h index 5bd7c81940..9c6ff7df1f 100644 --- a/src/particles/qquickparticleaffector_p.h +++ b/src/particles/qquickparticleaffector_p.h @@ -161,7 +161,7 @@ protected: static const qreal simulationCutoff; QPointF m_offset; - QSet<QPair<int, int>> m_onceOffed; + QSet<std::pair<int, int>> m_onceOffed; private: QSet<int> m_groupIds; bool m_updateIntSet; diff --git a/src/particles/qquickparticleemitter.cpp b/src/particles/qquickparticleemitter.cpp index af5ddd062d..98f3df57ae 100644 --- a/src/particles/qquickparticleemitter.cpp +++ b/src/particles/qquickparticleemitter.cpp @@ -272,12 +272,12 @@ void QQuickParticleEmitter::pulse(int milliseconds) void QQuickParticleEmitter::burst(int num) { - m_burstQueue << qMakePair(num, QPointF(x(), y())); + m_burstQueue << std::make_pair(num, QPointF(x(), y())); } void QQuickParticleEmitter::burst(int num, qreal x, qreal y) { - m_burstQueue << qMakePair(num, QPointF(x, y)); + m_burstQueue << std::make_pair(num, QPointF(x, y)); } void QQuickParticleEmitter::setMaxParticleCount(int arg) diff --git a/src/particles/qquickparticleemitter_p.h b/src/particles/qquickparticleemitter_p.h index 60c942a221..2b1a8734da 100644 --- a/src/particles/qquickparticleemitter_p.h +++ b/src/particles/qquickparticleemitter_p.h @@ -22,8 +22,10 @@ #include "qquickdirection_p.h" #include <QList> -#include <QPair> #include <QPointF> + +#include <utility> + QT_BEGIN_NAMESPACE class Q_QUICKPARTICLES_EXPORT QQuickParticleEmitter : public QQuickItem @@ -309,7 +311,7 @@ protected: bool m_overwrite; int m_pulseLeft; - QList<QPair<int, QPointF > > m_burstQueue; + QList<std::pair<int, QPointF > > m_burstQueue; int m_maxParticleCount; //Used in default implementation, but might be useful diff --git a/src/particles/qquickparticlepainter.cpp b/src/particles/qquickparticlepainter.cpp index 0ad79a93db..db9741ce00 100644 --- a/src/particles/qquickparticlepainter.cpp +++ b/src/particles/qquickparticlepainter.cpp @@ -115,14 +115,14 @@ void QQuickParticlePainter::load(QQuickParticleData* d) initialize(d->groupId, d->index); if (m_pleaseReset) return; - m_pendingCommits << qMakePair(d->groupId, d->index); + m_pendingCommits << std::make_pair(d->groupId, d->index); } void QQuickParticlePainter::reload(QQuickParticleData* d) { if (m_pleaseReset) return; - m_pendingCommits << qMakePair(d->groupId, d->index); + m_pendingCommits << std::make_pair(d->groupId, d->index); } void QQuickParticlePainter::reset() @@ -156,7 +156,7 @@ void QQuickParticlePainter::calcSystemOffset(bool resetPending) } } } -typedef QPair<int,int> intPair; +typedef std::pair<int,int> intPair; void QQuickParticlePainter::performPendingCommits() { calcSystemOffset(); diff --git a/src/particles/qquickparticlepainter_p.h b/src/particles/qquickparticlepainter_p.h index 577d64b053..d5a000f132 100644 --- a/src/particles/qquickparticlepainter_p.h +++ b/src/particles/qquickparticlepainter_p.h @@ -17,7 +17,7 @@ #include <QObject> #include <QDebug> -#include <QPair> +#include <utility> #include "qquickparticlesystem_p.h" QT_BEGIN_NAMESPACE @@ -116,7 +116,7 @@ private: // methods private: // data QStringList m_groups; - QSet<QPair<int,int> > m_pendingCommits; + QSet<std::pair<int,int> > m_pendingCommits; mutable GroupIDs m_groupIds; mutable bool m_groupIdsNeedRecalculation; }; diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.h b/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.h index 624568eaf6..40895c894c 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.h +++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlwatcher.h @@ -17,10 +17,10 @@ #include <QtCore/qobject.h> #include <QtCore/qlist.h> -#include <QtCore/qpair.h> #include <QtCore/qhash.h> #include <QtCore/qset.h> #include <QtCore/qpointer.h> +#include <utility> QT_BEGIN_NAMESPACE diff --git a/src/plugins/qmltooling/qmldbg_inspector/globalinspector.h b/src/plugins/qmltooling/qmldbg_inspector/globalinspector.h index 8c0ae5efad..428f3c82db 100644 --- a/src/plugins/qmltooling/qmldbg_inspector/globalinspector.h +++ b/src/plugins/qmltooling/qmldbg_inspector/globalinspector.h @@ -47,7 +47,7 @@ private: bool destroyQmlObject(QObject *object, int requestId, int debugId); bool syncSelectedItems(const QList<QQuickItem *> &items); - // Hash< object to be destroyed, QPair<destroy eventId, object debugId> > + // Hash< object to be destroyed, std::pair<destroy eventId, object debugId> > QList<QQuickItem *> m_selectedItems; QHash<QQuickItem *, SelectionHighlight *> m_highlightItems; QList<QQuickWindowInspector *> m_windowInspectors; diff --git a/src/qml/jsruntime/qv4arraybuffer.cpp b/src/qml/jsruntime/qv4arraybuffer.cpp index a49bd32d66..c4ef28ae49 100644 --- a/src/qml/jsruntime/qv4arraybuffer.cpp +++ b/src/qml/jsruntime/qv4arraybuffer.cpp @@ -90,7 +90,7 @@ ReturnedValue ArrayBufferCtor::method_isView(const FunctionObject *, const Value void Heap::SharedArrayBuffer::init(size_t length) { Object::init(); - QPair<QTypedArrayData<char> *, char *> pair; + std::pair<QTypedArrayData<char> *, char *> pair; if (length < UINT_MAX) pair = QTypedArrayData<char>::allocate(length + 1); if (!pair.first) { diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 87492006e2..f2a7878147 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -63,20 +63,20 @@ using namespace Qt::StringLiterals; namespace QV4 { -QPair<QObject *, int> QObjectMethod::extractQtMethod(const FunctionObject *function) +std::pair<QObject *, int> QObjectMethod::extractQtMethod(const FunctionObject *function) { ExecutionEngine *v4 = function->engine(); if (v4) { Scope scope(v4); Scoped<QObjectMethod> method(scope, function->as<QObjectMethod>()); if (method) - return qMakePair(method->object(), method->methodIndex()); + return std::make_pair(method->object(), method->methodIndex()); } - return qMakePair((QObject *)nullptr, -1); + return std::make_pair((QObject *)nullptr, -1); } -static QPair<QObject *, int> extractQtSignal(const Value &value) +static std::pair<QObject *, int> extractQtSignal(const Value &value) { if (value.isObject()) { ExecutionEngine *v4 = value.as<Object>()->engine(); @@ -87,10 +87,10 @@ static QPair<QObject *, int> extractQtSignal(const Value &value) Scoped<QmlSignalHandler> handler(scope, value); if (handler) - return qMakePair(handler->object(), handler->signalIndex()); + return std::make_pair(handler->object(), handler->signalIndex()); } - return qMakePair((QObject *)nullptr, -1); + return std::make_pair((QObject *)nullptr, -1); } static Heap::ReferenceObject::Flags referenceFlags( @@ -1307,7 +1307,7 @@ struct QObjectSlotDispatcher : public QtPrivate::QSlotObjectBase (connection->thisObject.isUndefined() || RuntimeHelpers::strictEqual(*connection->thisObject.valueRef(), thisObject))) { ScopedFunctionObject f(scope, connection->function.value()); - QPair<QObject *, int> connectedFunctionData = QObjectMethod::extractQtMethod(f); + std::pair<QObject *, int> connectedFunctionData = QObjectMethod::extractQtMethod(f); if (connectedFunctionData.first == receiverToDisconnect && connectedFunctionData.second == slotIndexToDisconnect) { *ret = true; @@ -1340,7 +1340,7 @@ ReturnedValue QObjectWrapper::method_connect(const FunctionObject *b, const Valu if (argc == 0) THROW_GENERIC_ERROR("Function.prototype.connect: no arguments given"); - QPair<QObject *, int> signalInfo = extractQtSignal(*thisObject); + std::pair<QObject *, int> signalInfo = extractQtSignal(*thisObject); QObject *signalObject = signalInfo.first; int signalIndex = signalInfo.second; // in method range, not signal range! @@ -1382,7 +1382,7 @@ ReturnedValue QObjectWrapper::method_connect(const FunctionObject *b, const Valu } } - QPair<QObject *, int> functionData = QObjectMethod::extractQtMethod(f); // align with disconnect + std::pair<QObject *, int> functionData = QObjectMethod::extractQtMethod(f); // align with disconnect QObject *receiver = nullptr; if (functionData.first) @@ -1424,7 +1424,7 @@ ReturnedValue QObjectWrapper::method_disconnect(const FunctionObject *b, const V if (argc == 0) THROW_GENERIC_ERROR("Function.prototype.disconnect: no arguments given"); - QPair<QObject *, int> signalInfo = extractQtSignal(*thisObject); + std::pair<QObject *, int> signalInfo = extractQtSignal(*thisObject); QObject *signalObject = signalInfo.first; int signalIndex = signalInfo.second; @@ -1453,7 +1453,7 @@ ReturnedValue QObjectWrapper::method_disconnect(const FunctionObject *b, const V if (!functionThisValue->isUndefined() && !functionThisValue->isObject()) THROW_GENERIC_ERROR("Function.prototype.disconnect: target this is not an object"); - QPair<QObject *, int> functionData = QObjectMethod::extractQtMethod(functionValue); + std::pair<QObject *, int> functionData = QObjectMethod::extractQtMethod(functionValue); void *a[] = { scope.engine, diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h index 442a3f8376..397fc05d4a 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -24,9 +24,10 @@ #include <QtCore/qglobal.h> #include <QtCore/qmetatype.h> -#include <QtCore/qpair.h> #include <QtCore/qhash.h> +#include <utility> + QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcBuiltinsBindingRemoval) @@ -398,7 +399,7 @@ struct Q_QML_EXPORT QObjectMethod : public QV4::FunctionObject void callInternalWithMetaTypes( QObject *thisObject, void **argv, const QMetaType *types, int argc) const; - static QPair<QObject *, int> extractQtMethod(const QV4::FunctionObject *function); + static std::pair<QObject *, int> extractQtMethod(const QV4::FunctionObject *function); static bool isExactMatch( const QMetaMethod &method, void **argv, int argc, const QMetaType *types); diff --git a/src/qml/qml/qqmlcontext.h b/src/qml/qml/qqmlcontext.h index b02aefe1d6..6237f254cf 100644 --- a/src/qml/qml/qqmlcontext.h +++ b/src/qml/qml/qqmlcontext.h @@ -7,10 +7,10 @@ #include <QtCore/qurl.h> #include <QtCore/qobject.h> #include <QtCore/qlist.h> -#include <QtCore/qpair.h> #include <QtQml/qjsvalue.h> #include <QtCore/qmetatype.h> #include <QtCore/qvariant.h> +#include <utility> QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmldelayedcallqueue.cpp b/src/qml/qml/qqmldelayedcallqueue.cpp index 38a3f3b441..72ec154be1 100644 --- a/src/qml/qml/qqmldelayedcallqueue.cpp +++ b/src/qml/qml/qqmldelayedcallqueue.cpp @@ -85,7 +85,7 @@ QV4::ReturnedValue QQmlDelayedCallQueue::addUniquelyAndExecuteLater(QV4::Executi if (!func) THROW_GENERIC_ERROR("Qt.callLater: first argument not a function or signal"); - QPair<QObject *, int> functionData = QV4::QObjectMethod::extractQtMethod(func); + std::pair<QObject *, int> functionData = QV4::QObjectMethod::extractQtMethod(func); QVector<DelayedFunctionCall>::Iterator iter; if (functionData.second != -1) { @@ -93,7 +93,7 @@ QV4::ReturnedValue QQmlDelayedCallQueue::addUniquelyAndExecuteLater(QV4::Executi iter = self->m_delayedFunctionCalls.begin(); while (iter != self->m_delayedFunctionCalls.end()) { DelayedFunctionCall& dfc = *iter; - QPair<QObject *, int> storedFunctionData = QV4::QObjectMethod::extractQtMethod(dfc.m_function.as<QV4::FunctionObject>()); + std::pair<QObject *, int> storedFunctionData = QV4::QObjectMethod::extractQtMethod(dfc.m_function.as<QV4::FunctionObject>()); if (storedFunctionData == functionData) { break; // Already stored! } diff --git a/src/qml/qml/qqmlengine_p.h b/src/qml/qml/qqmlengine_p.h index 8e9e22dee9..60d7b4bad8 100644 --- a/src/qml/qml/qqmlengine_p.h +++ b/src/qml/qml/qqmlengine_p.h @@ -38,7 +38,6 @@ #include <QtCore/qlist.h> #include <QtCore/qmetaobject.h> #include <QtCore/qmutex.h> -#include <QtCore/qpair.h> #include <QtCore/qpointer.h> #include <QtCore/qproperty.h> #include <QtCore/qstack.h> @@ -46,6 +45,7 @@ #include <QtCore/qthread.h> #include <atomic> +#include <utility> QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index d74aeb539e..e33381c84c 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -941,14 +941,14 @@ const char *QQmlPropertyCache::className() const void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) const { - struct Sort { static bool lt(const QPair<QString, const QQmlPropertyData *> &lhs, - const QPair<QString, const QQmlPropertyData *> &rhs) { + struct Sort { static bool lt(const std::pair<QString, const QQmlPropertyData *> &lhs, + const std::pair<QString, const QQmlPropertyData *> &rhs) { return lhs.second->coreIndex() < rhs.second->coreIndex(); } }; struct Insert { static void in(const QQmlPropertyCache *This, - QList<QPair<QString, const QQmlPropertyData *> > &properties, - QList<QPair<QString, const QQmlPropertyData *> > &methods, + QList<std::pair<QString, const QQmlPropertyData *> > &properties, + QList<std::pair<QString, const QQmlPropertyData *> > &methods, StringCache::ConstIterator iter, const QQmlPropertyData *data) { if (data->isSignalHandler()) return; @@ -957,7 +957,7 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) const if (data->coreIndex() < This->methodIndexCacheStart) return; - QPair<QString, const QQmlPropertyData *> entry = qMakePair((QString)iter.key(), data); + std::pair<QString, const QQmlPropertyData *> entry = std::make_pair((QString)iter.key(), data); // Overrides can cause the entry to already exist if (!methods.contains(entry)) methods.append(entry); @@ -967,7 +967,7 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) const if (data->coreIndex() < This->propertyIndexCacheStart) return; - QPair<QString, const QQmlPropertyData *> entry = qMakePair((QString)iter.key(), data); + std::pair<QString, const QQmlPropertyData *> entry = std::make_pair((QString)iter.key(), data); // Overrides can cause the entry to already exist if (!properties.contains(entry)) properties.append(entry); @@ -979,8 +979,8 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder) const builder.setClassName(_dynamicClassName); - QList<QPair<QString, const QQmlPropertyData *> > properties; - QList<QPair<QString, const QQmlPropertyData *> > methods; + QList<std::pair<QString, const QQmlPropertyData *> > properties; + QList<std::pair<QString, const QQmlPropertyData *> > methods; for (StringCache::ConstIterator iter = stringCache.begin(), cend = stringCache.end(); iter != cend; ++iter) Insert::in(this, properties, methods, iter, iter.value().second); diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index 9cca3b9c4c..24d00c030f 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -252,7 +252,7 @@ private: QQmlPropertyCacheMethodArguments *createArgumentsObject(int count, const QList<QByteArray> &names); typedef QVector<QQmlPropertyData> IndexCache; - typedef QLinkedStringMultiHash<QPair<int, QQmlPropertyData *> > StringCache; + typedef QLinkedStringMultiHash<std::pair<int, QQmlPropertyData *> > StringCache; typedef QVector<QTypeRevision> AllowedRevisionCache; const QQmlPropertyData *findProperty(StringCache::ConstIterator it, QObject *, @@ -270,7 +270,7 @@ private: template<typename K> void setNamedProperty(const K &key, int index, QQmlPropertyData *data) { - stringCache.insert(key, qMakePair(index, data)); + stringCache.insert(key, std::make_pair(index, data)); } private: diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index e05e123c2b..9339df9687 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -34,7 +34,8 @@ #include <QtCore/qdebug.h> #include <QtCore/qlist.h> #include <QtCore/qmetaobject.h> -#include <QtCore/qpair.h> + +#include <utility> QT_BEGIN_NAMESPACE diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index b4800584a3..d2d663bfc3 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -1030,7 +1030,7 @@ private: QByteArray m_data; int m_redirectCount; - typedef QPair<QByteArray, QByteArray> HeaderPair; + typedef std::pair<QByteArray, QByteArray> HeaderPair; typedef QList<HeaderPair> HeadersList; HeadersList m_headersList; void fillHeadersList(); diff --git a/src/qmlcompiler/qqmljsimporter.cpp b/src/qmlcompiler/qqmljsimporter.cpp index 618082224c..8147e3ccf1 100644 --- a/src/qmlcompiler/qqmljsimporter.cpp +++ b/src/qmlcompiler/qqmljsimporter.cpp @@ -780,7 +780,7 @@ bool QQmlJSImporter::importHelper(const QString &module, AvailableTypes *types, QQmlJS::ContextualTypes::INTERNAL, {}, {}, types->cppNames.arrayType()))); m_cachedImportTypes[cacheKey] = cacheTypes; - const QPair<QString, QTypeRevision> importId { module, version }; + const std::pair<QString, QTypeRevision> importId { module, version }; const auto it = m_seenImports.constFind(importId); if (it != m_seenImports.constEnd()) { diff --git a/src/qmlcompiler/qqmljsimporter_p.h b/src/qmlcompiler/qqmljsimporter_p.h index b67266a5d8..858dfd7c87 100644 --- a/src/qmlcompiler/qqmljsimporter_p.h +++ b/src/qmlcompiler/qqmljsimporter_p.h @@ -257,7 +257,7 @@ private: QStringList m_importPaths; - QHash<QPair<QString, QTypeRevision>, QString> m_seenImports; + QHash<std::pair<QString, QTypeRevision>, QString> m_seenImports; QHash<QQmlJS::Import, QSharedPointer<AvailableTypes>> m_cachedImportTypes; QHash<QString, Import> m_seenQmldirFiles; diff --git a/src/qmlcompiler/qqmljsimportvisitor.cpp b/src/qmlcompiler/qqmljsimportvisitor.cpp index 249d696d11..6ac9a73a61 100644 --- a/src/qmlcompiler/qqmljsimportvisitor.cpp +++ b/src/qmlcompiler/qqmljsimportvisitor.cpp @@ -745,7 +745,7 @@ void QQmlJSImportVisitor::processMethodTypes() void QQmlJSImportVisitor::processPropertyBindingObjects() { - QSet<QPair<QQmlJSScope::Ptr, QString>> foundLiterals; + QSet<std::pair<QQmlJSScope::Ptr, QString>> foundLiterals; { // Note: populating literals here is special, because we do not store // them in m_pendingPropertyObjectBindings, so we have to lookup all @@ -753,11 +753,11 @@ void QQmlJSImportVisitor::processPropertyBindingObjects() // literal bindings there. this is safe to do once at the beginning // because this function doesn't add new literal bindings and all // literal bindings must already be added at this point. - QSet<QPair<QQmlJSScope::Ptr, QString>> visited; + QSet<std::pair<QQmlJSScope::Ptr, QString>> visited; for (const PendingPropertyObjectBinding &objectBinding : std::as_const(m_pendingPropertyObjectBindings)) { // unique because it's per-scope and per-property - const auto uniqueBindingId = qMakePair(objectBinding.scope, objectBinding.name); + const auto uniqueBindingId = std::make_pair(objectBinding.scope, objectBinding.name); if (visited.contains(uniqueBindingId)) continue; visited.insert(uniqueBindingId); @@ -772,9 +772,9 @@ void QQmlJSImportVisitor::processPropertyBindingObjects() } } - QSet<QPair<QQmlJSScope::Ptr, QString>> foundObjects; - QSet<QPair<QQmlJSScope::Ptr, QString>> foundInterceptors; - QSet<QPair<QQmlJSScope::Ptr, QString>> foundValueSources; + QSet<std::pair<QQmlJSScope::Ptr, QString>> foundObjects; + QSet<std::pair<QQmlJSScope::Ptr, QString>> foundInterceptors; + QSet<std::pair<QQmlJSScope::Ptr, QString>> foundValueSources; for (const PendingPropertyObjectBinding &objectBinding : std::as_const(m_pendingPropertyObjectBindings)) { @@ -834,7 +834,7 @@ void QQmlJSImportVisitor::processPropertyBindingObjects() causesImplicitComponentWrapping(property, childScope)); // unique because it's per-scope and per-property - const auto uniqueBindingId = qMakePair(objectBinding.scope, objectBinding.name); + const auto uniqueBindingId = std::make_pair(objectBinding.scope, objectBinding.name); const QString typeName = getScopeName(childScope, QQmlSA::ScopeType::QMLScope); if (objectBinding.onToken) { diff --git a/src/qmlcompiler/qqmljsmetatypes_p.h b/src/qmlcompiler/qqmljsmetatypes_p.h index 0d0a20a69d..712c0e2c91 100644 --- a/src/qmlcompiler/qqmljsmetatypes_p.h +++ b/src/qmlcompiler/qqmljsmetatypes_p.h @@ -232,7 +232,7 @@ public: void setReturnType(QWeakPointer<const QQmlJSScope> type) { m_returnType.setType(type); } QList<QQmlJSMetaParameter> parameters() const { return m_parameters; } - QPair<QList<QQmlJSMetaParameter>::iterator, QList<QQmlJSMetaParameter>::iterator> + std::pair<QList<QQmlJSMetaParameter>::iterator, QList<QQmlJSMetaParameter>::iterator> mutableParametersRange() { return { m_parameters.begin(), m_parameters.end() }; diff --git a/src/qmlcompiler/qqmljsscope.cpp b/src/qmlcompiler/qqmljsscope.cpp index bfe970b966..209ce3c622 100644 --- a/src/qmlcompiler/qqmljsscope.cpp +++ b/src/qmlcompiler/qqmljsscope.cpp @@ -845,7 +845,7 @@ void QQmlJSScope::addOwnPropertyBinding(const QQmlJSMetaPropertyBinding &binding // NB: insert() prepends \a binding to the list of bindings, but we need // append, so rotate using iter = typename QMultiHash<QString, QQmlJSMetaPropertyBinding>::iterator; - QPair<iter, iter> r = m_propertyBindings.equal_range(binding.propertyName()); + std::pair<iter, iter> r = m_propertyBindings.equal_range(binding.propertyName()); std::rotate(r.first, std::next(r.first), r.second); // additionally store bindings in the QmlIR compatible order diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h index f3b12e09dc..c481eefa04 100644 --- a/src/qmlcompiler/qqmljsscope_p.h +++ b/src/qmlcompiler/qqmljsscope_p.h @@ -203,7 +203,7 @@ public: }; template <typename Key, typename Value> - using QMultiHashRange = QPair<typename QMultiHash<Key, Value>::iterator, + using QMultiHashRange = std::pair<typename QMultiHash<Key, Value>::iterator, typename QMultiHash<Key, Value>::iterator>; static QQmlJSScope::Ptr create() { return QSharedPointer<QQmlJSScope>(new QQmlJSScope); } @@ -315,7 +315,7 @@ public: const QQmlJSMetaPropertyBinding &binding, BindingTargetSpecifier specifier = BindingTargetSpecifier::SimplePropertyTarget); QMultiHash<QString, QQmlJSMetaPropertyBinding> ownPropertyBindings() const; - QPair<QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator, + std::pair<QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator, QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator> ownPropertyBindings(const QString &name) const; QList<QQmlJSMetaPropertyBinding> ownPropertyBindingsInQmlIROrder() const; @@ -619,7 +619,7 @@ inline QMultiHash<QString, QQmlJSMetaPropertyBinding> QQmlJSScope::ownPropertyBi return m_propertyBindings; } -inline QPair<QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator, QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator> QQmlJSScope::ownPropertyBindings(const QString &name) const +inline std::pair<QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator, QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator> QQmlJSScope::ownPropertyBindings(const QString &name) const { return m_propertyBindings.equal_range(name); } diff --git a/src/qmlcompiler/qqmljstypereader_p.h b/src/qmlcompiler/qqmljstypereader_p.h index 734b9336d5..75a9da3639 100644 --- a/src/qmlcompiler/qqmljstypereader_p.h +++ b/src/qmlcompiler/qqmljstypereader_p.h @@ -20,9 +20,10 @@ #include <QtQml/private/qqmljsastfwd_p.h> #include <QtQml/private/qqmljsdiagnosticmessage_p.h> -#include <QtCore/qpair.h> #include <QtCore/qset.h> +#include <utility> + QT_BEGIN_NAMESPACE class QQmlJSTypeReader diff --git a/src/qmlcompiler/qqmlsa.cpp b/src/qmlcompiler/qqmlsa.cpp index bf4893e06b..8d3d4db7a5 100644 --- a/src/qmlcompiler/qqmlsa.cpp +++ b/src/qmlcompiler/qqmlsa.cpp @@ -1127,7 +1127,7 @@ BindingsPrivate::createBindings(const QMultiHash<QString, QQmlJSMetaPropertyBind } QQmlSA::Binding::Bindings BindingsPrivate::createBindings( - QPair<QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator, + std::pair<QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator, QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator> iterators) { QMultiHash<QString, QQmlSA::Binding> saBindings; diff --git a/src/qmlcompiler/qqmlsa_p.h b/src/qmlcompiler/qqmlsa_p.h index dde1268943..f820276d6c 100644 --- a/src/qmlcompiler/qqmlsa_p.h +++ b/src/qmlcompiler/qqmlsa_p.h @@ -68,7 +68,7 @@ public: static QQmlSA::Binding::Bindings createBindings(const QMultiHash<QString, QQmlJSMetaPropertyBinding> &); static QQmlSA::Binding::Bindings - createBindings(QPair<QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator, + createBindings(std::pair<QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator, QMultiHash<QString, QQmlJSMetaPropertyBinding>::const_iterator>); private: diff --git a/src/qmldom/qqmldomelements.cpp b/src/qmldom/qqmldomelements.cpp index c5e2bab319..4b18bce50f 100644 --- a/src/qmldom/qqmldomelements.cpp +++ b/src/qmldom/qqmldomelements.cpp @@ -735,7 +735,7 @@ void QmlObject::writeOutId(const DomItem &self, OutWriter &ow) const } } -QList<QPair<SourceLocation, DomItem>> QmlObject::orderOfAttributes(const DomItem &self, +QList<std::pair<SourceLocation, DomItem>> QmlObject::orderOfAttributes(const DomItem &self, const DomItem &component) const { auto startLoc = [&](const FileLocations::Tree &l) { @@ -744,7 +744,7 @@ QList<QPair<SourceLocation, DomItem>> QmlObject::orderOfAttributes(const DomItem return SourceLocation(posOfNewElements, 0, 0, 0); }; - QList<QPair<SourceLocation, DomItem>> attribs; + QList<std::pair<SourceLocation, DomItem>> attribs; const auto objLocPtr = FileLocations::treeOf(self); FileLocations::Tree componentLoc; if (component && objLocPtr) @@ -809,7 +809,7 @@ QList<QPair<SourceLocation, DomItem>> QmlObject::orderOfAttributes(const DomItem void QmlObject::writeOutAttributes(const DomItem &self, OutWriter &ow, const DomItem &component, const QString &code) const { - const QList<QPair<SourceLocation, DomItem>> attribs = orderOfAttributes(self, component); + const QList<std::pair<SourceLocation, DomItem>> attribs = orderOfAttributes(self, component); qsizetype iAttr = 0; while (iAttr != attribs.size()) { auto &el = attribs[iAttr++]; diff --git a/src/qmldom/qqmldomelements_p.h b/src/qmldom/qqmldomelements_p.h index bc61058c72..c667da93a5 100644 --- a/src/qmldom/qqmldomelements_p.h +++ b/src/qmldom/qqmldomelements_p.h @@ -27,13 +27,13 @@ #include <QtCore/QCborValue> #include <QtCore/QCborMap> #include <QtCore/QMutexLocker> -#include <QtCore/QPair> #include <memory> #include <private/qqmljsscope_p.h> #include <functional> #include <limits> +#include <utility> QT_BEGIN_NAMESPACE @@ -959,7 +959,7 @@ public: m_annotations, annotation, aPtr); } - QList<QPair<SourceLocation, DomItem>> orderOfAttributes(const DomItem &self, + QList<std::pair<SourceLocation, DomItem>> orderOfAttributes(const DomItem &self, const DomItem &component) const; void writeOutAttributes(const DomItem &self, OutWriter &ow, const DomItem &component, const QString &code) const; diff --git a/src/qmldom/qqmldomitem.cpp b/src/qmldom/qqmldomitem.cpp index 9d1d6257cb..4711285807 100644 --- a/src/qmldom/qqmldomitem.cpp +++ b/src/qmldom/qqmldomitem.cpp @@ -34,13 +34,13 @@ #include <QtCore/QJsonDocument> #include <QtCore/QJsonValue> #include <QtCore/QMutexLocker> -#include <QtCore/QPair> #include <QtCore/QRegularExpression> #include <QtCore/QScopeGuard> #include <QtCore/QtGlobal> #include <QtCore/QTimeZone> #include <optional> #include <type_traits> +#include <utility> QT_BEGIN_NAMESPACE @@ -826,7 +826,7 @@ bool DomItem::resolve(const Path &path, DomItem::Visitor visitor, const ErrorHan if (idNow == quintptr() && toDo.item == *this) idNow = quintptr(this); if (idNow != quintptr(0)) { - auto vPair = qMakePair(idNow, iPath); + auto vPair = std::make_pair(idNow, iPath); if (visited[vPair.second].contains(vPair.first)) break; visited[vPair.second].insert(vPair.first); @@ -989,7 +989,7 @@ bool DomItem::resolve(const Path &path, DomItem::Visitor visitor, const ErrorHan if (idNow == quintptr(0) && toDo.item == *this) idNow = quintptr(this); if (idNow != quintptr(0)) { - auto vPair = qMakePair(idNow, iPath); + auto vPair = std::make_pair(idNow, iPath); if (visited[vPair.second].contains(vPair.first)) break; visited[vPair.second].insert(vPair.first); @@ -1885,7 +1885,7 @@ static bool visitQualifiedNameLookup( QList<QSet<quintptr>> lookupVisited(subpath.size() + 1); while (!lookupToDos.isEmpty()) { ResolveToDo tNow = lookupToDos.takeFirst(); - auto vNow = qMakePair(tNow.item.id(), tNow.pathIndex); + auto vNow = std::make_pair(tNow.item.id(), tNow.pathIndex); DomItem subNow = tNow.item; int iSubPath = tNow.pathIndex; Q_ASSERT(iSubPath < subpath.size()); diff --git a/src/qmldom/qqmldommock_p.h b/src/qmldom/qqmldommock_p.h index 97504cc631..9d977c4df1 100644 --- a/src/qmldom/qqmldommock_p.h +++ b/src/qmldom/qqmldommock_p.h @@ -26,10 +26,10 @@ #include <QtCore/QCborValue> #include <QtCore/QCborMap> #include <QtCore/QMutexLocker> -#include <QtCore/QPair> #include <functional> #include <limits> +#include <utility> QT_BEGIN_NAMESPACE diff --git a/src/qmldom/qqmldomtop.cpp b/src/qmldom/qqmldomtop.cpp index 909531118b..5bd796af2a 100644 --- a/src/qmldom/qqmldomtop.cpp +++ b/src/qmldom/qqmldomtop.cpp @@ -25,7 +25,6 @@ #include <QtCore/QDir> #include <QtCore/QFile> #include <QtCore/QFileInfo> -#include <QtCore/QPair> #include <QtCore/QRegularExpression> #include <QtCore/QScopeGuard> #if QT_FEATURE_thread @@ -33,6 +32,7 @@ #endif #include <memory> +#include <utility> QT_BEGIN_NAMESPACE diff --git a/src/qmldom/qqmldomtop_p.h b/src/qmldom/qqmldomtop_p.h index 0bf1d64473..6ef33091f9 100644 --- a/src/qmldom/qqmldomtop_p.h +++ b/src/qmldom/qqmldomtop_p.h @@ -385,7 +385,7 @@ private: // - current ExternalItemPair, current value in the map (might be empty, or equal to curValue) // - new current ExternalItemPair, value in the map after after the execution of this function template <typename T> - QPair<std::shared_ptr<ExternalItemPair<T>>, std::shared_ptr<ExternalItemPair<T>>> + std::pair<std::shared_ptr<ExternalItemPair<T>>, std::shared_ptr<ExternalItemPair<T>>> insertOrUpdateEntry(std::shared_ptr<T> newItem) { std::shared_ptr<ExternalItemPair<T>> curValue; @@ -426,7 +426,7 @@ private: map.insert(canonicalPath, newCurValue); } } - return qMakePair(curValue, newCurValue); + return std::make_pair(curValue, newCurValue); } // Inserts or updates an entry reflecting ExternalItem in the corresponding map @@ -1039,7 +1039,7 @@ private: } using FetchResult = - QPair<std::shared_ptr<ExternalItemInfoBase>, std::shared_ptr<ExternalItemInfoBase>>; + std::pair<std::shared_ptr<ExternalItemInfoBase>, std::shared_ptr<ExternalItemInfoBase>>; // This function tries to get an Info object about the ExternalItem from the current env // and depending on the result and options tries to fetch it from the Parent env, // saving a copy with an updated timestamp @@ -1049,7 +1049,7 @@ private: const auto &path = file.canonicalPath(); // lookup only in the current env if (auto value = lookup<T>(path, EnvLookup::NoBase)) { - return qMakePair(value, value); + return std::make_pair(value, value); } // try to find the file in the base(parent) Env and insert if found if (options() & Option::NoReload) { @@ -1068,14 +1068,14 @@ private: auto &map = getMutableRefToMap<T>(); const auto &it = map.find(path); if (it != map.end()) - return qMakePair(*it, *it); + return std::make_pair(*it, *it); // otherwise insert map.insert(path, curV); } - return qMakePair(baseV, curV); + return std::make_pair(baseV, curV); } } - return qMakePair(nullptr, nullptr); + return std::make_pair(nullptr, nullptr); } Callback getLoadCallbackFor(DomType fileType, const Callback &loadCallback); diff --git a/src/qmlls/qqmllsutils.cpp b/src/qmlls/qqmllsutils.cpp index b3dac1f014..d0c9ac9201 100644 --- a/src/qmlls/qqmllsutils.cpp +++ b/src/qmlls/qqmllsutils.cpp @@ -2408,9 +2408,9 @@ https://doc.qt.io/qt-6/windows-building.html#step-2-install-build-requirements c to have CMake in your path to build Qt. So a developer machine running qmlls has a high chance of having CMake in their path, if CMake is installed and used. */ -QPair<QString, QStringList> cmakeBuildCommand(const QString &path) +std::pair<QString, QStringList> cmakeBuildCommand(const QString &path) { - const QPair<QString, QStringList> result{ + const std::pair<QString, QStringList> result{ u"cmake"_s, { u"--build"_s, path, u"-t"_s, u"all_qmltyperegistrations"_s } }; return result; diff --git a/src/qmlls/qqmllsutils_p.h b/src/qmlls/qqmllsutils_p.h index 0558e465da..6d91fd8866 100644 --- a/src/qmlls/qqmllsutils_p.h +++ b/src/qmlls/qqmllsutils_p.h @@ -274,7 +274,7 @@ RenameUsages renameUsagesOf(const DomItem &item, const QString &newName, std::optional<ExpressionType> resolveExpressionType(const DomItem &item, ResolveOptions); bool isValidEcmaScriptIdentifier(QStringView view); -QPair<QString, QStringList> cmakeBuildCommand(const QString &path); +std::pair<QString, QStringList> cmakeBuildCommand(const QString &path); bool isFieldMemberExpression(const DomItem &item); bool isFieldMemberAccess(const DomItem &item); diff --git a/src/qmlmodels/qqmlchangeset_p.h b/src/qmlmodels/qqmlchangeset_p.h index b31177bf45..18c4e1b8e6 100644 --- a/src/qmlmodels/qqmlchangeset_p.h +++ b/src/qmlmodels/qqmlchangeset_p.h @@ -116,7 +116,7 @@ private: Q_DECLARE_TYPEINFO(QQmlChangeSet::Change, Q_PRIMITIVE_TYPE); Q_DECLARE_TYPEINFO(QQmlChangeSet::MoveKey, Q_PRIMITIVE_TYPE); -inline size_t qHash(const QQmlChangeSet::MoveKey &key) { return qHash(qMakePair(key.moveId, key.offset)); } +inline size_t qHash(const QQmlChangeSet::MoveKey &key) { return qHash(std::make_pair(key.moveId, key.offset)); } inline bool operator ==(const QQmlChangeSet::MoveKey &l, const QQmlChangeSet::MoveKey &r) { return l.moveId == r.moveId && l.offset == r.offset; } diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp index f216a09973..0bb0466e54 100644 --- a/src/qmlmodels/qqmldelegatemodel.cpp +++ b/src/qmlmodels/qqmldelegatemodel.cpp @@ -980,20 +980,20 @@ void QQDMIncubationTask::initializeRequiredProperties( // column, model and more // the most derived subclasses of QQmlDelegateModelItem are QQmlDMAbstractItemModelData and // QQmlDMObjectData at depth 2, so 4 should be plenty - QVarLengthArray<QPair<const QMetaObject *, QObject *>, 4> mos; + QVarLengthArray<std::pair<const QMetaObject *, QObject *>, 4> mos; // we first check the dynamic meta object for properties originating from the model // contains abstractitemmodelproperties - mos.push_back(qMakePair(qmlMetaObject, modelItemToIncubate)); + mos.push_back(std::make_pair(qmlMetaObject, modelItemToIncubate)); auto delegateModelItemSubclassMO = qmlMetaObject->superClass(); - mos.push_back(qMakePair(delegateModelItemSubclassMO, modelItemToIncubate)); + mos.push_back(std::make_pair(delegateModelItemSubclassMO, modelItemToIncubate)); while (strcmp(delegateModelItemSubclassMO->className(), modelItemToIncubate->staticMetaObject.className())) { delegateModelItemSubclassMO = delegateModelItemSubclassMO->superClass(); - mos.push_back(qMakePair(delegateModelItemSubclassMO, modelItemToIncubate)); + mos.push_back(std::make_pair(delegateModelItemSubclassMO, modelItemToIncubate)); } if (proxiedObject) - mos.push_back(qMakePair(proxiedObject->metaObject(), proxiedObject)); + mos.push_back(std::make_pair(proxiedObject->metaObject(), proxiedObject)); QQmlEngine *engine = QQmlEnginePrivate::get(incubatorPriv->enginePriv); QV4::ExecutionEngine *v4 = engine->handle(); diff --git a/src/qmlmodels/qqmltreemodeltotablemodel.cpp b/src/qmlmodels/qqmltreemodeltotablemodel.cpp index 67104b35ba..95d793a8c9 100644 --- a/src/qmlmodels/qqmltreemodeltotablemodel.cpp +++ b/src/qmlmodels/qqmltreemodeltotablemodel.cpp @@ -294,7 +294,7 @@ QItemSelection QQmlTreeModelToTableModel::selectionForRowRange(const QModelInde if (from > to) qSwap(from, to); - typedef QPair<QModelIndex, QModelIndex> MIPair; + typedef std::pair<QModelIndex, QModelIndex> MIPair; typedef QHash<QModelIndex, MIPair> MI2MIPairHash; MI2MIPairHash ranges; QModelIndex firstIndex = m_items.at(from).index; diff --git a/src/qmltyperegistrar/qqmljsstreamwriter.cpp b/src/qmltyperegistrar/qqmljsstreamwriter.cpp index 32ca4e3b1b..74f8e74e22 100644 --- a/src/qmltyperegistrar/qqmljsstreamwriter.cpp +++ b/src/qmltyperegistrar/qqmljsstreamwriter.cpp @@ -192,7 +192,7 @@ void QQmlJSStreamWriter::write(QByteArrayView data) } void QQmlJSStreamWriter::writeEnumObjectLiteralBinding( - QByteArrayView name, const QList<QPair<QAnyStringView, int> > &keyValue) + QByteArrayView name, const QList<std::pair<QAnyStringView, int> > &keyValue) { flushPotentialLinesWithNewlines(); writeIndent(); diff --git a/src/qmltyperegistrar/qqmljsstreamwriter_p.h b/src/qmltyperegistrar/qqmljsstreamwriter_p.h index ef961de69c..5d1a65d9f5 100644 --- a/src/qmltyperegistrar/qqmljsstreamwriter_p.h +++ b/src/qmltyperegistrar/qqmljsstreamwriter_p.h @@ -18,7 +18,7 @@ #include <QtCore/QList> #include <QtCore/QString> #include <QtCore/QScopedPointer> -#include <QtCore/QPair> +#include <utility> QT_BEGIN_NAMESPACE @@ -39,7 +39,7 @@ public: // TODO: Drop this once we can drop qmlplugindump. It is substantially weird. void writeEnumObjectLiteralBinding( - QByteArrayView name, const QList<QPair<QAnyStringView, int>> &keyValue); + QByteArrayView name, const QList<std::pair<QAnyStringView, int>> &keyValue); // TODO: these would look better with generator functions. void writeArrayBinding(QByteArrayView name, const QByteArrayList &elements); diff --git a/src/qmlxmllistmodel/qqmlxmllistmodel.cpp b/src/qmlxmllistmodel/qqmlxmllistmodel.cpp index b2b1d4ab33..2e7cc4b466 100644 --- a/src/qmlxmllistmodel/qqmlxmllistmodel.cpp +++ b/src/qmlxmllistmodel/qqmlxmllistmodel.cpp @@ -889,14 +889,14 @@ void QQmlXmlListModelQueryRunnable::processElement(QQmlXmlListModelQueryResult * readSubTree(QString(), reader, results, ¤tResult->errors); if (reader.hasError()) - currentResult->errors.push_back(qMakePair(this, reader.errorString())); + currentResult->errors.push_back(std::make_pair(this, reader.errorString())); currentResult->data << results; } void QQmlXmlListModelQueryRunnable::readSubTree(const QString &prefix, QXmlStreamReader &reader, QFlatMap<int, QString> &results, - QList<QPair<void *, QString>> *errors) + QList<std::pair<void *, QString>> *errors) { const QStringList &elementNames = m_job.elementNames; const QStringList &attributes = m_job.elementAttributes; @@ -925,7 +925,7 @@ void QQmlXmlListModelQueryRunnable::readSubTree(const QString &prefix, QXmlStrea if (elementAttributes.hasAttribute(attribute)) { roleResult = elementAttributes.value(attributes.at(index)).toString(); } else { - errors->push_back(qMakePair(m_job.roleQueryErrorId.at(index), + errors->push_back(std::make_pair(m_job.roleQueryErrorId.at(index), QLatin1String("Attribute %1 not found") .arg(attributes[index]))); } diff --git a/src/qmlxmllistmodel/qqmlxmllistmodel_p.h b/src/qmlxmllistmodel/qqmlxmllistmodel_p.h index 81622d880e..b1620349a8 100644 --- a/src/qmlxmllistmodel/qqmlxmllistmodel_p.h +++ b/src/qmlxmllistmodel/qqmlxmllistmodel_p.h @@ -55,7 +55,7 @@ struct QQmlXmlListModelQueryResult public: int queryId; QList<QFlatMap<int, QString>> data; - QList<QPair<void *, QString>> errors; + QList<std::pair<void *, QString>> errors; }; class Q_QMLXMLLISTMODEL_EXPORT QQmlXmlListModelRole : public QObject @@ -208,7 +208,7 @@ private: void processElement(QQmlXmlListModelQueryResult *currentResult, const QString &element, QXmlStreamReader &reader); void readSubTree(const QString &prefix, QXmlStreamReader &reader, - QFlatMap<int, QString> &results, QList<QPair<void *, QString>> *errors); + QFlatMap<int, QString> &results, QList<std::pair<void *, QString>> *errors); QQmlXmlListModelQueryJob m_job; QPromise<QQmlXmlListModelQueryResult> m_promise; 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; } diff --git a/src/quicknativestyle/qstyle/mac/qquickmacstyle_mac_p_p.h b/src/quicknativestyle/qstyle/mac/qquickmacstyle_mac_p_p.h index 90ab2ecab4..6a532e19c6 100644 --- a/src/quicknativestyle/qstyle/mac/qquickmacstyle_mac_p_p.h +++ b/src/quicknativestyle/qstyle/mac/qquickmacstyle_mac_p_p.h @@ -13,7 +13,6 @@ #include <QtCore/qhash.h> #include <QtCore/qmap.h> #include <QtCore/qmath.h> -#include <QtCore/qpair.h> #include <QtCore/qpointer.h> #include <QtCore/qtextstream.h> #include <QtCore/qvector.h> @@ -29,6 +28,8 @@ #include <QtCore/private/qcore_mac_p.h> #include <QtGui/private/qpainter_p.h> +#include <utility> + // // W A R N I N G // ------------- diff --git a/src/quicktestutils/qml/testhttpserver.cpp b/src/quicktestutils/qml/testhttpserver.cpp index f6003b4a71..9e24e860d4 100644 --- a/src/quicktestutils/qml/testhttpserver.cpp +++ b/src/quicktestutils/qml/testhttpserver.cpp @@ -107,7 +107,7 @@ QString TestHTTPServer::errorString() const bool TestHTTPServer::serveDirectory(const QString &dir, Mode mode) { - m_directories.append(qMakePair(dir, mode)); + m_directories.append(std::make_pair(dir, mode)); return true; } @@ -328,7 +328,7 @@ bool TestHTTPServer::reply(QTcpSocket *socket, const QByteArray &fileNameIn) response += data; if (mode == Delay) { - m_toSend.append(qMakePair(socket, response)); + m_toSend.append(std::make_pair(socket, response)); QTimer::singleShot(500, this, &TestHTTPServer::sendOne); return false; } @@ -341,7 +341,7 @@ bool TestHTTPServer::reply(QTcpSocket *socket, const QByteArray &fileNameIn) socket->write(response.left(m_chunkSize)); for (qsizetype offset = m_chunkSize, end = response.length(); offset < end; offset += m_chunkSize) { - m_toSend.append(qMakePair(socket, response.mid(offset, m_chunkSize))); + m_toSend.append(std::make_pair(socket, response.mid(offset, m_chunkSize))); } QTimer::singleShot(1, this, &TestHTTPServer::sendChunk); diff --git a/src/quicktestutils/qml/testhttpserver_p.h b/src/quicktestutils/qml/testhttpserver_p.h index df8c893e44..3da69232ca 100644 --- a/src/quicktestutils/qml/testhttpserver_p.h +++ b/src/quicktestutils/qml/testhttpserver_p.h @@ -17,7 +17,6 @@ #include <QTcpServer> #include <QUrl> -#include <QPair> #include <QThread> #include <QMutex> #include <QWaitCondition> @@ -26,6 +25,7 @@ #include <QSet> #include <QList> #include <QString> +#include <utility> QT_BEGIN_NAMESPACE @@ -76,9 +76,9 @@ private: void serveGET(QTcpSocket *, const QByteArray &); bool reply(QTcpSocket *, const QByteArray &); - QList<QPair<QString, Mode> > m_directories; + QList<std::pair<QString, Mode> > m_directories; QHash<QTcpSocket *, QByteArray> m_dataCache; - QList<QPair<QTcpSocket *, QByteArray> > m_toSend; + QList<std::pair<QTcpSocket *, QByteArray> > m_toSend; QSet<QString> m_contentSubstitutedFileNames; struct WaitData { diff --git a/src/quicktestutils/quick/viewtestutils.cpp b/src/quicktestutils/quick/viewtestutils.cpp index 50f4405828..6b4c9b02b3 100644 --- a/src/quicktestutils/quick/viewtestutils.cpp +++ b/src/quicktestutils/quick/viewtestutils.cpp @@ -153,30 +153,30 @@ QString QQuickViewTestUtils::QaimModel::number(int index) const void QQuickViewTestUtils::QaimModel::addItem(const QString &name, const QString &number) { emit beginInsertRows(QModelIndex(), list.size(), list.size()); - list.append(QPair<QString,QString>(name, number)); + list.append(std::pair<QString,QString>(name, number)); emit endInsertRows(); } -void QQuickViewTestUtils::QaimModel::addItems(const QList<QPair<QString, QString> > &items) +void QQuickViewTestUtils::QaimModel::addItems(const QList<std::pair<QString, QString> > &items) { emit beginInsertRows(QModelIndex(), list.size(), list.size()+items.size()-1); for (int i=0; i<items.size(); i++) - list.append(QPair<QString,QString>(items[i].first, items[i].second)); + list.append(std::pair<QString,QString>(items[i].first, items[i].second)); emit endInsertRows(); } void QQuickViewTestUtils::QaimModel::insertItem(int index, const QString &name, const QString &number) { emit beginInsertRows(QModelIndex(), index, index); - list.insert(index, QPair<QString,QString>(name, number)); + list.insert(index, std::pair<QString,QString>(name, number)); emit endInsertRows(); } -void QQuickViewTestUtils::QaimModel::insertItems(int index, const QList<QPair<QString, QString> > &items) +void QQuickViewTestUtils::QaimModel::insertItems(int index, const QList<std::pair<QString, QString> > &items) { emit beginInsertRows(QModelIndex(), index, index+items.size()-1); for (int i=0; i<items.size(); i++) - list.insert(index + i, QPair<QString,QString>(items[i].first, items[i].second)); + list.insert(index + i, std::pair<QString,QString>(items[i].first, items[i].second)); emit endInsertRows(); } @@ -211,7 +211,7 @@ void QQuickViewTestUtils::QaimModel::moveItems(int from, int to, int count) void QQuickViewTestUtils::QaimModel::modifyItem(int idx, const QString &name, const QString &number) { - list[idx] = QPair<QString,QString>(name, number); + list[idx] = std::pair<QString,QString>(name, number); emit dataChanged(index(idx,0), index(idx,0)); } @@ -231,7 +231,7 @@ void QQuickViewTestUtils::QaimModel::reset() emit endResetModel(); } -void QQuickViewTestUtils::QaimModel::resetItems(const QList<QPair<QString, QString> > &items) +void QQuickViewTestUtils::QaimModel::resetItems(const QList<std::pair<QString, QString> > &items) { beginResetModel(); list = items; @@ -252,7 +252,7 @@ private: const char *data; }; -void QQuickViewTestUtils::QaimModel::matchAgainst(const QList<QPair<QString, QString> > &other, const QString &error1, const QString &error2) { +void QQuickViewTestUtils::QaimModel::matchAgainst(const QList<std::pair<QString, QString> > &other, const QString &error1, const QString &error2) { for (int i=0; i<other.size(); i++) { QVERIFY2(list.contains(other[i]), ScopedPrintable(other[i].first + QLatin1Char(' ') + other[i].second + QLatin1Char(' ') + error1)); @@ -317,13 +317,13 @@ int QQuickViewTestUtils::ListRange::count() const return indexes.size(); } -QList<QPair<QString,QString> > QQuickViewTestUtils::ListRange::getModelDataValues(const QaimModel &model) +QList<std::pair<QString,QString> > QQuickViewTestUtils::ListRange::getModelDataValues(const QaimModel &model) { - QList<QPair<QString,QString> > data; + QList<std::pair<QString,QString> > data; if (!valid) return data; for (int i=0; i<indexes.size(); i++) - data.append(qMakePair(model.name(indexes[i]), model.number(indexes[i]))); + data.append(std::make_pair(model.name(indexes[i]), model.number(indexes[i]))); return data; } diff --git a/src/quicktestutils/quick/viewtestutils_p.h b/src/quicktestutils/quick/viewtestutils_p.h index 0fced3e0d5..2b7269759d 100644 --- a/src/quicktestutils/quick/viewtestutils_p.h +++ b/src/quicktestutils/quick/viewtestutils_p.h @@ -73,9 +73,9 @@ namespace QQuickViewTestUtils QString number(int index) const; Q_INVOKABLE void addItem(const QString &name, const QString &number); - void addItems(const QList<QPair<QString, QString> > &items); + void addItems(const QList<std::pair<QString, QString> > &items); void insertItem(int index, const QString &name, const QString &number); - void insertItems(int index, const QList<QPair<QString, QString> > &items); + void insertItems(int index, const QList<std::pair<QString, QString> > &items); Q_INVOKABLE void removeItem(int index); void removeItems(int index, int count); @@ -87,16 +87,16 @@ namespace QQuickViewTestUtils void clear(); void reset(); - void resetItems(const QList<QPair<QString, QString> > &items); + void resetItems(const QList<std::pair<QString, QString> > &items); - void matchAgainst(const QList<QPair<QString, QString> > &other, const QString &error1, const QString &error2); + void matchAgainst(const QList<std::pair<QString, QString> > &other, const QString &error1, const QString &error2); using QAbstractListModel::dataChanged; int columns = 1; private: - QList<QPair<QString,QString> > list; + QList<std::pair<QString,QString> > list; }; class ListRange @@ -115,7 +115,7 @@ namespace QQuickViewTestUtils bool isValid() const; int count() const; - QList<QPair<QString,QString> > getModelDataValues(const QaimModel &model); + QList<std::pair<QString,QString> > getModelDataValues(const QaimModel &model); QList<int> indexes; bool valid; diff --git a/src/quickvectorimage/generator/qquickanimatedproperty_p.h b/src/quickvectorimage/generator/qquickanimatedproperty_p.h index dc43b526ce..4d86a1c122 100644 --- a/src/quickvectorimage/generator/qquickanimatedproperty_p.h +++ b/src/quickvectorimage/generator/qquickanimatedproperty_p.h @@ -15,9 +15,9 @@ // We mean it. // -#include <QPair> #include <QMap> #include <QVariant> +#include <utility> QT_BEGIN_NAMESPACE diff --git a/src/quickvectorimage/generator/qsvgvisitorimpl.cpp b/src/quickvectorimage/generator/qsvgvisitorimpl.cpp index 1d28bf220f..672ae04631 100644 --- a/src/quickvectorimage/generator/qsvgvisitorimpl.cpp +++ b/src/quickvectorimage/generator/qsvgvisitorimpl.cpp @@ -1096,7 +1096,7 @@ QList<QSvgVisitorImpl::AnimationPair> QSvgVisitorImpl::collectAnimations(const Q const QList<QSvgAbstractAnimatedProperty *> properties = animation->properties(); for (const QSvgAbstractAnimatedProperty *property : properties) { if (property->propertyName() == propertyName) - ret.append(qMakePair(animation, property)); + ret.append(std::make_pair(animation, property)); } } diff --git a/src/quickvectorimage/generator/qsvgvisitorimpl_p.h b/src/quickvectorimage/generator/qsvgvisitorimpl_p.h index 4ca0c5b4b8..8d3bd1f86c 100644 --- a/src/quickvectorimage/generator/qsvgvisitorimpl_p.h +++ b/src/quickvectorimage/generator/qsvgvisitorimpl_p.h @@ -54,7 +54,7 @@ protected: void visitSwitchNodeEnd(const QSvgSwitch *node) override; private: - typedef QPair<const QSvgAbstractAnimation *, const QSvgAbstractAnimatedProperty *> AnimationPair; + typedef std::pair<const QSvgAbstractAnimation *, const QSvgAbstractAnimatedProperty *> AnimationPair; QList<AnimationPair> collectAnimations(const QSvgNode *node, const QString &propertyName); void applyAnimationsToProperty(const QList<AnimationPair> &animations, QQuickAnimatedProperty *property, |