diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-04-16 12:04:34 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2012-04-16 12:04:34 +0200 |
commit | 9bd032355163d92cda5e7e59ecd21214b131f187 (patch) | |
tree | 002fa12558505683143c7eb08949a3d225bf0712 /src/xml | |
parent | d037d25c3d5236623371cf051aaf6a9e59792ba7 (diff) | |
parent | 41673c45dde2eb95ee21dd918235218399f2be2c (diff) |
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
configure
src/corelib/io/qurl.cpp
src/gui/kernel/qwindow.cpp
src/tools/moc/generator.cpp
src/widgets/kernel/qwidget_qpa.cpp
src/widgets/styles/qstyle.h
src/widgets/widgets/qtabbar.cpp
tests/auto/corelib/codecs/utf8/tst_utf8.cpp
Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
Diffstat (limited to 'src/xml')
-rw-r--r-- | src/xml/dom/qdom.cpp | 4 | ||||
-rw-r--r-- | src/xml/sax/qxml.cpp | 42 | ||||
-rw-r--r-- | src/xml/sax/qxml.h | 2 |
3 files changed, 34 insertions, 14 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index 04efe43e35..23a9db8e3a 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -4559,14 +4559,14 @@ void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const QString qName(name); QString nsDecl(QLatin1String("")); if (!namespaceURI.isNull()) { - /** ### Qt 5: + /** ### * * If we still have QDom, optimize this so that we only declare namespaces that are not * yet declared. We loose default namespace mappings, so maybe we should rather store * the information that we get from startPrefixMapping()/endPrefixMapping() and use them. * Modifications becomes more complex then, however. * - * We cannot do this during the Qt 4 series because it would require too invasive changes, and + * We cannot do this in a patch release because it would require too invasive changes, and * hence possibly behavioral changes. */ if (prefix.isEmpty()) { diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index c2205edb40..a5c206dc27 100644 --- a/src/xml/sax/qxml.cpp +++ b/src/xml/sax/qxml.cpp @@ -99,7 +99,7 @@ static const signed char cltSq = 13; // ' static const signed char cltUnknown = 14; // Hack for letting QDom know where the skipped entity occurred -// ### Qt5: the use of this variable means the code isn't reentrant. +// ### the use of this variable means the code isn't reentrant. bool qt_xml_skipped_entity_in_content; // character lookup table @@ -1330,7 +1330,7 @@ QXmlInputSource::QXmlInputSource(QIODevice *dev) */ QXmlInputSource::~QXmlInputSource() { - // ### Qt 5: close the input device. See task 153111 + // ### close the input device. #ifndef QT_NO_TEXTCODEC delete d->encMapper; #endif @@ -3133,16 +3133,17 @@ bool QXmlSimpleReader::feature(const QString& name, bool *ok) const { const QXmlSimpleReaderPrivate *d = d_func(); - // Qt5 ###: Change these strings to qt.nokia.com if (ok != 0) *ok = true; if (name == QLatin1String("http://xml.org/sax/features/namespaces")) { return d->useNamespaces; } else if (name == QLatin1String("http://xml.org/sax/features/namespace-prefixes")) { return d->useNamespacePrefixes; - } else if (name == QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData")) { // Shouldn't change in Qt 4 + } else if (name == QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData") // For compat with Qt 4 + || name == QLatin1String("http://qt-project.org/xml/features/report-whitespace-only-CharData")) { return d->reportWhitespaceCharData; - } else if (name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity")) { // Shouldn't change in Qt 4 + } else if (name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity") // For compat with Qt 4 + || name == QLatin1String("http://qt-project.org/xml/features/report-start-end-entity")) { return d->reportEntities; } else { qWarning("Unknown feature %s", name.toLatin1().data()); @@ -3168,12 +3169,29 @@ bool QXmlSimpleReader::feature(const QString& name, bool *ok) const reported. \row \li \e http://trolltech.com/xml/features/report-whitespace-only-CharData \li true + \li Obsolete, use the following string instead. + If enabled, CharData that consist of + only whitespace characters are reported + using QXmlContentHandler::characters(). If disabled, whitespace is silently + discarded. + \row \li \e http://qt-project.org/xml/features/report-whitespace-only-CharData + \li true \li If enabled, CharData that consist of only whitespace characters are reported using QXmlContentHandler::characters(). If disabled, whitespace is silently discarded. \row \li \e http://trolltech.com/xml/features/report-start-end-entity \li false + \li Obsolete, use the following string instead. + If enabled, the parser reports + QXmlContentHandler::startEntity() and + QXmlContentHandler::endEntity() events, so character data + might be reported in chunks. + If disabled, the parser does not report these events, but + silently substitutes the entities, and reports the character + data in one chunk. + \row \li \e http://qt-project.org/xml/features/report-start-end-entity + \li false \li If enabled, the parser reports QXmlContentHandler::startEntity() and QXmlContentHandler::endEntity() events, so character data @@ -3188,14 +3206,15 @@ bool QXmlSimpleReader::feature(const QString& name, bool *ok) const void QXmlSimpleReader::setFeature(const QString& name, bool enable) { Q_D(QXmlSimpleReader); - // Qt5 ###: Change these strings to qt.nokia.com if (name == QLatin1String("http://xml.org/sax/features/namespaces")) { d->useNamespaces = enable; } else if (name == QLatin1String("http://xml.org/sax/features/namespace-prefixes")) { d->useNamespacePrefixes = enable; - } else if (name == QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData")) { // Shouldn't change in Qt 4 + } else if (name == QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData") // For compat with Qt 4 + || name == QLatin1String("http://qt-project.org/xml/features/report-whitespace-only-CharData")) { d->reportWhitespaceCharData = enable; - } else if (name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity")) { // Shouldn't change in Qt 4 + } else if (name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity") // For compat with Qt 4 + || name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity")) { d->reportEntities = enable; } else { qWarning("Unknown feature %s", name.toLatin1().data()); @@ -3206,11 +3225,12 @@ void QXmlSimpleReader::setFeature(const QString& name, bool enable) */ bool QXmlSimpleReader::hasFeature(const QString& name) const { - // Qt5 ###: Change these strings to qt.nokia.com if (name == QLatin1String("http://xml.org/sax/features/namespaces") || name == QLatin1String("http://xml.org/sax/features/namespace-prefixes") - || name == QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData") // Shouldn't change in Qt 4 - || name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity")) { // Shouldn't change in Qt 4 + || name == QLatin1String("http://trolltech.com/xml/features/report-whitespace-only-CharData") // For compat with Qt 4 + || name == QLatin1String("http://qt-project.org/xml/features/report-whitespace-only-CharData") + || name == QLatin1String("http://trolltech.com/xml/features/report-start-end-entity") // For compat with Qt 4 + || name == QLatin1String("http://qt-project.org/xml/features/report-start-end-entity")) { return true; } else { return false; diff --git a/src/xml/sax/qxml.h b/src/xml/sax/qxml.h index 038b0c750f..4c7daff3f7 100644 --- a/src/xml/sax/qxml.h +++ b/src/xml/sax/qxml.h @@ -359,7 +359,7 @@ public: virtual bool internalEntityDecl(const QString& name, const QString& value) = 0; virtual bool externalEntityDecl(const QString& name, const QString& publicId, const QString& systemId) = 0; virtual QString errorString() const = 0; - // ### Qt 5: Conform to SAX by adding elementDecl + // ### Conform to SAX by adding elementDecl }; |