summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel.cpp1
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel.h3
-rw-r--r--src/xmlpatterns/api/qabstractxmlreceiver.cpp1
-rw-r--r--src/xmlpatterns/api/qabstractxmlreceiver.h3
-rw-r--r--src/xmlpatterns/api/qxmlresultitems.cpp1
-rw-r--r--src/xmlpatterns/api/qxmlresultitems.h3
-rw-r--r--src/xmlpatterns/data/qabstractfloatcasters.cpp7
-rw-r--r--src/xmlpatterns/data/qschemanumeric.cpp3
-rw-r--r--src/xmlpatterns/functions/qcomparingaggregator.cpp5
-rw-r--r--src/xmlpatterns/functions/qsequencefns_p.h11
10 files changed, 24 insertions, 14 deletions
diff --git a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
index 489774e..fda7cb4 100644
--- a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
+++ b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
@@ -301,7 +301,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 9643309..f02f1ea 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 742a080..5ffc01c 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 95781bd..a1ead34 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 71d3724..f6d2f5f 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 cd4c5a4..7f1e4c0 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 a859c7e..f41bb4a 100644
--- a/src/xmlpatterns/data/qabstractfloatcasters.cpp
+++ b/src/xmlpatterns/data/qabstractfloatcasters.cpp
@@ -63,9 +63,12 @@ template <const bool isDouble>
Item BooleanToAbstractFloatCaster<isDouble>::castFrom(const Item &from,
const QExplicitlySharedDataPointer<DynamicContext> &context) const
{
+ // 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 isDouble ? toItem(CommonValues::DoubleOne) : toItem(CommonValues::FloatOne);
+ return tempDouble ? toItem(CommonValues::DoubleOne) : toItem(CommonValues::FloatOne);
else
- return isDouble ? toItem(CommonValues::DoubleZero) : toItem(CommonValues::FloatZero);
+ return tempDouble ? toItem(CommonValues::DoubleZero) : toItem(CommonValues::FloatZero);
}
diff --git a/src/xmlpatterns/data/qschemanumeric.cpp b/src/xmlpatterns/data/qschemanumeric.cpp
index fb70ca0..c5e974c 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 bec8dea..4fbb070 100644
--- a/src/xmlpatterns/functions/qcomparingaggregator.cpp
+++ b/src/xmlpatterns/functions/qcomparingaggregator.cpp
@@ -203,8 +203,9 @@ ComparingAggregator<oper, result>::typeCheck(const StaticContext::Ptr &context,
if(!m_operands.first()->staticType()->cardinality().allowsMany())
return m_operands.first();
-
- prepareComparison(fetchComparator(t1, t1, context));
+
+ // explicit scope needed in RVCT
+ ComparingAggregator<oper, result>::prepareComparison(fetchComparator(t1, t1, context));
return me;
}
diff --git a/src/xmlpatterns/functions/qsequencefns_p.h b/src/xmlpatterns/functions/qsequencefns_p.h
index 77aa102..f16462f 100644
--- a/src/xmlpatterns/functions/qsequencefns_p.h
+++ b/src/xmlpatterns/functions/qsequencefns_p.h
@@ -146,13 +146,20 @@ namespace QPatternist
*/
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
{
- Q_ASSERT(Id == IDExistsFN || Id == IDEmptyFN);
+ // 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);
+
const Expression::Ptr me(FunctionCall::compress(context));
if(me != this)
return me;
- const Cardinality myCard((Id == IDExistsFN) ? Cardinality::oneOrMore() : Cardinality::empty());
+ // 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());
const Cardinality card(m_operands.first()->staticType()->cardinality());
if(myCard.isMatch(card))