summaryrefslogtreecommitdiffstats
path: root/src/corelib/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/xml')
-rw-r--r--src/corelib/xml/qxmlstream.cpp12
-rw-r--r--src/corelib/xml/qxmlstream.g4
-rw-r--r--src/corelib/xml/qxmlstream.h3
-rw-r--r--src/corelib/xml/qxmlstream_p.h4
4 files changed, 6 insertions, 17 deletions
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index 6222a76f08..df2c2f998f 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -2092,7 +2092,7 @@ void QXmlStreamReader::addExtraNamespaceDeclarations(const QXmlStreamNamespaceDe
The \a behaviour defines what happens in case anything else is
read before reaching EndElement. The function can include the text from
child elements (useful for example for HTML), ignore child elements, or
- raise an UnexpectedElementError and return what was read so far.
+ raise an UnexpectedElementError and return what was read so far (default).
\since 4.6
*/
@@ -2133,16 +2133,6 @@ QString QXmlStreamReader::readElementText(ReadElementTextBehaviour behaviour)
return QString();
}
-/*!
- \overload readElementText()
-
- Calling this function is equivalent to calling readElementText(ErrorOnUnexpectedElement).
- */
-QString QXmlStreamReader::readElementText()
-{
- return readElementText(ErrorOnUnexpectedElement);
-}
-
/*! Raises a custom error with an optional error \a message.
\sa error(), errorString()
diff --git a/src/corelib/xml/qxmlstream.g b/src/corelib/xml/qxmlstream.g
index 87a10003d3..a1d1e84b51 100644
--- a/src/corelib/xml/qxmlstream.g
+++ b/src/corelib/xml/qxmlstream.g
@@ -152,12 +152,12 @@ template <typename T> class QXmlStreamSimpleStack {
int tos, cap;
public:
inline QXmlStreamSimpleStack():data(0), tos(-1), cap(0){}
- inline ~QXmlStreamSimpleStack(){ if (data) qFree(data); }
+ inline ~QXmlStreamSimpleStack(){ if (data) free(data); }
inline void reserve(int extraCapacity) {
if (tos + extraCapacity + 1 > cap) {
cap = qMax(tos + extraCapacity + 1, cap << 1 );
- data = reinterpret_cast<T *>(qRealloc(data, cap * sizeof(T)));
+ data = reinterpret_cast<T *>(realloc(data, cap * sizeof(T)));
Q_CHECK_PTR(data);
}
}
diff --git a/src/corelib/xml/qxmlstream.h b/src/corelib/xml/qxmlstream.h
index 90382c7fe5..ae6dd23551 100644
--- a/src/corelib/xml/qxmlstream.h
+++ b/src/corelib/xml/qxmlstream.h
@@ -301,8 +301,7 @@ public:
IncludeChildElements,
SkipChildElements
};
- QString readElementText(ReadElementTextBehaviour behaviour);
- QString readElementText();
+ QString readElementText(ReadElementTextBehaviour behaviour = ErrorOnUnexpectedElement);
QStringRef name() const;
QStringRef namespaceUri() const;
diff --git a/src/corelib/xml/qxmlstream_p.h b/src/corelib/xml/qxmlstream_p.h
index 067216d3a1..b8a87fbc3f 100644
--- a/src/corelib/xml/qxmlstream_p.h
+++ b/src/corelib/xml/qxmlstream_p.h
@@ -646,12 +646,12 @@ template <typename T> class QXmlStreamSimpleStack {
int tos, cap;
public:
inline QXmlStreamSimpleStack():data(0), tos(-1), cap(0){}
- inline ~QXmlStreamSimpleStack(){ if (data) qFree(data); }
+ inline ~QXmlStreamSimpleStack(){ if (data) free(data); }
inline void reserve(int extraCapacity) {
if (tos + extraCapacity + 1 > cap) {
cap = qMax(tos + extraCapacity + 1, cap << 1 );
- data = reinterpret_cast<T *>(qRealloc(data, cap * sizeof(T)));
+ data = reinterpret_cast<T *>(realloc(data, cap * sizeof(T)));
Q_CHECK_PTR(data);
}
}