aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppStanza.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2020-02-04 15:33:33 +0100
committerLinus Jahn <lnj@kaidan.im>2020-02-04 16:13:02 +0100
commit99c0df8616056318eb94539cfde497d3b10f3ae0 (patch)
tree60ffc4652a3b189c40decbc4e80d49ab5c16ff80 /src/base/QXmppStanza.cpp
parent79cdfa5c0e66edbc2b12033739e22d6dcc4fd045 (diff)
downloadqxmpp-99c0df8616056318eb94539cfde497d3b10f3ae0.tar.gz
Fix missing documentation for for QXmppStanza::Error
Diffstat (limited to 'src/base/QXmppStanza.cpp')
-rw-r--r--src/base/QXmppStanza.cpp45
1 files changed, 38 insertions, 7 deletions
diff --git a/src/base/QXmppStanza.cpp b/src/base/QXmppStanza.cpp
index c4db071b..3148181e 100644
--- a/src/base/QXmppStanza.cpp
+++ b/src/base/QXmppStanza.cpp
@@ -56,14 +56,9 @@ QXmppExtendedAddress::QXmppExtendedAddress()
///
/// \param other
///
-QXmppExtendedAddress::QXmppExtendedAddress(const QXmppExtendedAddress &other)
- : d(other.d)
-{
-}
+QXmppExtendedAddress::QXmppExtendedAddress(const QXmppExtendedAddress &other) = default;
-QXmppExtendedAddress::~QXmppExtendedAddress()
-{
-}
+QXmppExtendedAddress::~QXmppExtendedAddress() = default;
/// Assigns the other address to this one.
///
@@ -185,13 +180,20 @@ QXmppStanzaErrorPrivate::QXmppStanzaErrorPrivate()
{
}
+///
+/// Default constructor
+///
QXmppStanza::Error::Error()
: d(new QXmppStanzaErrorPrivate)
{
}
+/// Copy constructor
QXmppStanza::Error::Error(const QXmppStanza::Error &) = default;
+///
+/// Initializes an error with a type, condition and text.
+///
QXmppStanza::Error::Error(Type type, Condition cond, const QString &text)
: d(new QXmppStanzaErrorPrivate)
{
@@ -200,6 +202,9 @@ QXmppStanza::Error::Error(Type type, Condition cond, const QString &text)
d->text = text;
}
+///
+/// Initializes an error with a type, condition and text (all from strings).
+///
QXmppStanza::Error::Error(const QString &type, const QString &cond,
const QString &text)
: d(new QXmppStanzaErrorPrivate)
@@ -209,45 +214,71 @@ QXmppStanza::Error::Error(const QString &type, const QString &cond,
setConditionFromStr(cond);
}
+/// Default destructor
QXmppStanza::Error::~Error() = default;
+/// Copy operator
QXmppStanza::Error &QXmppStanza::Error::operator=(const QXmppStanza::Error &) = default;
+///
+/// Returns the human-readable description of the error.
+///
QString QXmppStanza::Error::text() const
{
return d->text;
}
+///
+/// Sets the description of the error.
+///
void QXmppStanza::Error::setText(const QString &text)
{
d->text = text;
}
+///
+/// Returns the error code.
+///
int QXmppStanza::Error::code() const
{
return d->code;
}
+///
+/// Sets the error code.
+///
void QXmppStanza::Error::setCode(int code)
{
d->code = code;
}
+///
+/// Returns the error condition.
+///
QXmppStanza::Error::Condition QXmppStanza::Error::condition() const
{
return d->condition;
}
+///
+/// Sets the error condition.
+///
void QXmppStanza::Error::setCondition(QXmppStanza::Error::Condition cond)
{
d->condition = cond;
}
+///
+/// Returns the type of the error.
+///
QXmppStanza::Error::Type QXmppStanza::Error::type() const
{
return d->type;
}
+///
+/// Sets the type of the error.
+///
void QXmppStanza::Error::setType(QXmppStanza::Error::Type type)
{
d->type = type;