summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/sax/qxml.cpp89
-rw-r--r--src/xml/sax/qxml.h1
2 files changed, 52 insertions, 38 deletions
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index dec273d08d..96a509d02d 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -244,6 +244,16 @@ public:
class QXmlParseExceptionPrivate
{
public:
+ QXmlParseExceptionPrivate()
+ : column(-1), line(-1)
+ {
+ }
+ QXmlParseExceptionPrivate(const QXmlParseExceptionPrivate &other)
+ : msg(other.msg), column(other.column), line(other.line),
+ pub(other.pub), sys(other.sys)
+ {
+ }
+
QString msg;
int column;
int line;
@@ -556,6 +566,15 @@ QXmlParseException::QXmlParseException(const QString& name, int c, int l,
}
/*!
+ Creates a copy of \a other.
+*/
+QXmlParseException::QXmlParseException(const QXmlParseException& other) :
+ d(new QXmlParseExceptionPrivate(*other.d))
+{
+
+}
+
+/*!
Destroys the QXmlParseException.
*/
QXmlParseException::~QXmlParseException()
@@ -2411,7 +2430,7 @@ events are reported.
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
void QXmlDefaultHandler::setDocumentLocator(QXmlLocator*)
{
@@ -2420,7 +2439,7 @@ void QXmlDefaultHandler::setDocumentLocator(QXmlLocator*)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startDocument()
{
@@ -2430,7 +2449,7 @@ bool QXmlDefaultHandler::startDocument()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endDocument()
{
@@ -2440,7 +2459,7 @@ bool QXmlDefaultHandler::endDocument()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startPrefixMapping(const QString&, const QString&)
{
@@ -2450,7 +2469,7 @@ bool QXmlDefaultHandler::startPrefixMapping(const QString&, const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endPrefixMapping(const QString&)
{
@@ -2460,7 +2479,7 @@ bool QXmlDefaultHandler::endPrefixMapping(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startElement(const QString&, const QString&,
const QString&, const QXmlAttributes&)
@@ -2471,7 +2490,7 @@ bool QXmlDefaultHandler::startElement(const QString&, const QString&,
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endElement(const QString&, const QString&,
const QString&)
@@ -2482,7 +2501,7 @@ bool QXmlDefaultHandler::endElement(const QString&, const QString&,
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::characters(const QString&)
{
@@ -2492,7 +2511,7 @@ bool QXmlDefaultHandler::characters(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::ignorableWhitespace(const QString&)
{
@@ -2502,7 +2521,7 @@ bool QXmlDefaultHandler::ignorableWhitespace(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::processingInstruction(const QString&,
const QString&)
@@ -2513,7 +2532,7 @@ bool QXmlDefaultHandler::processingInstruction(const QString&,
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::skippedEntity(const QString&)
{
@@ -2523,7 +2542,7 @@ bool QXmlDefaultHandler::skippedEntity(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::warning(const QXmlParseException&)
{
@@ -2533,7 +2552,7 @@ bool QXmlDefaultHandler::warning(const QXmlParseException&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::error(const QXmlParseException&)
{
@@ -2543,7 +2562,7 @@ bool QXmlDefaultHandler::error(const QXmlParseException&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::fatalError(const QXmlParseException&)
{
@@ -2553,7 +2572,7 @@ bool QXmlDefaultHandler::fatalError(const QXmlParseException&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::notationDecl(const QString&, const QString&,
const QString&)
@@ -2564,7 +2583,7 @@ bool QXmlDefaultHandler::notationDecl(const QString&, const QString&,
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::unparsedEntityDecl(const QString&, const QString&,
const QString&, const QString&)
@@ -2598,7 +2617,7 @@ QString QXmlDefaultHandler::errorString() const
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startDTD(const QString&, const QString&, const QString&)
{
@@ -2608,7 +2627,7 @@ bool QXmlDefaultHandler::startDTD(const QString&, const QString&, const QString&
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endDTD()
{
@@ -2618,7 +2637,7 @@ bool QXmlDefaultHandler::endDTD()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startEntity(const QString&)
{
@@ -2628,7 +2647,7 @@ bool QXmlDefaultHandler::startEntity(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endEntity(const QString&)
{
@@ -2638,7 +2657,7 @@ bool QXmlDefaultHandler::endEntity(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::startCDATA()
{
@@ -2648,7 +2667,7 @@ bool QXmlDefaultHandler::startCDATA()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::endCDATA()
{
@@ -2658,7 +2677,7 @@ bool QXmlDefaultHandler::endCDATA()
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::comment(const QString&)
{
@@ -2668,7 +2687,7 @@ bool QXmlDefaultHandler::comment(const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::attributeDecl(const QString&, const QString&, const QString&, const QString&, const QString&)
{
@@ -2678,7 +2697,7 @@ bool QXmlDefaultHandler::attributeDecl(const QString&, const QString&, const QSt
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::internalEntityDecl(const QString&, const QString&)
{
@@ -2688,7 +2707,7 @@ bool QXmlDefaultHandler::internalEntityDecl(const QString&, const QString&)
/*!
\reimp
- Does nothing.
+ This reimplementation does nothing.
*/
bool QXmlDefaultHandler::externalEntityDecl(const QString&, const QString&, const QString&)
{
@@ -3037,19 +3056,13 @@ void QXmlSimpleReaderPrivate::initIncrementalParsing()
parse() to work incrementally, and making subsequent calls to the
parseContinue() function, until all the data has been processed.
- A common way to perform incremental parsing is to connect the
- \c readyRead() signal of the input source to a slot, and handle the
- incoming data there. For example, the following code shows how a
- parser for \l{http://web.resource.org/rss/1.0/}{RSS feeds} can be
- used to incrementally parse data that it receives from a QHttp
- object:
-
- \snippet doc/src/snippets/xml/rsslisting/rsslisting.cpp 1
-
+ A common way to perform incremental parsing is to connect the \c
+ readyRead() signal of a \l{QNetworkReply} {network reply} a slot,
+ and handle the incoming data there. See QNetworkAccessManager.
+
Aspects of the parsing behavior can be adapted using setFeature()
- and setProperty(). For example, the following code could be used
- to enable reporting of namespace prefixes to the content handler:
-
+ and setProperty().
+
QXmlSimpleReader is not reentrant. If you want to use the class
in threaded code, lock the code using QXmlSimpleReader with a
locking mechanism, such as a QMutex.
diff --git a/src/xml/sax/qxml.h b/src/xml/sax/qxml.h
index acb84efb02..788f2e855c 100644
--- a/src/xml/sax/qxml.h
+++ b/src/xml/sax/qxml.h
@@ -194,6 +194,7 @@ class Q_XML_EXPORT QXmlParseException
public:
explicit QXmlParseException(const QString &name = QString(), int c = -1, int l = -1,
const QString &p = QString(), const QString &s = QString());
+ QXmlParseException(const QXmlParseException &other);
~QXmlParseException();
int columnNumber() const;