diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-01 11:15:38 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-01 11:15:38 +0200 |
commit | 30a4041893c8132040cd982c9ca1204345801750 (patch) | |
tree | 39d35ef5a52becbf833608b8c86cd0c5bf8fe837 /src/xmlpatterns | |
parent | e0207675f2cb28713c9cfce1ecc5854a082d3d2c (diff) | |
parent | c0b6fbcadbefcc8a91e5db7fd98662dddcd7a0f8 (diff) | |
download | qtxmlpatterns-30a4041893c8132040cd982c9ca1204345801750.tar.gz |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I0653ca8dd6a9b6ee2314911c7679a1c056dc3709
Diffstat (limited to 'src/xmlpatterns')
25 files changed, 70 insertions, 24 deletions
diff --git a/src/xmlpatterns/api/qxmlquery_p.h b/src/xmlpatterns/api/qxmlquery_p.h index 731d736..1759fa2 100644 --- a/src/xmlpatterns/api/qxmlquery_p.h +++ b/src/xmlpatterns/api/qxmlquery_p.h @@ -104,7 +104,7 @@ public: { const QPatternist::AccelTreeResourceLoader::Ptr nev(new QPatternist::AccelTreeResourceLoader(namePool.d, m_networkAccessDelegator)); - m_resourceLoader = QPatternist::ResourceLoader::Ptr(new QPatternist::ResourceDelegator(m_resourceLoader->deviceURIs(), + m_resourceLoader = QPatternist::DeviceResourceLoader::Ptr(new QPatternist::ResourceDelegator(m_resourceLoader->deviceURIs(), m_resourceLoader, nev)); } @@ -128,7 +128,7 @@ public: return m_variableLoader; } - inline QPatternist::GenericStaticContext::Ptr staticContext() + inline QPatternist::StaticContext::Ptr staticContext() { if(m_staticContext && m_expr) return m_staticContext; diff --git a/src/xmlpatterns/data/qcommonvalues.cpp b/src/xmlpatterns/data/qcommonvalues.cpp index 4239895..2aa27f1 100644 --- a/src/xmlpatterns/data/qcommonvalues.cpp +++ b/src/xmlpatterns/data/qcommonvalues.cpp @@ -114,7 +114,7 @@ const AtomicValue::Ptr CommonValues::InfFloat const DayTimeDuration::Ptr CommonValues::DayTimeDurationZero (DayTimeDuration::fromSeconds(0)); -const DayTimeDuration::Ptr CommonValues::YearMonthDurationZero +const YearMonthDuration::Ptr CommonValues::YearMonthDurationZero (YearMonthDuration::fromComponents(true, 0, 0)); diff --git a/src/xmlpatterns/data/qcommonvalues_p.h b/src/xmlpatterns/data/qcommonvalues_p.h index a91b644..78acded 100644 --- a/src/xmlpatterns/data/qcommonvalues_p.h +++ b/src/xmlpatterns/data/qcommonvalues_p.h @@ -204,7 +204,7 @@ namespace QPatternist /** * The @c xs:yearMonthDuration value P0M */ - static const DayTimeDuration::Ptr YearMonthDurationZero; + static const YearMonthDuration::Ptr YearMonthDurationZero; private: /** diff --git a/src/xmlpatterns/data/qitem_p.h b/src/xmlpatterns/data/qitem_p.h index 1654bd9..a395b5e 100644 --- a/src/xmlpatterns/data/qitem_p.h +++ b/src/xmlpatterns/data/qitem_p.h @@ -111,8 +111,7 @@ namespace QPatternist * @ingroup Patternist_xdm * @author Frans Englich <frans.englich@nokia.com> */ - class AtomicValue : public QSharedData - , public CppCastingHelper<AtomicValue> + class Q_AUTOTEST_EXPORT AtomicValue : public QSharedData, public CppCastingHelper<AtomicValue> { public: virtual ~AtomicValue(); @@ -212,7 +211,7 @@ namespace QPatternist inline Item(const Item &other) : node(other.node) { - Q_ASSERT_X(sizeof(QXmlNodeModelIndex) >= sizeof(AtomicValue), Q_FUNC_INFO, + Q_STATIC_ASSERT_X(sizeof(QXmlNodeModelIndex) >= sizeof(AtomicValue), "Since we're only copying the node member, it must be the largest."); if(isAtomicValue()) atomicValue->ref.ref(); diff --git a/src/xmlpatterns/expr/qgeneralcomparison.cpp b/src/xmlpatterns/expr/qgeneralcomparison.cpp index e8ef401..78aaabb 100644 --- a/src/xmlpatterns/expr/qgeneralcomparison.cpp +++ b/src/xmlpatterns/expr/qgeneralcomparison.cpp @@ -62,6 +62,11 @@ GeneralComparison::GeneralComparison(const Expression::Ptr &op1, { } +/*! \internal */ +GeneralComparison::~GeneralComparison() +{ +} + bool GeneralComparison::generalCompare(const Item &op1, const Item &op2, const DynamicContext::Ptr &context) const diff --git a/src/xmlpatterns/expr/qgeneralcomparison_p.h b/src/xmlpatterns/expr/qgeneralcomparison_p.h index 1923135..b3fffca 100644 --- a/src/xmlpatterns/expr/qgeneralcomparison_p.h +++ b/src/xmlpatterns/expr/qgeneralcomparison_p.h @@ -70,8 +70,8 @@ namespace QPatternist * @author Frans Englich <frans.englich@nokia.com> * @ingroup Patternist_expressions */ - class GeneralComparison : public PairContainer, - public ComparisonPlatform<GeneralComparison, + class Q_AUTOTEST_EXPORT GeneralComparison + : public PairContainer, public ComparisonPlatform<GeneralComparison, true /* We want to report errors. */, AtomicComparator::AsGeneralComparison> { @@ -80,6 +80,7 @@ namespace QPatternist const AtomicComparator::Operator op, const Expression::Ptr &op2, const bool isBackwardsCompat = false); + ~GeneralComparison(); virtual bool evaluateEBV(const DynamicContext::Ptr &) const; virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, diff --git a/src/xmlpatterns/expr/qnamespaceconstructor.cpp b/src/xmlpatterns/expr/qnamespaceconstructor.cpp index d5c9c4c..51bc615 100644 --- a/src/xmlpatterns/expr/qnamespaceconstructor.cpp +++ b/src/xmlpatterns/expr/qnamespaceconstructor.cpp @@ -50,6 +50,11 @@ NamespaceConstructor::NamespaceConstructor(const QXmlName nb) : m_binding(nb) Q_ASSERT(!m_binding.isNull()); } +/*! \internal */ +NamespaceConstructor::~NamespaceConstructor() +{ +} + void NamespaceConstructor::evaluateToSequenceReceiver(const DynamicContext::Ptr &context) const { context->outputReceiver()->namespaceBinding(m_binding); diff --git a/src/xmlpatterns/expr/qnamespaceconstructor_p.h b/src/xmlpatterns/expr/qnamespaceconstructor_p.h index df2cb9d..78aceaf 100644 --- a/src/xmlpatterns/expr/qnamespaceconstructor_p.h +++ b/src/xmlpatterns/expr/qnamespaceconstructor_p.h @@ -63,10 +63,11 @@ namespace QPatternist * @author Frans Englich <frans.englich@nokia.com> * @ingroup Patternist_expressions */ - class NamespaceConstructor : public EmptyContainer + class Q_AUTOTEST_EXPORT NamespaceConstructor : public EmptyContainer { public: NamespaceConstructor(const QXmlName nb); + ~NamespaceConstructor(); virtual void evaluateToSequenceReceiver(const DynamicContext::Ptr &context) const; diff --git a/src/xmlpatterns/expr/qorderby_p.h b/src/xmlpatterns/expr/qorderby_p.h index 5ae39ee..dcc567b 100644 --- a/src/xmlpatterns/expr/qorderby_p.h +++ b/src/xmlpatterns/expr/qorderby_p.h @@ -103,6 +103,8 @@ namespace QPatternist * @short Default constructor, which is needed by QVector. */ inline OrderSpec() + : direction(Ascending), + orderingEmptySequence(StaticContext::Greatest) { } diff --git a/src/xmlpatterns/expr/qpath.cpp b/src/xmlpatterns/expr/qpath.cpp index 5dde3e7..862a790 100644 --- a/src/xmlpatterns/expr/qpath.cpp +++ b/src/xmlpatterns/expr/qpath.cpp @@ -61,6 +61,11 @@ Path::Path(const Expression::Ptr &operand1, { } +/*! \internal */ +Path::~Path() +{ +} + Item::Iterator::Ptr Path::mapToSequence(const Item &item, const DynamicContext::Ptr &context) const { diff --git a/src/xmlpatterns/expr/qpath_p.h b/src/xmlpatterns/expr/qpath_p.h index d11380f..f3e3b59 100644 --- a/src/xmlpatterns/expr/qpath_p.h +++ b/src/xmlpatterns/expr/qpath_p.h @@ -65,7 +65,7 @@ namespace QPatternist * @author Frans Englich <frans.englich@nokia.com> * @ingroup Patternist_expressions */ - class Path : public PairContainer + class Q_AUTOTEST_EXPORT Path : public PairContainer { public: enum Kind @@ -94,6 +94,7 @@ namespace QPatternist Path(const Expression::Ptr &operand1, const Expression::Ptr &operand2, const Kind kind = RegularPath); + ~Path(); virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const; virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const; diff --git a/src/xmlpatterns/expr/qsinglecontainer.cpp b/src/xmlpatterns/expr/qsinglecontainer.cpp index 369f564..186d920 100644 --- a/src/xmlpatterns/expr/qsinglecontainer.cpp +++ b/src/xmlpatterns/expr/qsinglecontainer.cpp @@ -51,6 +51,11 @@ SingleContainer::SingleContainer(const Expression::Ptr &operand) : m_operand(ope Q_ASSERT(operand); } +/*! \internal */ +SingleContainer::~SingleContainer() +{ +} + Expression::List SingleContainer::operands() const { Expression::List list; diff --git a/src/xmlpatterns/expr/qsinglecontainer_p.h b/src/xmlpatterns/expr/qsinglecontainer_p.h index 2becfd1..6d016be 100644 --- a/src/xmlpatterns/expr/qsinglecontainer_p.h +++ b/src/xmlpatterns/expr/qsinglecontainer_p.h @@ -62,9 +62,11 @@ namespace QPatternist * @author Frans Englich <frans.englich@nokia.com> * @ingroup Patternist_expressions */ - class SingleContainer : public Expression + class Q_AUTOTEST_EXPORT SingleContainer : public Expression { public: + ~SingleContainer(); + virtual Expression::List operands() const; virtual void setOperands(const Expression::List &operands); diff --git a/src/xmlpatterns/expr/qtemplate.cpp b/src/xmlpatterns/expr/qtemplate.cpp index aa76fbc..41095ff 100644 --- a/src/xmlpatterns/expr/qtemplate.cpp +++ b/src/xmlpatterns/expr/qtemplate.cpp @@ -46,6 +46,11 @@ QT_BEGIN_NAMESPACE using namespace QPatternist; +/*! \internal */ +Template::~Template() +{ +} + const SourceLocationReflection* Template::actualReflection() const { return this; diff --git a/src/xmlpatterns/expr/qtemplate_p.h b/src/xmlpatterns/expr/qtemplate_p.h index 411444d..5ec3ad4 100644 --- a/src/xmlpatterns/expr/qtemplate_p.h +++ b/src/xmlpatterns/expr/qtemplate_p.h @@ -78,8 +78,7 @@ namespace QPatternist * @ingroup Patternist_expressions * @since 4.5 */ - class Template : public QSharedData - , public SourceLocationReflection + class Q_AUTOTEST_EXPORT Template : public QSharedData, public SourceLocationReflection { public: @@ -91,6 +90,7 @@ namespace QPatternist , m_reqType(reqType) { } + ~Template(); Expression::Ptr body; diff --git a/src/xmlpatterns/expr/qvaluecomparison.cpp b/src/xmlpatterns/expr/qvaluecomparison.cpp index eac8160..5ab1a3a 100644 --- a/src/xmlpatterns/expr/qvaluecomparison.cpp +++ b/src/xmlpatterns/expr/qvaluecomparison.cpp @@ -57,6 +57,11 @@ ValueComparison::ValueComparison(const Expression::Ptr &op1, { } +/*! \internal */ +ValueComparison::~ValueComparison() +{ +} + Item ValueComparison::evaluateSingleton(const DynamicContext::Ptr &context) const { const Item it1(m_operand1->evaluateSingleton(context)); diff --git a/src/xmlpatterns/expr/qvaluecomparison_p.h b/src/xmlpatterns/expr/qvaluecomparison_p.h index 33cd658..9566dfb 100644 --- a/src/xmlpatterns/expr/qvaluecomparison_p.h +++ b/src/xmlpatterns/expr/qvaluecomparison_p.h @@ -70,13 +70,14 @@ namespace QPatternist * @author Frans Englich <frans.englich@nokia.com> * @ingroup Patternist_expressions */ - class ValueComparison : public PairContainer, - public ComparisonPlatform<ValueComparison, true> + class Q_AUTOTEST_EXPORT ValueComparison + : public PairContainer, public ComparisonPlatform<ValueComparison, true> { public: ValueComparison(const Expression::Ptr &op1, const AtomicComparator::Operator op, const Expression::Ptr &op2); + ~ValueComparison(); virtual Item evaluateSingleton(const DynamicContext::Ptr &) const; diff --git a/src/xmlpatterns/expr/qvariablereference.cpp b/src/xmlpatterns/expr/qvariablereference.cpp index 768b1fd..5fb867d 100644 --- a/src/xmlpatterns/expr/qvariablereference.cpp +++ b/src/xmlpatterns/expr/qvariablereference.cpp @@ -48,6 +48,11 @@ VariableReference::VariableReference(const VariableSlotID slotP) : m_varSlot(slo Q_ASSERT(m_varSlot > -1); } +/*! \internal */ +VariableReference::~VariableReference() +{ +} + Expression::Properties VariableReference::properties() const { return DisableElimination; diff --git a/src/xmlpatterns/expr/qvariablereference_p.h b/src/xmlpatterns/expr/qvariablereference_p.h index ed43617..807b55b 100644 --- a/src/xmlpatterns/expr/qvariablereference_p.h +++ b/src/xmlpatterns/expr/qvariablereference_p.h @@ -64,7 +64,7 @@ namespace QPatternist * @author Frans Englich <frans.englich@nokia.com> * @ingroup Patternist_expressions */ - class VariableReference : public EmptyContainer + class Q_AUTOTEST_EXPORT VariableReference : public EmptyContainer { public: typedef QExplicitlySharedDataPointer<VariableReference> Ptr; @@ -76,6 +76,7 @@ namespace QPatternist * @param slot must be a valid slot. That is, zero or larger. */ VariableReference(const VariableSlotID slot); + ~VariableReference(); /** * @returns the slot that this reference communicates through. diff --git a/src/xmlpatterns/functions/qfunctionfactory_p.h b/src/xmlpatterns/functions/qfunctionfactory_p.h index ccf76f6..074b02d 100644 --- a/src/xmlpatterns/functions/qfunctionfactory_p.h +++ b/src/xmlpatterns/functions/qfunctionfactory_p.h @@ -74,7 +74,7 @@ namespace QPatternist * Language (XPath) 2.0, Definition: Function signatures</a> * @author Frans Englich <frans.englich@nokia.com> */ - class FunctionFactory : public QSharedData + class Q_AUTOTEST_EXPORT FunctionFactory : public QSharedData { public: diff --git a/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h b/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h index c57caab..fae1818 100644 --- a/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h +++ b/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h @@ -201,7 +201,7 @@ void MaintainingReader<TokenLookupClass, LookupKey>::validateElement(const Looku formatKeyword(name()), allowed.first()); } - else if(totalCount == 1) + else if(totalCount == 2) { /* Note, allowed has already had formatKeyword() applied. */ translationString = QtXmlPatterns::tr("Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes.") diff --git a/src/xmlpatterns/schema/qxsdschemaparser.cpp b/src/xmlpatterns/schema/qxsdschemaparser.cpp index ef00d5d..b1af3b1 100644 --- a/src/xmlpatterns/schema/qxsdschemaparser.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparser.cpp @@ -253,6 +253,7 @@ XsdSchemaParser::XsdSchemaParser(const XsdSchemaContext::Ptr &context, const Xsd , m_parserContext(parserContext) , m_namePool(m_parserContext->namePool()) , m_namespaceSupport(m_namePool) + , m_defaultOpenContentAppliesToEmpty(false) { m_schema = m_parserContext->schema(); m_schemaResolver = m_parserContext->resolver(); diff --git a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h index 9952b1f..91424a8 100644 --- a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h +++ b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h @@ -55,14 +55,16 @@ template <typename TransitionType> XsdStateMachine<TransitionType>::XsdStateMachine() - : m_counter(50) + : m_counter(50), + m_lastTransition() { } template <typename TransitionType> XsdStateMachine<TransitionType>::XsdStateMachine(const NamePool::Ptr &namePool) - : m_namePool(namePool) - , m_counter(50) + : m_namePool(namePool), + m_counter(50), + m_lastTransition() { } diff --git a/src/xmlpatterns/type/qitemtype_p.h b/src/xmlpatterns/type/qitemtype_p.h index 0c995e1..88d06e7 100644 --- a/src/xmlpatterns/type/qitemtype_p.h +++ b/src/xmlpatterns/type/qitemtype_p.h @@ -75,7 +75,7 @@ namespace QPatternist * @ingroup Patternist_types * @author Frans Englich <frans.englich@nokia.com> */ - class ItemType : public virtual QSharedData + class Q_AUTOTEST_EXPORT ItemType : public virtual QSharedData { public: /** diff --git a/src/xmlpatterns/type/qsequencetype_p.h b/src/xmlpatterns/type/qsequencetype_p.h index c9b4ebf..c6f6825 100644 --- a/src/xmlpatterns/type/qsequencetype_p.h +++ b/src/xmlpatterns/type/qsequencetype_p.h @@ -75,7 +75,7 @@ namespace QPatternist * @see <a href="http://www.w3.org/TR/xpath20/#id-sequencetype-syntax">XML * Path Language (XPath) 2.0, 2.5.3 SequenceType Syntax</a> */ - class SequenceType : public virtual QSharedData + class Q_AUTOTEST_EXPORT SequenceType : public virtual QSharedData { public: inline SequenceType() |