diff options
23 files changed, 30 insertions, 72 deletions
diff --git a/dependencies.yaml b/dependencies.yaml index 8ffab5b..6b4a01c 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: 7b3bdcbfe8a920c4c156e91324eb0b374533d42c + ref: ab6affac107cb97e7b6decbe55621259cb8a9b92 required: true ../qtdeclarative: - ref: c7e67202d5e720f0b085d7f71477fd1c96fb7304 + ref: f97cc69a61b7056bddadcbbe7f6ee00623729b57 required: false 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> diff --git a/tests/auto/xmlpatternssdk/ErrorHandler.h b/tests/auto/xmlpatternssdk/ErrorHandler.h index 0e79cda..448655d 100644 --- a/tests/auto/xmlpatternssdk/ErrorHandler.h +++ b/tests/auto/xmlpatternssdk/ErrorHandler.h @@ -31,12 +31,11 @@ #include "Global.h" #include "qabstractmessagehandler.h" +#include <qcontainerfwd.h> QT_BEGIN_NAMESPACE -template<typename T> class QList; - namespace QPatternistSDK { /** diff --git a/tests/auto/xmlpatternssdk/TestBaseLine.h b/tests/auto/xmlpatternssdk/TestBaseLine.h index 5e757fa..da1e102 100644 --- a/tests/auto/xmlpatternssdk/TestBaseLine.h +++ b/tests/auto/xmlpatternssdk/TestBaseLine.h @@ -30,6 +30,7 @@ #define PatternistSDK_TestBaseLine_H #include <QString> +#include <qcontainerfwd.h> #include "Global.h" #include "TestResult.h" @@ -39,7 +40,6 @@ QT_BEGIN_NAMESPACE class QDomNamedNodeMap; class QDomNode; class QDomNodeList; -template<typename T> class QList; namespace QPatternistSDK { diff --git a/tests/auto/xmlpatternssdk/TreeItem.cpp b/tests/auto/xmlpatternssdk/TreeItem.cpp index 696693c..68803da 100644 --- a/tests/auto/xmlpatternssdk/TreeItem.cpp +++ b/tests/auto/xmlpatternssdk/TreeItem.cpp @@ -30,6 +30,8 @@ #include "TreeItem.h" +#include <limits.h> + using namespace QPatternistSDK; int TreeItem::row() const diff --git a/tests/auto/xmlpatternssdk/TreeItem.h b/tests/auto/xmlpatternssdk/TreeItem.h index dbc203e..09eed5a 100644 --- a/tests/auto/xmlpatternssdk/TreeItem.h +++ b/tests/auto/xmlpatternssdk/TreeItem.h @@ -30,13 +30,13 @@ #define PatternistSDK_TreeItem_H #include <QObject> +#include <qcontainerfwd.h> #include "Global.h" QT_BEGIN_NAMESPACE class QVariant; -template<typename T> class QList; template<typename T> class QPointer; namespace QPatternistSDK diff --git a/tools/xmlpatterns/qapplicationargumentparser_p.h b/tools/xmlpatterns/qapplicationargumentparser_p.h index 9ad9751..819069d 100644 --- a/tools/xmlpatterns/qapplicationargumentparser_p.h +++ b/tools/xmlpatterns/qapplicationargumentparser_p.h @@ -40,15 +40,13 @@ #define QApplicationArgumentParser_H #include <QtCore/QVariant> /* Needed, because we can't forward declare QVariantList. */ +#include <qcontainerfwd.h> QT_BEGIN_NAMESPACE class QApplicationArgument; class QApplicationArgumentParserPrivate; class QStringList; -template<typename A, typename B> struct QPair; -template<typename T> class QList; -template<typename Value> class QList; class QApplicationArgumentParser { |