QDom: give name to all anonymous parameters as well as too generic ones

This patch has several different goals:
- Make the QDom classes easier to use through PySide6 by avoiding the
  the generation of variable names that have no meaning.
- Make the code cleaner as using unrelated single letter parameter is
  not the best way to convey the information.
- Improve the documentation.
- Make qdoc's work easier

Fixes: QTBUG-121670
Task-number: QTBUG-121468
Change-Id: Ia31d119b3a1cc3c92ed6f77a60280191db3b74bc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Samuel Gaist 2024-01-29 22:23:10 +01:00 committed by Edward Welbourne
parent b0f4bd7f23
commit f4cb42ed0b
2 changed files with 207 additions and 208 deletions

View File

@ -47,7 +47,7 @@ using namespace Qt::StringLiterals;
/* ##### new TODOs:
Remove empty emthods in the *Private classes
Remove empty methods in the *Private classes
Make a lot of the (mostly empty) methods in the public classes inline.
Specially constructors assignment operators and comparison operators are candidates.
@ -374,52 +374,52 @@ QDomImplementation::QDomImplementation()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a implementation.
*/
QDomImplementation::QDomImplementation(const QDomImplementation &x)
QDomImplementation::QDomImplementation(const QDomImplementation &implementation)
: impl(implementation.impl)
{
impl = x.impl;
if (impl)
impl->ref.ref();
}
QDomImplementation::QDomImplementation(QDomImplementationPrivate *p)
QDomImplementation::QDomImplementation(QDomImplementationPrivate *pimpl)
: impl(pimpl)
{
// We want to be co-owners, so increase the reference count
impl = p;
if (impl)
impl->ref.ref();
}
/*!
Assigns \a x to this DOM implementation.
Assigns \a other to this DOM implementation.
*/
QDomImplementation& QDomImplementation::operator=(const QDomImplementation &x)
QDomImplementation& QDomImplementation::operator=(const QDomImplementation &other)
{
if (x.impl)
x.impl->ref.ref();
if (other.impl)
other.impl->ref.ref();
if (impl && !impl->ref.deref())
delete impl;
impl = x.impl;
impl = other.impl;
return *this;
}
/*!
Returns \c true if \a x and this DOM implementation object were
Returns \c true if \a other and this DOM implementation object were
created from the same QDomDocument; otherwise returns \c false.
*/
bool QDomImplementation::operator==(const QDomImplementation &x) const
bool QDomImplementation::operator==(const QDomImplementation &other) const
{
return (impl == x.impl);
return impl == other.impl;
}
/*!
Returns \c true if \a x and this DOM implementation object were
Returns \c true if \a other and this DOM implementation object were
created from different QDomDocuments; otherwise returns \c false.
*/
bool QDomImplementation::operator!=(const QDomImplementation &x) const
bool QDomImplementation::operator!=(const QDomImplementation &other) const
{
return (impl != x.impl);
return !operator==(other);
}
/*!
@ -646,7 +646,7 @@ bool QDomNodeListPrivate::operator==(const QDomNodeListPrivate &other) const
bool QDomNodeListPrivate::operator!=(const QDomNodeListPrivate &other) const
{
return (node_impl != other.node_impl) || (tagname != other.tagname);
return !operator==(other);
}
void QDomNodeListPrivate::createList()
@ -771,54 +771,54 @@ QDomNodeList::QDomNodeList()
{
}
QDomNodeList::QDomNodeList(QDomNodeListPrivate* p)
: impl(p)
QDomNodeList::QDomNodeList(QDomNodeListPrivate *pimpl)
: impl(pimpl)
{
}
/*!
Constructs a copy of \a n.
Constructs a copy of \a nodeList.
*/
QDomNodeList::QDomNodeList(const QDomNodeList& n)
QDomNodeList::QDomNodeList(const QDomNodeList &nodeList)
: impl(nodeList.impl)
{
impl = n.impl;
if (impl)
impl->ref.ref();
}
/*!
Assigns \a n to this node list.
Assigns \a other to this node list.
*/
QDomNodeList& QDomNodeList::operator=(const QDomNodeList &n)
QDomNodeList& QDomNodeList::operator=(const QDomNodeList &other)
{
if (n.impl)
n.impl->ref.ref();
if (other.impl)
other.impl->ref.ref();
if (impl && !impl->ref.deref())
delete impl;
impl = n.impl;
impl = other.impl;
return *this;
}
/*!
Returns \c true if the node list \a n and this node list are equal;
Returns \c true if the node list \a other and this node list are equal;
otherwise returns \c false.
*/
bool QDomNodeList::operator==(const QDomNodeList &n) const
bool QDomNodeList::operator==(const QDomNodeList &other) const
{
if (impl == n.impl)
if (impl == other.impl)
return true;
if (!impl || !n.impl)
if (!impl || !other.impl)
return false;
return (*impl == *n.impl);
return (*impl == *other.impl);
}
/*!
Returns \c true the node list \a n and this node list are not equal;
Returns \c true the node list \a other and this node list are not equal;
otherwise returns \c false.
*/
bool QDomNodeList::operator!=(const QDomNodeList &n) const
bool QDomNodeList::operator!=(const QDomNodeList &other) const
{
return !operator==(n);
return !operator==(other);
}
/*!
@ -1474,48 +1474,48 @@ QDomNode::QDomNode()
}
/*!
Constructs a copy of \a n.
Constructs a copy of \a node.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomNode::QDomNode(const QDomNode &n)
QDomNode::QDomNode(const QDomNode &node)
: impl(node.impl)
{
impl = n.impl;
if (impl)
impl->ref.ref();
}
/*! \internal
Constructs a new node for the data \a n.
Constructs a new node for the data \a pimpl.
*/
QDomNode::QDomNode(QDomNodePrivate *n)
QDomNode::QDomNode(QDomNodePrivate *pimpl)
: impl(pimpl)
{
impl = n;
if (impl)
impl->ref.ref();
}
/*!
Assigns a copy of \a n to this DOM node.
Assigns a copy of \a other to this DOM node.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomNode& QDomNode::operator=(const QDomNode &n)
QDomNode& QDomNode::operator=(const QDomNode &other)
{
if (n.impl)
n.impl->ref.ref();
if (other.impl)
other.impl->ref.ref();
if (impl && !impl->ref.deref())
delete impl;
impl = n.impl;
impl = other.impl;
return *this;
}
/*!
Returns \c true if \a n and this DOM node are equal; otherwise
Returns \c true if \a other and this DOM node are equal; otherwise
returns \c false.
Any instance of QDomNode acts as a reference to an underlying data
@ -1534,18 +1534,18 @@ QDomNode& QDomNode::operator=(const QDomNode &n)
\c {element3 == element4} will return false because they refer to
two different nodes in the underlying data structure.
*/
bool QDomNode::operator== (const QDomNode& n) const
bool QDomNode::operator==(const QDomNode &other) const
{
return (impl == n.impl);
return impl == other.impl;
}
/*!
Returns \c true if \a n and this DOM node are not equal; otherwise
Returns \c true if \a other and this DOM node are not equal; otherwise
returns \c false.
*/
bool QDomNode::operator!= (const QDomNode& n) const
bool QDomNode::operator!=(const QDomNode &other) const
{
return (impl != n.impl);
return !operator==(other);
}
/*!
@ -1622,15 +1622,14 @@ QString QDomNode::nodeValue() const
}
/*!
Sets the node's value to \a v.
Sets the node's value to \a value.
\sa nodeValue()
*/
void QDomNode::setNodeValue(const QString& v)
void QDomNode::setNodeValue(const QString& value)
{
if (!impl)
return;
IMPL->setNodeValue(v);
if (impl)
IMPL->setNodeValue(value);
}
/*!
@ -2504,11 +2503,12 @@ int QDomNode::columnNumber() const
*
**************************************************************/
QDomNamedNodeMapPrivate::QDomNamedNodeMapPrivate(QDomNodePrivate* n) : ref(1)
QDomNamedNodeMapPrivate::QDomNamedNodeMapPrivate(QDomNodePrivate *pimpl)
: ref(1)
, parent(pimpl)
, readonly(false)
, appendToParent(false)
{
readonly = false;
parent = n;
appendToParent = false;
}
QDomNamedNodeMapPrivate::~QDomNamedNodeMapPrivate()
@ -2516,16 +2516,16 @@ QDomNamedNodeMapPrivate::~QDomNamedNodeMapPrivate()
clearMap();
}
QDomNamedNodeMapPrivate* QDomNamedNodeMapPrivate::clone(QDomNodePrivate* p)
QDomNamedNodeMapPrivate* QDomNamedNodeMapPrivate::clone(QDomNodePrivate *pimpl)
{
std::unique_ptr<QDomNamedNodeMapPrivate> m(new QDomNamedNodeMapPrivate(p));
std::unique_ptr<QDomNamedNodeMapPrivate> m(new QDomNamedNodeMapPrivate(pimpl));
m->readonly = readonly;
m->appendToParent = appendToParent;
auto it = map.constBegin();
for (; it != map.constEnd(); ++it) {
QDomNodePrivate *new_node = it.value()->cloneNode();
new_node->setParent(p);
new_node->setParent(pimpl);
m->setNamedItem(new_node);
}
@ -2697,51 +2697,51 @@ QDomNamedNodeMap::QDomNamedNodeMap()
}
/*!
Constructs a copy of \a n.
Constructs a copy of \a namedNodeMap.
*/
QDomNamedNodeMap::QDomNamedNodeMap(const QDomNamedNodeMap &n)
QDomNamedNodeMap::QDomNamedNodeMap(const QDomNamedNodeMap &namedNodeMap)
: impl(namedNodeMap.impl)
{
impl = n.impl;
if (impl)
impl->ref.ref();
}
QDomNamedNodeMap::QDomNamedNodeMap(QDomNamedNodeMapPrivate *n)
QDomNamedNodeMap::QDomNamedNodeMap(QDomNamedNodeMapPrivate *pimpl)
: impl(pimpl)
{
impl = n;
if (impl)
impl->ref.ref();
}
/*!
Assigns \a n to this named node map.
Assigns \a other to this named node map.
*/
QDomNamedNodeMap& QDomNamedNodeMap::operator=(const QDomNamedNodeMap &n)
QDomNamedNodeMap& QDomNamedNodeMap::operator=(const QDomNamedNodeMap &other)
{
if (n.impl)
n.impl->ref.ref();
if (other.impl)
other.impl->ref.ref();
if (impl && !impl->ref.deref())
delete impl;
impl = n.impl;
impl = other.impl;
return *this;
}
/*!
Returns \c true if \a n and this named node map are equal; otherwise
Returns \c true if \a other and this named node map are equal; otherwise
returns \c false.
*/
bool QDomNamedNodeMap::operator== (const QDomNamedNodeMap& n) const
bool QDomNamedNodeMap::operator==(const QDomNamedNodeMap &other) const
{
return (impl == n.impl);
return impl == other.impl;
}
/*!
Returns \c true if \a n and this named node map are not equal;
Returns \c true if \a other and this named node map are not equal;
otherwise returns \c false.
*/
bool QDomNamedNodeMap::operator!= (const QDomNamedNodeMap& n) const
bool QDomNamedNodeMap::operator!=(const QDomNamedNodeMap &other) const
{
return (impl != n.impl);
return !operator==(other);
}
/*!
@ -3117,30 +3117,30 @@ QDomDocumentType::QDomDocumentType() : QDomNode()
}
/*!
Constructs a copy of \a n.
Constructs a copy of \a documentType.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomDocumentType::QDomDocumentType(const QDomDocumentType& n)
: QDomNode(n)
QDomDocumentType::QDomDocumentType(const QDomDocumentType &documentType)
: QDomNode(documentType)
{
}
QDomDocumentType::QDomDocumentType(QDomDocumentTypePrivate* n)
: QDomNode(n)
QDomDocumentType::QDomDocumentType(QDomDocumentTypePrivate *pimpl)
: QDomNode(pimpl)
{
}
/*!
Assigns \a n to this document type.
Assigns \a other to this document type.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomDocumentType &QDomDocumentType::operator=(const QDomDocumentType &n) = default;
QDomDocumentType &QDomDocumentType::operator=(const QDomDocumentType &other) = default;
/*!
Returns the name of the document type as specified in the
&lt;!DOCTYPE name&gt; tag.
@ -3298,25 +3298,25 @@ QDomDocumentFragment::QDomDocumentFragment(QDomDocumentFragmentPrivate* n)
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a documentFragment.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomDocumentFragment::QDomDocumentFragment(const QDomDocumentFragment& x)
: QDomNode(x)
QDomDocumentFragment::QDomDocumentFragment(const QDomDocumentFragment &documentFragment)
: QDomNode(documentFragment)
{
}
/*!
Assigns \a x to this DOM document fragment.
Assigns \a other to this DOM document fragment.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomDocumentFragment &QDomDocumentFragment::operator=(const QDomDocumentFragment &x) = default;
QDomDocumentFragment &QDomDocumentFragment::operator=(const QDomDocumentFragment &other) = default;
/*!
\fn QDomNode::NodeType QDomDocumentFragment::nodeType() const
@ -3424,14 +3424,14 @@ QDomCharacterData::QDomCharacterData()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a characterData.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomCharacterData::QDomCharacterData(const QDomCharacterData& x)
: QDomNode(x)
QDomCharacterData::QDomCharacterData(const QDomCharacterData &characterData)
: QDomNode(characterData)
{
}
@ -3441,13 +3441,13 @@ QDomCharacterData::QDomCharacterData(QDomCharacterDataPrivate* n)
}
/*!
Assigns \a x to this character data.
Assigns \a other to this character data.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomCharacterData &QDomCharacterData::operator=(const QDomCharacterData &x) = default;
QDomCharacterData &QDomCharacterData::operator=(const QDomCharacterData &other) = default;
/*!
Returns the string stored in this object.
@ -3463,12 +3463,12 @@ QString QDomCharacterData::data() const
}
/*!
Sets this object's string to \a v.
Sets this object's string to \a data.
*/
void QDomCharacterData::setData(const QString& v)
void QDomCharacterData::setData(const QString &data)
{
if (impl)
impl->setNodeValue(v);
impl->setNodeValue(data);
}
/*!
@ -3730,14 +3730,14 @@ QDomAttr::QDomAttr()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a attr.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomAttr::QDomAttr(const QDomAttr& x)
: QDomNode(x)
QDomAttr::QDomAttr(const QDomAttr &attr)
: QDomNode(attr)
{
}
@ -3747,13 +3747,13 @@ QDomAttr::QDomAttr(QDomAttrPrivate* n)
}
/*!
Assigns \a x to this DOM attribute.
Assigns \a other to this DOM attribute.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomAttr &QDomAttr::operator=(const QDomAttr &x) = default;
QDomAttr &QDomAttr::operator=(const QDomAttr &other) = default;
/*!
Returns the attribute's name.
@ -3805,15 +3805,15 @@ QString QDomAttr::value() const
}
/*!
Sets the attribute's value to \a v.
Sets the attribute's value to \a value.
\sa value()
*/
void QDomAttr::setValue(const QString& v)
void QDomAttr::setValue(const QString &value)
{
if (!impl)
return;
impl->setNodeValue(v);
impl->setNodeValue(value);
IMPL->m_specified = true;
}
@ -4201,14 +4201,14 @@ QDomElement::QDomElement()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a element.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomElement::QDomElement(const QDomElement& x)
: QDomNode(x)
QDomElement::QDomElement(const QDomElement &element)
: QDomNode(element)
{
}
@ -4218,13 +4218,13 @@ QDomElement::QDomElement(QDomElementPrivate* n)
}
/*!
Assigns \a x to this DOM element.
Assigns \a other to this DOM element.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomElement &QDomElement::operator=(const QDomElement &x) = default;
QDomElement &QDomElement::operator=(const QDomElement &other) = default;
/*!
\fn QDomNode::NodeType QDomElement::nodeType() const
@ -4718,14 +4718,14 @@ QDomText::QDomText()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a text.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomText::QDomText(const QDomText& x)
: QDomCharacterData(x)
QDomText::QDomText(const QDomText &text)
: QDomCharacterData(text)
{
}
@ -4735,13 +4735,13 @@ QDomText::QDomText(QDomTextPrivate* n)
}
/*!
Assigns \a x to this DOM text.
Assigns \a other to this DOM text.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomText &QDomText::operator=(const QDomText &x) = default;
QDomText &QDomText::operator=(const QDomText &other) = default;
/*!
\fn QDomNode::NodeType QDomText::nodeType() const
@ -4846,14 +4846,14 @@ QDomComment::QDomComment()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a comment.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomComment::QDomComment(const QDomComment& x)
: QDomCharacterData(x)
QDomComment::QDomComment(const QDomComment &comment)
: QDomCharacterData(comment)
{
}
@ -4863,13 +4863,13 @@ QDomComment::QDomComment(QDomCommentPrivate* n)
}
/*!
Assigns \a x to this DOM comment.
Assigns \a other to this DOM comment.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomComment &QDomComment::operator=(const QDomComment &x) = default;
QDomComment &QDomComment::operator=(const QDomComment &other) = default;
/*!
\fn QDomNode::NodeType QDomComment::nodeType() const
@ -4951,14 +4951,14 @@ QDomCDATASection::QDomCDATASection()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a cdataSection.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomCDATASection::QDomCDATASection(const QDomCDATASection& x)
: QDomText(x)
QDomCDATASection::QDomCDATASection(const QDomCDATASection &cdataSection)
: QDomText(cdataSection)
{
}
@ -4968,13 +4968,13 @@ QDomCDATASection::QDomCDATASection(QDomCDATASectionPrivate* n)
}
/*!
Assigns \a x to this CDATA section.
Assigns \a other to this CDATA section.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomCDATASection &QDomCDATASection::operator=(const QDomCDATASection &x) = default;
QDomCDATASection &QDomCDATASection::operator=(const QDomCDATASection &other) = default;
/*!
\fn QDomNode::NodeType QDomCDATASection::nodeType() const
@ -5072,14 +5072,14 @@ QDomNotation::QDomNotation()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a notation.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomNotation::QDomNotation(const QDomNotation& x)
: QDomNode(x)
QDomNotation::QDomNotation(const QDomNotation &notation)
: QDomNode(notation)
{
}
@ -5089,13 +5089,13 @@ QDomNotation::QDomNotation(QDomNotationPrivate* n)
}
/*!
Assigns \a x to this DOM notation.
Assigns \a other to this DOM notation.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomNotation &QDomNotation::operator=(const QDomNotation &x) = default;
QDomNotation &QDomNotation::operator=(const QDomNotation &other) = default;
/*!
\fn QDomNode::NodeType QDomNotation::nodeType() const
@ -5266,14 +5266,14 @@ QDomEntity::QDomEntity()
/*!
Constructs a copy of \a x.
Constructs a copy of \a entity.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomEntity::QDomEntity(const QDomEntity& x)
: QDomNode(x)
QDomEntity::QDomEntity(const QDomEntity &entity)
: QDomNode(entity)
{
}
@ -5283,13 +5283,13 @@ QDomEntity::QDomEntity(QDomEntityPrivate* n)
}
/*!
Assigns \a x to this DOM entity.
Assigns \a other to this DOM entity.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomEntity &QDomEntity::operator=(const QDomEntity &x) = default;
QDomEntity &QDomEntity::operator=(const QDomEntity &other) = default;
/*!
\fn QDomNode::NodeType QDomEntity::nodeType() const
@ -5415,14 +5415,14 @@ QDomEntityReference::QDomEntityReference()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a entityReference.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomEntityReference::QDomEntityReference(const QDomEntityReference& x)
: QDomNode(x)
QDomEntityReference::QDomEntityReference(const QDomEntityReference &entityReference)
: QDomNode(entityReference)
{
}
@ -5432,13 +5432,13 @@ QDomEntityReference::QDomEntityReference(QDomEntityReferencePrivate* n)
}
/*!
Assigns \a x to this entity reference.
Assigns \a other to this entity reference.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomEntityReference &QDomEntityReference::operator=(const QDomEntityReference &x) = default;
QDomEntityReference &QDomEntityReference::operator=(const QDomEntityReference &other) = default;
/*!
\fn QDomNode::NodeType QDomEntityReference::nodeType() const
@ -5529,14 +5529,14 @@ QDomProcessingInstruction::QDomProcessingInstruction()
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a processingInstruction.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomProcessingInstruction::QDomProcessingInstruction(const QDomProcessingInstruction& x)
: QDomNode(x)
QDomProcessingInstruction::QDomProcessingInstruction(const QDomProcessingInstruction &processingInstruction)
: QDomNode(processingInstruction)
{
}
@ -5546,14 +5546,14 @@ QDomProcessingInstruction::QDomProcessingInstruction(QDomProcessingInstructionPr
}
/*!
Assigns \a x to this processing instruction.
Assigns \a other to this processing instruction.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomProcessingInstruction &
QDomProcessingInstruction::operator=(const QDomProcessingInstruction &x) = default;
QDomProcessingInstruction::operator=(const QDomProcessingInstruction &other) = default;
/*!
\fn QDomNode::NodeType QDomProcessingInstruction::nodeType() const
@ -5586,15 +5586,14 @@ QString QDomProcessingInstruction::data() const
}
/*!
Sets the data contained in the processing instruction to \a d.
Sets the data contained in the processing instruction to \a data.
\sa data()
*/
void QDomProcessingInstruction::setData(const QString& d)
void QDomProcessingInstruction::setData(const QString &data)
{
if (!impl)
return;
impl->setNodeValue(d);
if (impl)
impl->setNodeValue(data);
}
/**************************************************************
@ -6050,30 +6049,30 @@ QDomDocument::QDomDocument(const QDomDocumentType& doctype)
}
/*!
Constructs a copy of \a x.
Constructs a copy of \a document.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomDocument::QDomDocument(const QDomDocument& x)
: QDomNode(x)
QDomDocument::QDomDocument(const QDomDocument &document)
: QDomNode(document)
{
}
QDomDocument::QDomDocument(QDomDocumentPrivate* x)
: QDomNode(x)
QDomDocument::QDomDocument(QDomDocumentPrivate *pimpl)
: QDomNode(pimpl)
{
}
/*!
Assigns \a x to this DOM document.
Assigns \a other to this DOM document.
The data of the copy is shared (shallow copy): modifying one node
will also change the other. If you want to make a deep copy, use
cloneNode().
*/
QDomDocument &QDomDocument::operator=(const QDomDocument &x) = default;
QDomDocument &QDomDocument::operator=(const QDomDocument &other) = default;
/*!
Destroys the object and frees its resources.

View File

@ -58,11 +58,11 @@ class Q_XML_EXPORT QDomImplementation
{
public:
QDomImplementation();
QDomImplementation(const QDomImplementation&);
QDomImplementation(const QDomImplementation &implementation);
~QDomImplementation();
QDomImplementation& operator= (const QDomImplementation&);
bool operator== (const QDomImplementation&) const;
bool operator!= (const QDomImplementation&) const;
QDomImplementation& operator=(const QDomImplementation &other);
bool operator==(const QDomImplementation &other) const;
bool operator!=(const QDomImplementation &other) const;
// functions
bool hasFeature(const QString& feature, const QString& version) const;
@ -110,10 +110,10 @@ public:
};
QDomNode();
QDomNode(const QDomNode&);
QDomNode& operator= (const QDomNode&);
bool operator== (const QDomNode&) const;
bool operator!= (const QDomNode&) const;
QDomNode(const QDomNode &node);
QDomNode& operator=(const QDomNode &other);
bool operator==(const QDomNode &other) const;
bool operator!=(const QDomNode &other) const;
~QDomNode();
// DOM functions
@ -144,7 +144,7 @@ public:
// DOM attributes
QString nodeValue() const;
void setNodeValue(const QString&);
void setNodeValue(const QString &value);
QString prefix() const;
void setPrefix(const QString& pre);
@ -211,10 +211,10 @@ class Q_XML_EXPORT QDomNodeList
{
public:
QDomNodeList();
QDomNodeList(const QDomNodeList&);
QDomNodeList& operator= (const QDomNodeList&);
bool operator== (const QDomNodeList&) const;
bool operator!= (const QDomNodeList&) const;
QDomNodeList(const QDomNodeList &nodeList);
QDomNodeList& operator=(const QDomNodeList &other);
bool operator==(const QDomNodeList &other) const;
bool operator!=(const QDomNodeList &other) const;
~QDomNodeList();
// DOM functions
@ -240,8 +240,8 @@ class Q_XML_EXPORT QDomDocumentType : public QDomNode
{
public:
QDomDocumentType();
QDomDocumentType(const QDomDocumentType& x);
QDomDocumentType& operator= (const QDomDocumentType&);
QDomDocumentType(const QDomDocumentType &documentType);
QDomDocumentType& operator=(const QDomDocumentType &other);
// DOM read only attributes
QString name() const;
@ -284,8 +284,8 @@ public:
QDomDocument();
explicit QDomDocument(const QString& name);
explicit QDomDocument(const QDomDocumentType& doctype);
QDomDocument(const QDomDocument& x);
QDomDocument& operator= (const QDomDocument&);
QDomDocument(const QDomDocument &document);
QDomDocument& operator=(const QDomDocument &other);
~QDomDocument();
// DOM functions
@ -354,10 +354,10 @@ class Q_XML_EXPORT QDomNamedNodeMap
{
public:
QDomNamedNodeMap();
QDomNamedNodeMap(const QDomNamedNodeMap&);
QDomNamedNodeMap& operator= (const QDomNamedNodeMap&);
bool operator== (const QDomNamedNodeMap&) const;
bool operator!= (const QDomNamedNodeMap&) const;
QDomNamedNodeMap(const QDomNamedNodeMap &namedNodeMap);
QDomNamedNodeMap& operator=(const QDomNamedNodeMap &other);
bool operator==(const QDomNamedNodeMap &other) const;
bool operator!=(const QDomNamedNodeMap &other) const;
~QDomNamedNodeMap();
// DOM functions
@ -391,8 +391,8 @@ class Q_XML_EXPORT QDomDocumentFragment : public QDomNode
{
public:
QDomDocumentFragment();
QDomDocumentFragment(const QDomDocumentFragment& x);
QDomDocumentFragment& operator= (const QDomDocumentFragment&);
QDomDocumentFragment(const QDomDocumentFragment &documentFragment);
QDomDocumentFragment& operator=(const QDomDocumentFragment &other);
// Overridden from QDomNode
inline QDomNode::NodeType nodeType() const { return DocumentFragmentNode; }
@ -408,8 +408,8 @@ class Q_XML_EXPORT QDomCharacterData : public QDomNode
{
public:
QDomCharacterData();
QDomCharacterData(const QDomCharacterData& x);
QDomCharacterData& operator= (const QDomCharacterData&);
QDomCharacterData(const QDomCharacterData &characterData);
QDomCharacterData& operator=(const QDomCharacterData &other);
// DOM functions
QString substringData(unsigned long offset, unsigned long count);
@ -423,7 +423,7 @@ public:
// DOM attributes
QString data() const;
void setData(const QString&);
void setData(const QString &data);
// Overridden from QDomNode
QDomNode::NodeType nodeType() const;
@ -441,8 +441,8 @@ class Q_XML_EXPORT QDomAttr : public QDomNode
{
public:
QDomAttr();
QDomAttr(const QDomAttr& x);
QDomAttr& operator= (const QDomAttr&);
QDomAttr(const QDomAttr &attr);
QDomAttr& operator=(const QDomAttr &other);
// DOM read only attributes
QString name() const;
@ -451,7 +451,7 @@ public:
// DOM attributes
QString value() const;
void setValue(const QString&);
void setValue(const QString &value);
// Overridden from QDomNode
inline QDomNode::NodeType nodeType() const { return AttributeNode; }
@ -468,8 +468,8 @@ class Q_XML_EXPORT QDomElement : public QDomNode
{
public:
QDomElement();
QDomElement(const QDomElement& x);
QDomElement& operator= (const QDomElement&);
QDomElement(const QDomElement &element);
QDomElement& operator=(const QDomElement &other);
// DOM functions
QString attribute(const QString& name, const QString& defValue = QString() ) const;
@ -526,8 +526,8 @@ class Q_XML_EXPORT QDomText : public QDomCharacterData
{
public:
QDomText();
QDomText(const QDomText& x);
QDomText& operator= (const QDomText&);
QDomText(const QDomText &text);
QDomText& operator=(const QDomText &other);
// DOM functions
QDomText splitText(int offset);
@ -547,8 +547,8 @@ class Q_XML_EXPORT QDomComment : public QDomCharacterData
{
public:
QDomComment();
QDomComment(const QDomComment& x);
QDomComment& operator= (const QDomComment&);
QDomComment(const QDomComment &comment);
QDomComment& operator=(const QDomComment &other);
// Overridden from QDomCharacterData
inline QDomNode::NodeType nodeType() const { return CommentNode; }
@ -564,8 +564,8 @@ class Q_XML_EXPORT QDomCDATASection : public QDomText
{
public:
QDomCDATASection();
QDomCDATASection(const QDomCDATASection& x);
QDomCDATASection& operator= (const QDomCDATASection&);
QDomCDATASection(const QDomCDATASection &cdataSection);
QDomCDATASection& operator=(const QDomCDATASection &other);
// Overridden from QDomText
inline QDomNode::NodeType nodeType() const { return CDATASectionNode; }
@ -581,8 +581,8 @@ class Q_XML_EXPORT QDomNotation : public QDomNode
{
public:
QDomNotation();
QDomNotation(const QDomNotation& x);
QDomNotation& operator= (const QDomNotation&);
QDomNotation(const QDomNotation &notation);
QDomNotation& operator=(const QDomNotation &other);
// DOM read only attributes
QString publicId() const;
@ -602,8 +602,8 @@ class Q_XML_EXPORT QDomEntity : public QDomNode
{
public:
QDomEntity();
QDomEntity(const QDomEntity& x);
QDomEntity& operator= (const QDomEntity&);
QDomEntity(const QDomEntity &entity);
QDomEntity& operator=(const QDomEntity &other);
// DOM read only attributes
QString publicId() const;
@ -623,8 +623,8 @@ class Q_XML_EXPORT QDomEntityReference : public QDomNode
{
public:
QDomEntityReference();
QDomEntityReference(const QDomEntityReference& x);
QDomEntityReference& operator= (const QDomEntityReference&);
QDomEntityReference(const QDomEntityReference &entityReference);
QDomEntityReference& operator=(const QDomEntityReference &other);
// Overridden from QDomNode
inline QDomNode::NodeType nodeType() const { return EntityReferenceNode; }
@ -640,15 +640,15 @@ class Q_XML_EXPORT QDomProcessingInstruction : public QDomNode
{
public:
QDomProcessingInstruction();
QDomProcessingInstruction(const QDomProcessingInstruction& x);
QDomProcessingInstruction& operator= (const QDomProcessingInstruction&);
QDomProcessingInstruction(const QDomProcessingInstruction &processingInstruction);
QDomProcessingInstruction& operator=(const QDomProcessingInstruction &other);
// DOM read only attributes
QString target() const;
// DOM attributes
QString data() const;
void setData(const QString& d);
void setData(const QString &data);
// Overridden from QDomNode
inline QDomNode::NodeType nodeType() const { return ProcessingInstructionNode; }
@ -661,7 +661,7 @@ private:
};
Q_XML_EXPORT QTextStream& operator<<(QTextStream&, const QDomNode&);
Q_XML_EXPORT QTextStream& operator<<(QTextStream& stream, const QDomNode& node);
#endif // QT_NO_DOM