aboutsummaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorJonah BrĂ¼chert <jbb.prv@gmx.de>2020-03-28 17:17:07 +0100
committerLNJ <lnj@kaidan.im>2020-03-28 18:07:47 +0100
commitefc82e3307ac28ca0eb9639274301e9cb350e257 (patch)
treef25920e3602c9c47e8fd2002945146f1deff18b7 /src/base
parent1ac7b9d2a25d50b7680bd75ff68f29055b196d80 (diff)
downloadqxmpp-efc82e3307ac28ca0eb9639274301e9cb350e257.tar.gz
Reformat code
Diffstat (limited to 'src/base')
-rw-r--r--src/base/QXmppDiscoveryIq.h2
-rw-r--r--src/base/QXmppMessage.cpp2
-rw-r--r--src/base/QXmppRosterIq.cpp7
-rw-r--r--src/base/QXmppRosterIq.h2
-rw-r--r--src/base/QXmppStanza.h54
-rw-r--r--src/base/QXmppStreamManagement.cpp3
-rw-r--r--src/base/QXmppStun.cpp5
-rw-r--r--src/base/QXmppUtils.cpp3
8 files changed, 38 insertions, 40 deletions
diff --git a/src/base/QXmppDiscoveryIq.h b/src/base/QXmppDiscoveryIq.h
index cd78802d..8cb1b1ce 100644
--- a/src/base/QXmppDiscoveryIq.h
+++ b/src/base/QXmppDiscoveryIq.h
@@ -83,7 +83,7 @@ public:
Item();
Item(const Item &);
~Item();
-
+
Item &operator=(const Item &);
QString jid() const;
diff --git a/src/base/QXmppMessage.cpp b/src/base/QXmppMessage.cpp
index d02c1586..3a9b67f8 100644
--- a/src/base/QXmppMessage.cpp
+++ b/src/base/QXmppMessage.cpp
@@ -629,7 +629,7 @@ QString QXmppMessage::stanzaId() const
///
/// \since QXmpp 1.3
///
-void QXmppMessage::setStanzaId(const QString& id)
+void QXmppMessage::setStanzaId(const QString &id)
{
d->stanzaId = id;
}
diff --git a/src/base/QXmppRosterIq.cpp b/src/base/QXmppRosterIq.cpp
index 95d96c8d..20b49e11 100644
--- a/src/base/QXmppRosterIq.cpp
+++ b/src/base/QXmppRosterIq.cpp
@@ -129,8 +129,7 @@ void QXmppRosterIq::parseElementFromChild(const QDomElement &element)
}
QDomElement annotateElement = queryElement.firstChildElement(QSL("annotate"));
- setMixAnnotate(!annotateElement.isNull() && annotateElement.namespaceURI()
- == ns_mix_roster);
+ setMixAnnotate(!annotateElement.isNull() && annotateElement.namespaceURI() == ns_mix_roster);
}
void QXmppRosterIq::toXmlElementFromChild(QXmlStreamWriter *writer) const
@@ -310,7 +309,7 @@ QString QXmppRosterIq::Item::getSubscriptionTypeStr() const
void QXmppRosterIq::Item::setSubscriptionTypeFromStr(const QString &type)
{
- if (type.isEmpty() && !type.isNull()) // TODO CHECK
+ if (type.isEmpty() && !type.isNull()) // TODO CHECK
setSubscriptionType(NotSet);
else if (type == QSL("none"))
setSubscriptionType(None);
@@ -361,7 +360,7 @@ QString QXmppRosterIq::Item::mixParticipantId() const
///
/// \since QXmpp 1.3
///
-void QXmppRosterIq::Item::setMixParticipantId(const QString& participantId)
+void QXmppRosterIq::Item::setMixParticipantId(const QString &participantId)
{
d->mixParticipantId = participantId;
}
diff --git a/src/base/QXmppRosterIq.h b/src/base/QXmppRosterIq.h
index f9b33724..6567ba62 100644
--- a/src/base/QXmppRosterIq.h
+++ b/src/base/QXmppRosterIq.h
@@ -84,7 +84,7 @@ public:
void setIsMixChannel(bool);
QString mixParticipantId() const;
- void setMixParticipantId(const QString&);
+ void setMixParticipantId(const QString &);
/// \cond
void parse(const QDomElement &element);
diff --git a/src/base/QXmppStanza.h b/src/base/QXmppStanza.h
index 31f3d99f..e06d0b3b 100644
--- a/src/base/QXmppStanza.h
+++ b/src/base/QXmppStanza.h
@@ -110,37 +110,37 @@ public:
/// The error descriptions are not detailed in here. The exact meaning
/// can be found in the particular protocols using them.
enum Type {
- Cancel, ///< The error is not temporary.
- Continue, ///< The error was only a warning.
- Modify, ///< The request needs to be changed and resent.
- Auth, ///< The request needs to be resent after authentication.
- Wait ///< The error is temporary, you should wait and resend.
+ Cancel, ///< The error is not temporary.
+ Continue, ///< The error was only a warning.
+ Modify, ///< The request needs to be changed and resent.
+ Auth, ///< The request needs to be resent after authentication.
+ Wait ///< The error is temporary, you should wait and resend.
};
/// A detailed condition of the error
enum Condition {
- BadRequest, ///< The request does not contain a valid schema.
- Conflict, ///< The request conflicts with another.
- FeatureNotImplemented, ///< The feature is not implemented.
- Forbidden, ///< The requesting entity does not posses the necessary privileges to perform the request.
- Gone, ///< The user or server can not be contacted at the address.
- InternalServerError, ///< The server has expierienced an internal error and can not process the request.
- ItemNotFound, ///< The requested item could not be found.
- JidMalformed, ///< The given JID is not valid.
- NotAcceptable, ///< The request does not meet the defined critera.
- NotAllowed, ///< No entity is allowed to perform the request.
- NotAuthorized, ///< The request should be resent after authentication.
- PaymentRequired, ///< Payment is required to perform the request.
- RecipientUnavailable, ///< The recipient is unavailable.
- Redirect, ///< The requested resource is available elsewhere.
- RegistrationRequired, ///< The requesting entity needs to register first.
- RemoteServerNotFound, ///< The remote server could not be found.
- RemoteServerTimeout, ///< The connection to the server could not be established or timed out.
- ResourceConstraint, ///< The recipient lacks system resources to perform the request.
- ServiceUnavailable, ///< The service is currently not available.
- SubscriptionRequired, ///< The requester needs to subscribe first.
- UndefinedCondition, ///< An undefined condition was hit.
- UnexpectedRequest ///< The request was unexpected.
+ BadRequest, ///< The request does not contain a valid schema.
+ Conflict, ///< The request conflicts with another.
+ FeatureNotImplemented, ///< The feature is not implemented.
+ Forbidden, ///< The requesting entity does not posses the necessary privileges to perform the request.
+ Gone, ///< The user or server can not be contacted at the address.
+ InternalServerError, ///< The server has expierienced an internal error and can not process the request.
+ ItemNotFound, ///< The requested item could not be found.
+ JidMalformed, ///< The given JID is not valid.
+ NotAcceptable, ///< The request does not meet the defined critera.
+ NotAllowed, ///< No entity is allowed to perform the request.
+ NotAuthorized, ///< The request should be resent after authentication.
+ PaymentRequired, ///< Payment is required to perform the request.
+ RecipientUnavailable, ///< The recipient is unavailable.
+ Redirect, ///< The requested resource is available elsewhere.
+ RegistrationRequired, ///< The requesting entity needs to register first.
+ RemoteServerNotFound, ///< The remote server could not be found.
+ RemoteServerTimeout, ///< The connection to the server could not be established or timed out.
+ ResourceConstraint, ///< The recipient lacks system resources to perform the request.
+ ServiceUnavailable, ///< The service is currently not available.
+ SubscriptionRequired, ///< The requester needs to subscribe first.
+ UndefinedCondition, ///< An undefined condition was hit.
+ UnexpectedRequest ///< The request was unexpected.
};
Error();
diff --git a/src/base/QXmppStreamManagement.cpp b/src/base/QXmppStreamManagement.cpp
index 6629a556..24e1f913 100644
--- a/src/base/QXmppStreamManagement.cpp
+++ b/src/base/QXmppStreamManagement.cpp
@@ -22,11 +22,10 @@
*/
#include "QXmppConstants_p.h"
+#include "QXmppGlobal.h"
#include "QXmppStanza_p.h"
#include "QXmppStreamManagement_p.h"
-#include "QXmppGlobal.h"
-
QXmppStreamManagementEnable::QXmppStreamManagementEnable(const bool resume, const unsigned max)
: m_resume(resume), m_max(max)
{
diff --git a/src/base/QXmppStun.cpp b/src/base/QXmppStun.cpp
index c15d6891..5725ce35 100644
--- a/src/base/QXmppStun.cpp
+++ b/src/base/QXmppStun.cpp
@@ -1715,8 +1715,7 @@ QXmppIcePrivate::QXmppIcePrivate()
tieBreaker = QXmppUtils::generateRandomBytes(8);
}
-struct QXmppIceTransportDetails
-{
+struct QXmppIceTransportDetails {
QXmppIceTransport *transport;
QHostAddress stunHost;
quint16 stunPort;
@@ -1868,7 +1867,7 @@ void QXmppIceComponentPrivate::setSockets(QList<QUdpSocket *> sockets)
request.setId(QXmppUtils::generateRandomBytes(STUN_ID_SIZE));
auto *transaction = new QXmppStunTransaction(request, q);
- stunTransactions.insert(transaction, {transport, stunServer.first, stunServer.second});
+ stunTransactions.insert(transaction, { transport, stunServer.first, stunServer.second });
}
}
diff --git a/src/base/QXmppUtils.cpp b/src/base/QXmppUtils.cpp
index faca37fe..ff331f39 100644
--- a/src/base/QXmppUtils.cpp
+++ b/src/base/QXmppUtils.cpp
@@ -280,7 +280,8 @@ int QXmppUtils::generateRandomInteger(int N)
{
Q_ASSERT(N > 0 && N <= RAND_MAX);
int val;
- while (N <= (val = qrand() / (RAND_MAX / N))) { };
+ while (N <= (val = qrand() / (RAND_MAX / N))) {
+ };
return val;
}