diff options
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r-- | src/xmlpatterns/api/qabstractxmlnodemodel.cpp | 1 | ||||
-rw-r--r-- | src/xmlpatterns/api/qabstractxmlnodemodel.h | 3 | ||||
-rw-r--r-- | src/xmlpatterns/api/qabstractxmlreceiver.cpp | 1 | ||||
-rw-r--r-- | src/xmlpatterns/api/qabstractxmlreceiver.h | 3 | ||||
-rw-r--r-- | src/xmlpatterns/api/qxmlresultitems.cpp | 1 | ||||
-rw-r--r-- | src/xmlpatterns/api/qxmlresultitems.h | 3 | ||||
-rw-r--r-- | src/xmlpatterns/data/qabstractfloatcasters.cpp | 10 | ||||
-rw-r--r-- | src/xmlpatterns/data/qschemanumeric.cpp | 3 | ||||
-rw-r--r-- | src/xmlpatterns/functions/qcomparingaggregator.cpp | 7 | ||||
-rw-r--r-- | src/xmlpatterns/functions/qsequencefns_p.h | 15 |
10 files changed, 38 insertions, 9 deletions
diff --git a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp index 06f03e6..847d899 100644 --- a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp +++ b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp @@ -302,7 +302,6 @@ QAbstractXmlNodeModel::QAbstractXmlNodeModel(QAbstractXmlNodeModelPrivate *d) : */ QAbstractXmlNodeModel::~QAbstractXmlNodeModel() { - delete d_ptr; } /*! diff --git a/src/xmlpatterns/api/qabstractxmlnodemodel.h b/src/xmlpatterns/api/qabstractxmlnodemodel.h index 3d44547..71cd93e 100644 --- a/src/xmlpatterns/api/qabstractxmlnodemodel.h +++ b/src/xmlpatterns/api/qabstractxmlnodemodel.h @@ -44,6 +44,7 @@ #include <QtXmlPatterns/QXmlName> #include <QtCore/QSharedData> +#include <QtCore/QScopedPointer> QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -343,7 +344,7 @@ protected: return QXmlNodeModelIndex::create(data, this, additionalData); } - QAbstractXmlNodeModelPrivate *d_ptr; + QScopedPointer<QAbstractXmlNodeModelPrivate> d_ptr; private: friend class QPatternist::ItemMappingIterator<QXmlNodeModelIndex, QXmlNodeModelIndex, const QAbstractXmlNodeModel *, QExplicitlySharedDataPointer<QPatternist::DynamicContext> >; friend class QPatternist::SequenceMappingIterator<QXmlNodeModelIndex, QXmlNodeModelIndex, const QAbstractXmlNodeModel *>; diff --git a/src/xmlpatterns/api/qabstractxmlreceiver.cpp b/src/xmlpatterns/api/qabstractxmlreceiver.cpp index 38f7594..89bf939 100644 --- a/src/xmlpatterns/api/qabstractxmlreceiver.cpp +++ b/src/xmlpatterns/api/qabstractxmlreceiver.cpp @@ -224,7 +224,6 @@ QAbstractXmlReceiver::QAbstractXmlReceiver() : d_ptr(0) */ QAbstractXmlReceiver::~QAbstractXmlReceiver() { - delete d_ptr; } /*! diff --git a/src/xmlpatterns/api/qabstractxmlreceiver.h b/src/xmlpatterns/api/qabstractxmlreceiver.h index 3093ad2..d75b54c 100644 --- a/src/xmlpatterns/api/qabstractxmlreceiver.h +++ b/src/xmlpatterns/api/qabstractxmlreceiver.h @@ -43,6 +43,7 @@ #define QABSTRACTXMLRECEIVER_H #include <QtCore/QVariant> +#include <QtCore/QScopedPointer> #include <QtXmlPatterns/QXmlNodeModelIndex> QT_BEGIN_HEADER @@ -90,7 +91,7 @@ public: protected: QAbstractXmlReceiver(QAbstractXmlReceiverPrivate *d); - QAbstractXmlReceiverPrivate *d_ptr; + QScopedPointer<QAbstractXmlReceiverPrivate> d_ptr; void sendAsNode(const QPatternist::Item &outputItem); private: diff --git a/src/xmlpatterns/api/qxmlresultitems.cpp b/src/xmlpatterns/api/qxmlresultitems.cpp index 8b62222..a623a78 100644 --- a/src/xmlpatterns/api/qxmlresultitems.cpp +++ b/src/xmlpatterns/api/qxmlresultitems.cpp @@ -85,7 +85,6 @@ QXmlResultItems::QXmlResultItems() : d_ptr(new QXmlResultItemsPrivate()) */ QXmlResultItems::~QXmlResultItems() { - delete d_ptr; } /*! diff --git a/src/xmlpatterns/api/qxmlresultitems.h b/src/xmlpatterns/api/qxmlresultitems.h index c3e3393..6fc8d52 100644 --- a/src/xmlpatterns/api/qxmlresultitems.h +++ b/src/xmlpatterns/api/qxmlresultitems.h @@ -43,6 +43,7 @@ #define QXMLRESULTITEMS #include <QtCore/QString> +#include <QtCore/QScopedPointer> QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -66,7 +67,7 @@ public: private: friend class QXmlQuery; Q_DECLARE_PRIVATE(QXmlResultItems) - QXmlResultItemsPrivate *d_ptr; + QScopedPointer<QXmlResultItemsPrivate> d_ptr; Q_DISABLE_COPY(QXmlResultItems) }; diff --git a/src/xmlpatterns/data/qabstractfloatcasters.cpp b/src/xmlpatterns/data/qabstractfloatcasters.cpp index 62477eb..2d20a49 100644 --- a/src/xmlpatterns/data/qabstractfloatcasters.cpp +++ b/src/xmlpatterns/data/qabstractfloatcasters.cpp @@ -63,9 +63,19 @@ template <const bool isDouble> Item BooleanToAbstractFloatCaster<isDouble>::castFrom(const Item &from, const QExplicitlySharedDataPointer<DynamicContext> &context) const { +#if defined(Q_CC_RVCT) + // RVCT doesn't like using template parameter in trinary operator when the trinary operator result is + // passed directly into another constructor. + bool tempDouble = isDouble; + if(from.template as<AtomicValue>()->evaluateEBV(context)) + return tempDouble ? toItem(CommonValues::DoubleOne) : toItem(CommonValues::FloatOne); + else + return tempDouble ? toItem(CommonValues::DoubleZero) : toItem(CommonValues::FloatZero); +#else if(from.template as<AtomicValue>()->evaluateEBV(context)) return isDouble ? toItem(CommonValues::DoubleOne) : toItem(CommonValues::FloatOne); else return isDouble ? toItem(CommonValues::DoubleZero) : toItem(CommonValues::FloatZero); +#endif } diff --git a/src/xmlpatterns/data/qschemanumeric.cpp b/src/xmlpatterns/data/qschemanumeric.cpp index eb1a236..0f95c01 100644 --- a/src/xmlpatterns/data/qschemanumeric.cpp +++ b/src/xmlpatterns/data/qschemanumeric.cpp @@ -51,8 +51,7 @@ #include "qschemanumeric_p.h" /** - * @file - * @short Contains class Numeric. This file was originally called qnumeric.cpp, + * @file Contains class Numeric. This file was originally called qnumeric.cpp, * but was renamed to stay consistent with qschemanumeric_p.h */ diff --git a/src/xmlpatterns/functions/qcomparingaggregator.cpp b/src/xmlpatterns/functions/qcomparingaggregator.cpp index 80260ba..1a7d201 100644 --- a/src/xmlpatterns/functions/qcomparingaggregator.cpp +++ b/src/xmlpatterns/functions/qcomparingaggregator.cpp @@ -203,8 +203,13 @@ ComparingAggregator<oper, result>::typeCheck(const StaticContext::Ptr &context, if(!m_operands.first()->staticType()->cardinality().allowsMany()) return m_operands.first(); - + +#if defined(Q_CC_RVCT) + // explicit scope needed in RVCT + ComparingAggregator<oper, result>::prepareComparison(fetchComparator(t1, t1, context)); +#else prepareComparison(fetchComparator(t1, t1, context)); +#endif return me; } diff --git a/src/xmlpatterns/functions/qsequencefns_p.h b/src/xmlpatterns/functions/qsequencefns_p.h index 11b25db..73c1adc 100644 --- a/src/xmlpatterns/functions/qsequencefns_p.h +++ b/src/xmlpatterns/functions/qsequencefns_p.h @@ -146,13 +146,28 @@ namespace QPatternist */ virtual Expression::Ptr compress(const StaticContext::Ptr &context) { +#if defined(Q_CC_RVCT) && !defined(QT_NO_DEBUG) + // RVCT doesn't like using template parameter in trinary operator when the trinary operator result is + // passed directly into another constructor. + bool tempAssert = (Id == IDExistsFN || Id == IDEmptyFN); + Q_ASSERT(tempAssert); +#else Q_ASSERT(Id == IDExistsFN || Id == IDEmptyFN); +#endif + const Expression::Ptr me(FunctionCall::compress(context)); if(me != this) return me; +#if defined(Q_CC_RVCT) + // RVCT doesn't like using template parameter in trinary operator when the trinary operator result is + // passed directly into another constructor. + Expression::ID tempId = Id; + const Cardinality myCard((tempId == IDExistsFN) ? Cardinality::oneOrMore() : Cardinality::empty()); +#else const Cardinality myCard((Id == IDExistsFN) ? Cardinality::oneOrMore() : Cardinality::empty()); +#endif const Cardinality card(m_operands.first()->staticType()->cardinality()); if(myCard.isMatch(card)) |