summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns/api/qabstractxmlnodemodel.cpp')
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
index 8f0f80a..fda7cb4 100644
--- a/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
+++ b/src/xmlpatterns/api/qabstractxmlnodemodel.cpp
@@ -190,8 +190,7 @@ bool QAbstractXmlNodeModel::isIgnorableInDeepEqual(const QXmlNodeModelIndex &n)
Because the node model can be accessed concurrently by threads in
the QtXmlPatterns module, subclasses of QAbstractXmlNodeModel must
- be written to be \l{Thread Support in Qt#Reentrancy and Thread-Safety}
- {thread-safe}.
+ be written to be \l{Reentrancy and Thread-Safety}{thread-safe}.
Classes that simplify implementing thread-safety include QReadLocker
and QWriteLocker.
@@ -302,7 +301,6 @@ QAbstractXmlNodeModel::QAbstractXmlNodeModel(QAbstractXmlNodeModelPrivate *d) :
*/
QAbstractXmlNodeModel::~QAbstractXmlNodeModel()
{
- delete d_ptr;
}
/*!
@@ -1666,4 +1664,20 @@ void QAbstractXmlNodeModel::copyNodeTo(const QXmlNodeModelIndex &node,
"This function is not expected to be called.");
}
+/*!
+ Returns the source location for the object with the given \a index
+ or a default constructed QSourceLocation in case no location
+ information is available.
+
+ \since 4.6
+*/
+QSourceLocation QAbstractXmlNodeModel::sourceLocation(const QXmlNodeModelIndex &index) const
+{
+ // TODO: make this method virtual in Qt5 to allow source location support in custom models
+ if (d_ptr)
+ return d_ptr->sourceLocation(index);
+ else
+ return QSourceLocation();
+}
+
QT_END_NAMESPACE