diff options
author | Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org> | 2019-11-04 03:00:55 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-11-04 13:55:43 +0100 |
commit | c34155c55259edfaba104d66095a2670f9d936e7 (patch) | |
tree | 45eab905d8b55150b153082976068e9b4d0789f2 /src | |
parent | 63b58773d56ecfddfe6d25cb13c06f3dff9737e9 (diff) | |
download | qtxmlpatterns-c34155c55259edfaba104d66095a2670f9d936e7.tar.gz |
Update dependencies on 'dev' in qt/qtxmlpatterns
Also applied build fixes to build with QList == QVector.
This means replacing forward-declarations and removing conversion code
between list and vector.
Change-Id: I6eac649f8376eafca8f96c3fa603d27ad5ad7b38
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/xmlpatterns/api/qabstractxmlforwarditerator_p.h | 35 | ||||
-rw-r--r-- | src/xmlpatterns/api/qabstractxmlnodemodel.cpp | 2 | ||||
-rw-r--r-- | src/xmlpatterns/data/qitem_p.h | 3 | ||||
-rw-r--r-- | src/xmlpatterns/expr/qcalltargetdescription_p.h | 4 | ||||
-rw-r--r-- | src/xmlpatterns/expr/qexpression.cpp | 4 | ||||
-rw-r--r-- | src/xmlpatterns/expr/qexpression_p.h | 4 | ||||
-rw-r--r-- | src/xmlpatterns/expr/qnodesort.cpp | 2 | ||||
-rw-r--r-- | src/xmlpatterns/expr/qorderby.cpp | 2 | ||||
-rw-r--r-- | src/xmlpatterns/expr/qreturnorderby.cpp | 2 | ||||
-rw-r--r-- | src/xmlpatterns/expr/quserfunction_p.h | 3 | ||||
-rw-r--r-- | src/xmlpatterns/expr/qvariablereference_p.h | 3 | ||||
-rw-r--r-- | src/xmlpatterns/functions/qfunctionsignature_p.h | 4 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdmodelgroup_p.h | 3 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsduserschematype_p.h | 4 | ||||
-rw-r--r-- | src/xmlpatterns/type/qitemtype_p.h | 3 | ||||
-rw-r--r-- | src/xmlpatterns/type/qschematype_p.h | 4 | ||||
-rw-r--r-- | src/xmlpatterns/type/qsequencetype_p.h | 3 |
17 files changed, 22 insertions, 63 deletions
diff --git a/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h b/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h index 9071a8b..b033486 100644 --- a/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h +++ b/src/xmlpatterns/api/qabstractxmlforwarditerator_p.h @@ -103,7 +103,7 @@ public: virtual qint64 position() const = 0; virtual typename QAbstractXmlForwardIterator<T>::Ptr toReversed(); - virtual QList<T> toList(); + virtual QVector<T> toVector(); virtual typename QAbstractXmlForwardIterator<T>::Ptr copy() const; virtual T last(); virtual bool isEmpty(); @@ -193,39 +193,14 @@ namespace QPatternist using ListIteratorPlatform<T, T, ListIterator<T, ListType>, ListType>::m_list; - static inline QVector<T> toVector(const QVector<T> &vector) - { - return vector; - } - - static inline QVector<T> toVector(const QList<T> &list) - { - return list.toVector(); - } - - static inline QList<T> toList(const QVector<T> &vector) - { - return vector.toList(); - } - - static inline QList<T> toList(const QList<T> &list) - { - return list; - } - public: inline ListIterator(const ListType &list) : ListIteratorPlatform<T, T, ListIterator<T, ListType>, ListType>(list) { } - QList<T> toList() override + QVector<T> toVector() override { - return toList(m_list); - } - - virtual QVector<T> toVector() - { - return toVector(m_list); + return m_list; } private: @@ -257,9 +232,9 @@ namespace QPatternist } template<typename T> -QList<T> QAbstractXmlForwardIterator<T>::toList() +QVector<T> QAbstractXmlForwardIterator<T>::toVector() { - QList<T> result; + QVector<T> result; T item(next()); while(!qIsForwardIteratorEnd(item)) diff --git a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp index 99bf2a0..3909f04 100644 --- a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp +++ b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp @@ -1016,7 +1016,7 @@ bool QAbstractXmlNodeModel::isDeepEqual(const QXmlNodeModelIndex &n1, QXmlNodeModelIndexIteratorPointer atts1(n1.iterate(QXmlNodeModelIndex::AxisAttribute)); QXmlNodeModelIndex node(atts1->next()); - const QXmlNodeModelIndex::List atts2(n2.iterate(QXmlNodeModelIndex::AxisAttribute)->toList()); + const QXmlNodeModelIndex::List atts2(n2.iterate(QXmlNodeModelIndex::AxisAttribute)->toVector()); const QXmlNodeModelIndex::List::const_iterator end(atts2.constEnd()); while(!node.isNull()) diff --git a/src/xmlpatterns/data/qitem_p.h b/src/xmlpatterns/data/qitem_p.h index a395b5e..2fcb71e 100644 --- a/src/xmlpatterns/data/qitem_p.h +++ b/src/xmlpatterns/data/qitem_p.h @@ -57,6 +57,7 @@ #include <QUrl> #include <QVariant> +#include <qcontainerfwd.h> /** * @file @@ -72,8 +73,6 @@ QT_BEGIN_NAMESPACE -template<typename T> class QList; -template<typename T> class QVector; template<typename T> class QAbstractXmlForwardIterator; class QSourceLocation; diff --git a/src/xmlpatterns/expr/qcalltargetdescription_p.h b/src/xmlpatterns/expr/qcalltargetdescription_p.h index 4cc0f74..f72670f 100644 --- a/src/xmlpatterns/expr/qcalltargetdescription_p.h +++ b/src/xmlpatterns/expr/qcalltargetdescription_p.h @@ -51,14 +51,12 @@ #define Patternist_CallTargetDescription_H #include <QSharedData> +#include <qcontainerfwd.h> #include <private/qexpression_p.h> QT_BEGIN_NAMESPACE -template<typename Key, typename Value> class QHash; -template<typename T> class QList; - namespace QPatternist { class CallSite; diff --git a/src/xmlpatterns/expr/qexpression.cpp b/src/xmlpatterns/expr/qexpression.cpp index 3db1e4f..c7ecaea 100644 --- a/src/xmlpatterns/expr/qexpression.cpp +++ b/src/xmlpatterns/expr/qexpression.cpp @@ -86,9 +86,9 @@ void Expression::typeCheckOperands(const StaticContext::Ptr &context) /* If we create a focus, we handle the last one specially, so avoid it in the loop. */ const bool createsFocus = has(CreatesFocusForLast); - const SequenceType::List::const_iterator typeEnd(createsFocus ? --opTypes.constEnd() + const SequenceType::List::const_iterator typeEnd(createsFocus ? (opTypes.constEnd() - 1) : opTypes.constEnd()); - const Expression::List::const_iterator end(createsFocus ? --ops.constEnd() + const Expression::List::const_iterator end(createsFocus ? (ops.constEnd() - 1) : ops.constEnd()); SequenceType::List::const_iterator reqType(opTypes.constBegin()); diff --git a/src/xmlpatterns/expr/qexpression_p.h b/src/xmlpatterns/expr/qexpression_p.h index 9d74f11..8063040 100644 --- a/src/xmlpatterns/expr/qexpression_p.h +++ b/src/xmlpatterns/expr/qexpression_p.h @@ -52,6 +52,7 @@ #include <QFlags> #include <QSharedData> +#include <qcontainerfwd.h> #include <private/qcppcastinghelper_p.h> #include <private/qxmldebug_p.h> @@ -64,9 +65,6 @@ QT_BEGIN_NAMESPACE -template<typename T> class QList; -template<typename T> class QVector; - namespace QPatternist { template<typename T, typename ListType> class ListIterator; diff --git a/src/xmlpatterns/expr/qnodesort.cpp b/src/xmlpatterns/expr/qnodesort.cpp index 5a384d6..da0513a 100644 --- a/src/xmlpatterns/expr/qnodesort.cpp +++ b/src/xmlpatterns/expr/qnodesort.cpp @@ -75,7 +75,7 @@ Item::Iterator::Ptr NodeSortExpression::evaluateSequence(const DynamicContext::P Q_ASSERT_X(m_operand->staticType()->cardinality().allowsMany(), Q_FUNC_INFO, "It makes no sense to sort a single node."); - Item::List nodes(m_operand->evaluateSequence(context)->toList()); + Item::List nodes(m_operand->evaluateSequence(context)->toVector()); if(nodes.isEmpty()) return CommonValues::emptyIterator; diff --git a/src/xmlpatterns/expr/qorderby.cpp b/src/xmlpatterns/expr/qorderby.cpp index 5688bcd..2285f7f 100644 --- a/src/xmlpatterns/expr/qorderby.cpp +++ b/src/xmlpatterns/expr/qorderby.cpp @@ -183,7 +183,7 @@ Item::Iterator::Ptr OrderBy::mapToSequence(const Item &i, Item::Iterator::Ptr OrderBy::evaluateSequence(const DynamicContext::Ptr &context) const { - Item::List tuples(m_operand->evaluateSequence(context)->toList()); + Item::List tuples(m_operand->evaluateSequence(context)->toVector()); const std::less<Item::List> sorter(m_orderSpecs, context); diff --git a/src/xmlpatterns/expr/qreturnorderby.cpp b/src/xmlpatterns/expr/qreturnorderby.cpp index 5437a83..b7b295f 100644 --- a/src/xmlpatterns/expr/qreturnorderby.cpp +++ b/src/xmlpatterns/expr/qreturnorderby.cpp @@ -62,7 +62,7 @@ ReturnOrderBy::ReturnOrderBy(const OrderBy::Stability aStability, Item ReturnOrderBy::evaluateSingleton(const DynamicContext::Ptr &context) const { Q_ASSERT(m_operands.size() > 1); - const Item::Iterator::Ptr value(makeListIterator(m_operands.first()->evaluateSequence(context)->toList())); + const Item::Iterator::Ptr value(makeListIterator(m_operands.first()->evaluateSequence(context)->toVector())); Item::Vector sortKeys; /* We're skipping the first operand. */ diff --git a/src/xmlpatterns/expr/quserfunction_p.h b/src/xmlpatterns/expr/quserfunction_p.h index 15f10e8..5ec6232 100644 --- a/src/xmlpatterns/expr/quserfunction_p.h +++ b/src/xmlpatterns/expr/quserfunction_p.h @@ -51,6 +51,7 @@ #define Patternist_UserFunction_H #include <QSharedData> +#include <qcontainerfwd.h> #include <private/qexpression_p.h> #include <private/qfunctionsignature_p.h> @@ -58,8 +59,6 @@ QT_BEGIN_NAMESPACE -template<typename T> class QList; - namespace QPatternist { /** diff --git a/src/xmlpatterns/expr/qvariablereference_p.h b/src/xmlpatterns/expr/qvariablereference_p.h index ce9c784..2a42b3a 100644 --- a/src/xmlpatterns/expr/qvariablereference_p.h +++ b/src/xmlpatterns/expr/qvariablereference_p.h @@ -51,11 +51,10 @@ #define Patternist_VariableReference_H #include <private/qemptycontainer_p.h> +#include <qcontainerfwd.h> QT_BEGIN_NAMESPACE -template<typename T> class QList; - namespace QPatternist { /** diff --git a/src/xmlpatterns/functions/qfunctionsignature_p.h b/src/xmlpatterns/functions/qfunctionsignature_p.h index 14293e3..3f79a39 100644 --- a/src/xmlpatterns/functions/qfunctionsignature_p.h +++ b/src/xmlpatterns/functions/qfunctionsignature_p.h @@ -51,6 +51,7 @@ #define Patternist_FunctionSignature_H #include <QSharedData> +#include <qcontainerfwd.h> #include <private/qcalltargetdescription_p.h> #include <private/qexpression_p.h> @@ -60,9 +61,6 @@ QT_BEGIN_NAMESPACE -template<typename Key, typename Value> class QHash; -template<typename T> class QList; - namespace QPatternist { diff --git a/src/xmlpatterns/schema/qxsdmodelgroup_p.h b/src/xmlpatterns/schema/qxsdmodelgroup_p.h index 02953ac..22073bf 100644 --- a/src/xmlpatterns/schema/qxsdmodelgroup_p.h +++ b/src/xmlpatterns/schema/qxsdmodelgroup_p.h @@ -52,11 +52,10 @@ #include <private/qxsdparticle_p.h> #include <private/qxsdterm_p.h> +#include <qcontainerfwd.h> QT_BEGIN_NAMESPACE -template<typename N> class QList; - namespace QPatternist { /** diff --git a/src/xmlpatterns/schema/qxsduserschematype_p.h b/src/xmlpatterns/schema/qxsduserschematype_p.h index f7911c8..f98b2ae 100644 --- a/src/xmlpatterns/schema/qxsduserschematype_p.h +++ b/src/xmlpatterns/schema/qxsduserschematype_p.h @@ -53,12 +53,10 @@ #include <private/qnamedschemacomponent_p.h> #include <private/qschematype_p.h> #include <private/qxsdannotated_p.h> +#include <qcontainerfwd.h> QT_BEGIN_NAMESPACE -template<typename N, typename M> class QHash; -template<typename N> class QList; - namespace QPatternist { /** diff --git a/src/xmlpatterns/type/qitemtype_p.h b/src/xmlpatterns/type/qitemtype_p.h index 88d06e7..baf6aa4 100644 --- a/src/xmlpatterns/type/qitemtype_p.h +++ b/src/xmlpatterns/type/qitemtype_p.h @@ -51,13 +51,12 @@ #define Patternist_ItemType_H #include <QSharedData> +#include <qcontainerfwd.h> #include <QtXmlPatterns/private/qnamepool_p.h> QT_BEGIN_NAMESPACE -template<typename T> class QList; - namespace QPatternist { class Item; diff --git a/src/xmlpatterns/type/qschematype_p.h b/src/xmlpatterns/type/qschematype_p.h index eae4665..bd3e715 100644 --- a/src/xmlpatterns/type/qschematype_p.h +++ b/src/xmlpatterns/type/qschematype_p.h @@ -53,9 +53,7 @@ #include <private/qnamepool_p.h> #include <private/qschemacomponent_p.h> #include <QXmlName> - -template<typename N, typename M> class QHash; -template<typename N> class QList; +#include <qcontainerfwd.h> QT_BEGIN_NAMESPACE diff --git a/src/xmlpatterns/type/qsequencetype_p.h b/src/xmlpatterns/type/qsequencetype_p.h index c6f6825..59492ac 100644 --- a/src/xmlpatterns/type/qsequencetype_p.h +++ b/src/xmlpatterns/type/qsequencetype_p.h @@ -50,9 +50,8 @@ #ifndef Patternist_SequenceType_H #define Patternist_SequenceType_H -template<typename T> class QList; - #include <QSharedData> +#include <qcontainerfwd.h> #include <private/qcardinality_p.h> #include <private/qitemtype_p.h> |