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.
4687 s <<
'<' << qName << nsDecl;
4696 if (it.
value()->namespaceURI.isNull()) {
4711 if((!it.
value()->ownerNode ||
4712 it.
value()->ownerNode->prefix != it.
value()->prefix) &&
4714 s <<
" xmlns:" << it.
value()->prefix <<
"=\"" <<
encodeText(it.
value()->namespaceURI, s,
true,
true) <<
'\"';
4728 /* -1 disables new lines. */ 4732 QDomNodePrivate::save(s, depth + 1, indent); if (!last->isText()) 4733 s << QString(indent < 1 ? 0 : depth * indent, QLatin1Char(' ')); 4735 s << "</" << qName << '>
'; 4739 if (!(next && next->isText())) { 4740 /* -1 disables new lines. */ The QHash::const_iterator class provides an STL-style const iterator for QHash and QMultiHash...
#define it(className, varName)
QHash< QString, QDomNodePrivate * > map
virtual bool isText() const
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
bool contains(const T &value) const
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
bool isEmpty() const
Returns true if the hash contains no items; otherwise returns false.
const T & value() const
Returns the current item's value.
const_iterator insert(const T &value)
QDomNamedNodeMapPrivate * m_attr
bool isNull() const
Returns true if this string is null; otherwise returns false.
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the hash.
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the hash...
static QString encodeText(const QString &str, QTextStream &s, const bool encodeQuotes=true, const bool performAVN=false, const bool encodeEOLs=false)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.