aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2011-09-21 09:23:30 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2011-09-21 09:23:30 +0000
commit387269664f575429b3d8e023c4bce51763b6335c (patch)
treec62bdf70e2be08518ad1a3cda03009fc57163d6d /src
parent44593bd7f234284a515df59cce3332f8b91d5022 (diff)
downloadqxmpp-387269664f575429b3d8e023c4bce51763b6335c.tar.gz
remove trailing whitespace
Diffstat (limited to 'src')
-rw-r--r--src/QXmppClient.cpp4
-rw-r--r--src/QXmppClient.h2
-rw-r--r--src/QXmppCodec.cpp28
-rw-r--r--src/QXmppDataForm.cpp12
-rw-r--r--src/QXmppDiscoveryIq.cpp2
-rw-r--r--src/QXmppJingleIq.cpp2
-rw-r--r--src/QXmppLogger.h4
-rw-r--r--src/QXmppMessage.cpp4
-rw-r--r--src/QXmppMessage.h4
-rw-r--r--src/QXmppOutgoingClient.cpp4
-rw-r--r--src/QXmppOutgoingServer.cpp2
-rw-r--r--src/QXmppPacket.h2
-rw-r--r--src/QXmppPasswordChecker.cpp2
-rw-r--r--src/QXmppPresence.cpp2
-rw-r--r--src/QXmppPresence.h4
-rw-r--r--src/QXmppReconnectionManager.cpp2
-rw-r--r--src/QXmppRosterManager.h6
-rw-r--r--src/QXmppRpcManager.cpp2
-rw-r--r--src/QXmppSaslAuth.cpp2
-rw-r--r--src/QXmppStanza.cpp16
-rw-r--r--src/QXmppStanza.h6
-rw-r--r--src/QXmppStun.cpp6
-rw-r--r--src/QXmppTransferManager.cpp6
-rw-r--r--src/QXmppTransferManager.h2
-rw-r--r--src/QXmppUtils.cpp2
-rw-r--r--src/QXmppVCardIq.cpp2
26 files changed, 65 insertions, 65 deletions
diff --git a/src/QXmppClient.cpp b/src/QXmppClient.cpp
index 0bea7d6b..e078f5a1 100644
--- a/src/QXmppClient.cpp
+++ b/src/QXmppClient.cpp
@@ -92,7 +92,7 @@ void QXmppClientPrivate::addProperCapability(QXmppPresence& presence)
/// establishment of the XMPP connection and provide a number of high-level
/// "managers" to perform specific tasks. You can write your own managers to
/// extend QXmpp by subclassing QXmppClientExtension.
-///
+///
/// <B>Main Class:</B>
/// - QXmppClient
///
@@ -424,7 +424,7 @@ void QXmppClient::setClientPresence(const QXmppPresence& presence)
if (presence.type() == QXmppPresence::Unavailable)
{
- // NOTE: we can't call disconnect() because it alters
+ // NOTE: we can't call disconnect() because it alters
// the client presence
if (d->stream->isConnected())
{
diff --git a/src/QXmppClient.h b/src/QXmppClient.h
index ff9755c4..212244dd 100644
--- a/src/QXmppClient.h
+++ b/src/QXmppClient.h
@@ -137,7 +137,7 @@ public:
}
void connectToServer(const QXmppConfiguration&,
- const QXmppPresence& initialPresence =
+ const QXmppPresence& initialPresence =
QXmppPresence());
void connectToServer(const QString &jid,
const QString &password);
diff --git a/src/QXmppCodec.cpp b/src/QXmppCodec.cpp
index a9e16cfc..a614ce01 100644
--- a/src/QXmppCodec.cpp
+++ b/src/QXmppCodec.cpp
@@ -75,7 +75,7 @@ static qint16 seg_uend[8] = {0x3F, 0x7F, 0xFF, 0x1FF,
static qint16 search(qint16 val, qint16 *table, qint16 size)
{
qint16 i;
-
+
for (i = 0; i < size; i++) {
if (val <= *table++)
return (i);
@@ -107,7 +107,7 @@ quint8 linear2alaw(qint16 pcm_val)
qint16 mask;
qint16 seg;
quint8 aval;
-
+
pcm_val = pcm_val >> 3;
if (pcm_val >= 0) {
@@ -116,12 +116,12 @@ quint8 linear2alaw(qint16 pcm_val)
mask = 0x55; /* sign bit = 0 */
pcm_val = -pcm_val - 1;
}
-
+
/* Convert the scaled magnitude to segment number. */
seg = search(pcm_val, seg_aend, 8);
-
+
/* Combine the sign, segment, and quantization bits. */
-
+
if (seg >= 8) /* out of range, return maximum value. */
return (quint8) (0x7F ^ mask);
else {
@@ -142,9 +142,9 @@ qint16 alaw2linear(quint8 a_val)
{
qint16 t;
qint16 seg;
-
+
a_val ^= 0x55;
-
+
t = (a_val & QUANT_MASK) << 4;
seg = ((qint16)a_val & SEG_MASK) >> SEG_SHIFT;
switch (seg) {
@@ -195,7 +195,7 @@ quint8 linear2ulaw(qint16 pcm_val)
qint16 mask;
qint16 seg;
quint8 uval;
-
+
/* Get the sign and the magnitude of the value. */
pcm_val = pcm_val >> 2;
if (pcm_val < 0) {
@@ -206,10 +206,10 @@ quint8 linear2ulaw(qint16 pcm_val)
}
if (pcm_val > CLIP) pcm_val = CLIP; /* clip the magnitude */
pcm_val += (BIAS >> 2);
-
+
/* Convert the scaled magnitude to segment number. */
seg = search(pcm_val, seg_uend, 8);
-
+
/*
* Combine the sign, segment, quantization bits;
* and complement the code word.
@@ -234,17 +234,17 @@ quint8 linear2ulaw(qint16 pcm_val)
qint16 ulaw2linear(quint8 u_val)
{
qint16 t;
-
+
/* Complement to obtain normal u-law value. */
u_val = ~u_val;
-
+
/*
* Extract and bias the quantization bits. Then
* shift up by the segment number and subtract out the bias.
*/
t = ((u_val & QUANT_MASK) << 3) + BIAS;
t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
-
+
return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS));
}
@@ -835,7 +835,7 @@ bool QXmppTheoraEncoder::setFormat(const QXmppVideoFormat &format)
#endif
stream.writeRawData(headers[h].data(), headers[h].size());
}
-
+
return true;
}
diff --git a/src/QXmppDataForm.cpp b/src/QXmppDataForm.cpp
index bfce6fcb..aab3857d 100644
--- a/src/QXmppDataForm.cpp
+++ b/src/QXmppDataForm.cpp
@@ -312,8 +312,8 @@ void QXmppDataForm::parse(const QDomElement &element)
field.setValue(valueStr == "1" || valueStr == "true");
}
else if (type == QXmppDataForm::Field::ListMultiField ||
- type == QXmppDataForm::Field::JidMultiField ||
- type == QXmppDataForm::Field::TextMultiField)
+ type == QXmppDataForm::Field::JidMultiField ||
+ type == QXmppDataForm::Field::TextMultiField)
{
QStringList values;
QDomElement valueElement = fieldElement.firstChildElement("value");
@@ -332,14 +332,14 @@ void QXmppDataForm::parse(const QDomElement &element)
/* field options */
if (type == QXmppDataForm::Field::ListMultiField ||
type == QXmppDataForm::Field::ListSingleField)
- {
+ {
QList<QPair<QString, QString> > options;
QDomElement optionElement = fieldElement.firstChildElement("option");
while (!optionElement.isNull())
{
options.append(QPair<QString, QString>(optionElement.attribute("label"),
optionElement.firstChildElement("value").text()));
- optionElement = optionElement.nextSiblingElement("option");
+ optionElement = optionElement.nextSiblingElement("option");
}
field.setOptions(options);
}
@@ -380,7 +380,7 @@ void QXmppDataForm::toXml(QXmlStreamWriter *writer) const
if (!m_instructions.isEmpty())
helperToXmlAddTextElement(writer, "instructions", m_instructions);
-
+
foreach (const QXmppDataForm::Field &field, m_fields)
{
writer->writeStartElement("field");
@@ -407,7 +407,7 @@ void QXmppDataForm::toXml(QXmlStreamWriter *writer) const
if (type == QXmppDataForm::Field::BooleanField)
{
helperToXmlAddTextElement(writer, "value", field.value().toBool() ? "1" : "0");
- }
+ }
else if (type == QXmppDataForm::Field::ListMultiField ||
type == QXmppDataForm::Field::JidMultiField ||
type == QXmppDataForm::Field::TextMultiField)
diff --git a/src/QXmppDiscoveryIq.cpp b/src/QXmppDiscoveryIq.cpp
index 1409721e..6e0d33d5 100644
--- a/src/QXmppDiscoveryIq.cpp
+++ b/src/QXmppDiscoveryIq.cpp
@@ -215,7 +215,7 @@ bool QXmppDiscoveryIq::isDiscoveryIq(const QDomElement &element)
{
QDomElement queryElement = element.firstChildElement("query");
return (queryElement.namespaceURI() == ns_disco_info ||
- queryElement.namespaceURI() == ns_disco_items);
+ queryElement.namespaceURI() == ns_disco_items);
}
void QXmppDiscoveryIq::parseElementFromChild(const QDomElement &element)
diff --git a/src/QXmppJingleIq.cpp b/src/QXmppJingleIq.cpp
index 976c4d2b..5eb11322 100644
--- a/src/QXmppJingleIq.cpp
+++ b/src/QXmppJingleIq.cpp
@@ -435,7 +435,7 @@ QXmppJingleCandidate::QXmppJingleCandidate()
}
/// Returns the candidate's component ID.
-
+
int QXmppJingleCandidate::component() const
{
return m_component;
diff --git a/src/QXmppLogger.h b/src/QXmppLogger.h
index 5d139a91..6ca98755 100644
--- a/src/QXmppLogger.h
+++ b/src/QXmppLogger.h
@@ -33,7 +33,7 @@
#define qxmpp_loggable_trace(x) (x)
#endif
-/// \brief The QXmppLogger class represents a sink for logging messages.
+/// \brief The QXmppLogger class represents a sink for logging messages.
///
/// \ingroup Core
@@ -95,7 +95,7 @@ private:
QXmppLogger::MessageTypes m_messageTypes;
};
-/// \brief The QXmppLoggable class represents a source of logging messages.
+/// \brief The QXmppLoggable class represents a source of logging messages.
///
/// \ingroup Core
diff --git a/src/QXmppMessage.cpp b/src/QXmppMessage.cpp
index 100b82e3..a76e02ec 100644
--- a/src/QXmppMessage.cpp
+++ b/src/QXmppMessage.cpp
@@ -45,7 +45,7 @@ static const char* chat_states[] = {
/// \param body
/// \param thread
-QXmppMessage::QXmppMessage(const QString& from, const QString& to, const
+QXmppMessage::QXmppMessage(const QString& from, const QString& to, const
QString& body, const QString& thread)
: QXmppStanza(from, to),
m_type(Chat),
@@ -141,7 +141,7 @@ void QXmppMessage::setTypeFromStr(const QString& str)
setType(QXmppMessage::Error);
return;
}
- else if(str == "") // if no type is specified
+ else if(str == "") // if no type is specified
{
setType(QXmppMessage::Normal);
return;
diff --git a/src/QXmppMessage.h b/src/QXmppMessage.h
index b73b5a0b..9d518f74 100644
--- a/src/QXmppMessage.h
+++ b/src/QXmppMessage.h
@@ -46,7 +46,7 @@ public:
Headline
};
- /// This enum describes a chat state as defined by
+ /// This enum describes a chat state as defined by
/// XEP-0085 : Chat State Notifications.
enum State
{
@@ -67,7 +67,7 @@ public:
bool isAttentionRequested() const;
void setAttentionRequested(bool requested);
-
+
QDateTime stamp() const;
void setStamp(const QDateTime &stamp);
diff --git a/src/QXmppOutgoingClient.cpp b/src/QXmppOutgoingClient.cpp
index 96c20292..1a52be02 100644
--- a/src/QXmppOutgoingClient.cpp
+++ b/src/QXmppOutgoingClient.cpp
@@ -266,7 +266,7 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv)
emit elementReceived(nodeRecv, handled);
if (handled)
return;
-
+
if(QXmppStreamFeatures::isStreamFeatures(nodeRecv))
{
QXmppStreamFeatures features;
@@ -295,7 +295,7 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv)
if (socket()->supportsSsl() &&
localSecurity != QXmppConfiguration::TLSDisabled &&
- remoteSecurity != QXmppStreamFeatures::Disabled)
+ remoteSecurity != QXmppStreamFeatures::Disabled)
{
// enable TLS as it is support by both parties
sendData("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
diff --git a/src/QXmppOutgoingServer.cpp b/src/QXmppOutgoingServer.cpp
index 7984fd92..0845c6d4 100644
--- a/src/QXmppOutgoingServer.cpp
+++ b/src/QXmppOutgoingServer.cpp
@@ -196,7 +196,7 @@ void QXmppOutgoingServer::handleStanza(const QDomElement &stanza)
// check the request is valid
if (response.from().isEmpty() ||
response.to() != d->localDomain ||
- response.type().isEmpty())
+ response.type().isEmpty())
{
warning("Invalid dialback response received");
return;
diff --git a/src/QXmppPacket.h b/src/QXmppPacket.h
index 7e332391..427217c7 100644
--- a/src/QXmppPacket.h
+++ b/src/QXmppPacket.h
@@ -40,7 +40,7 @@ class QXmppPacket
public:
QXmppPacket();
virtual ~QXmppPacket();
-
+
virtual void parse(const QDomElement &element) = 0;
virtual void toXml( QXmlStreamWriter *writer ) const = 0;
};
diff --git a/src/QXmppPasswordChecker.cpp b/src/QXmppPasswordChecker.cpp
index 0bbf6802..9048d66c 100644
--- a/src/QXmppPasswordChecker.cpp
+++ b/src/QXmppPasswordChecker.cpp
@@ -143,7 +143,7 @@ QString QXmppPasswordReply::password() const
/// Sets the received password.
///
-/// \param password
+/// \param password
void QXmppPasswordReply::setPassword(const QString &password)
{
diff --git a/src/QXmppPresence.cpp b/src/QXmppPresence.cpp
index df5ff9f0..b967c8e5 100644
--- a/src/QXmppPresence.cpp
+++ b/src/QXmppPresence.cpp
@@ -319,7 +319,7 @@ void QXmppPresence::Status::setTypeFromStr(const QString& str)
else if(str == "xa")
m_type = QXmppPresence::Status::XA;
else {
- qWarning("QXmppPresence::Status::setTypeFromStr() invalid input string type %s",
+ qWarning("QXmppPresence::Status::setTypeFromStr() invalid input string type %s",
qPrintable(str));
m_type = QXmppPresence::Status::Online;
}
diff --git a/src/QXmppPresence.h b/src/QXmppPresence.h
index f7422c55..8b85e01b 100644
--- a/src/QXmppPresence.h
+++ b/src/QXmppPresence.h
@@ -73,7 +73,7 @@ public:
Offline = 0,
Online, ///< The entity or resource is online.
Away, ///< The entity or resource is temporarily away.
- XA, ///< The entity or resource is away for an extended period.
+ XA, ///< The entity or resource is away for an extended period.
DND, ///< The entity or resource is busy ("Do Not Disturb").
Chat, ///< The entity or resource is actively interested in chatting.
};
@@ -104,7 +104,7 @@ public:
int m_priority;
};
- QXmppPresence(QXmppPresence::Type type = QXmppPresence::Available,
+ QXmppPresence(QXmppPresence::Type type = QXmppPresence::Available,
const QXmppPresence::Status& status = QXmppPresence::Status());
~QXmppPresence();
diff --git a/src/QXmppReconnectionManager.cpp b/src/QXmppReconnectionManager.cpp
index 4169dbb8..adb84e9f 100644
--- a/src/QXmppReconnectionManager.cpp
+++ b/src/QXmppReconnectionManager.cpp
@@ -47,7 +47,7 @@ void QXmppReconnectionManager::connected()
}
void QXmppReconnectionManager::error(QXmppClient::Error error)
-{
+{
if(m_client && error == QXmppClient::XmppStreamError)
{
// if we receive a resource conflict, inhibit reconnection
diff --git a/src/QXmppRosterManager.h b/src/QXmppRosterManager.h
index 32b1addf..c7c07de5 100644
--- a/src/QXmppRosterManager.h
+++ b/src/QXmppRosterManager.h
@@ -68,11 +68,11 @@ class QXmppRosterManager : public QXmppClientExtension
public:
QXmppRosterManager(QXmppClient* stream);
~QXmppRosterManager();
-
+
bool isRosterReceived() const;
QStringList getRosterBareJids() const;
QXmppRosterIq::Item getRosterEntry(const QString& bareJid) const;
-
+
QStringList getResources(const QString& bareJid) const;
QMap<QString, QXmppPresence> getAllPresencesForBareJid(
const QString& bareJid) const;
@@ -98,7 +98,7 @@ public slots:
signals:
/// This signal is emitted when the Roster IQ is received after a successful
/// connection. That is the roster entries are empty before this signal is emitted.
- /// One should use getRosterBareJids() and getRosterEntry() only after
+ /// One should use getRosterBareJids() and getRosterEntry() only after
/// this signal has been emitted.
void rosterReceived();
diff --git a/src/QXmppRpcManager.cpp b/src/QXmppRpcManager.cpp
index cf95848c..9730b755 100644
--- a/src/QXmppRpcManager.cpp
+++ b/src/QXmppRpcManager.cpp
@@ -50,7 +50,7 @@ void QXmppRpcManager::addInvokableInterface( QXmppInvokable *interface )
void QXmppRpcManager::invokeInterfaceMethod( const QXmppRpcInvokeIq &iq )
{
QXmppStanza::Error error;
-
+
const QStringList methodBits = iq.method().split('.');
if (methodBits.size() != 2)
return;
diff --git a/src/QXmppSaslAuth.cpp b/src/QXmppSaslAuth.cpp
index 9543ea02..a528cd6d 100644
--- a/src/QXmppSaslAuth.cpp
+++ b/src/QXmppSaslAuth.cpp
@@ -164,7 +164,7 @@ QMap<QByteArray, QByteArray> QXmppSaslDigestMd5::parseMessage(const QByteArray &
// unquote
QByteArray value = ba.mid(pos, endPos - pos);
value.replace("\\\"", "\"");
- value.replace("\\\\", "\\");
+ value.replace("\\\\", "\\");
map[key] = value;
// skip closing quote and comma
startIndex = endPos + 2;
diff --git a/src/QXmppStanza.cpp b/src/QXmppStanza.cpp
index be6a6ee7..bec4eee3 100644
--- a/src/QXmppStanza.cpp
+++ b/src/QXmppStanza.cpp
@@ -38,7 +38,7 @@ QXmppStanza::Error::Error():
{
}
-QXmppStanza::Error::Error(Type type, Condition cond, const QString& text):
+QXmppStanza::Error::Error(Type type, Condition cond, const QString& text):
m_code(0),
m_type(type),
m_condition(cond),
@@ -253,7 +253,7 @@ void QXmppStanza::Error::parse(const QDomElement &errorElement)
else if(element.namespaceURI() == ns_stanza)
{
cond = element.tagName();
- }
+ }
element = element.nextSiblingElement();
}
@@ -265,7 +265,7 @@ void QXmppStanza::Error::toXml( QXmlStreamWriter *writer ) const
{
QString cond = getConditionStr();
QString type = getTypeStr();
-
+
if(cond.isEmpty() && type.isEmpty())
return;
@@ -323,7 +323,7 @@ QString QXmppStanza::to() const
///
/// \param to
-void QXmppStanza::setTo(const QString& to)
+void QXmppStanza::setTo(const QString& to)
{
m_to = to;
}
@@ -346,7 +346,7 @@ void QXmppStanza::setFrom(const QString& from)
/// Returns the stanza's identifier.
-QString QXmppStanza::id() const
+QString QXmppStanza::id() const
{
return m_id;
}
@@ -355,14 +355,14 @@ QString QXmppStanza::id() const
///
/// \param id
-void QXmppStanza::setId(const QString& id)
+void QXmppStanza::setId(const QString& id)
{
m_id = id;
}
/// Returns the stanza's language.
-QString QXmppStanza::lang() const
+QString QXmppStanza::lang() const
{
return m_lang;
}
@@ -371,7 +371,7 @@ QString QXmppStanza::lang() const
///
/// \param lang
-void QXmppStanza::setLang(const QString& lang)
+void QXmppStanza::setLang(const QString& lang)
{
m_lang = lang;
}
diff --git a/src/QXmppStanza.h b/src/QXmppStanza.h
index aa2285f4..6a940ce4 100644
--- a/src/QXmppStanza.h
+++ b/src/QXmppStanza.h
@@ -121,7 +121,7 @@ public:
QXmppStanza(const QString& from = QString(), const QString& to = QString());
~QXmppStanza();
-
+
QString to() const;
void setTo(const QString&);
@@ -151,9 +151,9 @@ protected:
private:
static uint s_uniqeIdNo;
- QString m_to;
+ QString m_to;
QString m_from;
- QString m_id;
+ QString m_id;
QString m_lang;
QXmppStanza::Error m_error;
QXmppElementList m_extensions;
diff --git a/src/QXmppStun.cpp b/src/QXmppStun.cpp
index 08308648..16cef928 100644
--- a/src/QXmppStun.cpp
+++ b/src/QXmppStun.cpp
@@ -773,7 +773,7 @@ bool QXmppStunMessage::decode(const QByteArray &buffer, const QByteArray &key, Q
/// Encodes the current QXmppStunMessage, optionally calculating the
/// message integrity attribute using the given key.
-///
+///
/// \param key
/// \param addFingerprint
@@ -978,7 +978,7 @@ quint16 QXmppStunMessage::peekType(const QByteArray &buffer, quint32 &cookie, QB
stream.readRawData(id.data(), id.size());
return type;
}
-
+
QString QXmppStunMessage::toString() const
{
QStringList dumpLines;
@@ -2117,7 +2117,7 @@ void QXmppIceComponent::handleDatagram(const QByteArray &buffer, const QHostAddr
// signal completion
if (pair && pair->checked == QIODevice::ReadWrite)
- {
+ {
m_timer->stop();
if (!m_activePair || pair->priority() > m_activePair->priority()) {
info(QString("ICE pair selected %1 (priority: %2)").arg(
diff --git a/src/QXmppTransferManager.cpp b/src/QXmppTransferManager.cpp
index 3e753407..b9d71408 100644
--- a/src/QXmppTransferManager.cpp
+++ b/src/QXmppTransferManager.cpp
@@ -731,7 +731,7 @@ bool QXmppTransferManager::handleStanza(const QDomElement &element)
return false;
}
-
+
QXmppTransferJob* QXmppTransferManager::getJobByRequestId(QXmppTransferJob::Direction direction, const QString &jid, const QString &id)
{
foreach (QXmppTransferJob *job, m_jobs)
@@ -1174,7 +1174,7 @@ QXmppTransferJob *QXmppTransferManager::sendFile(const QString &jid, QIODevice *
file.setAttribute("name", job->fileName());
file.setAttribute("size", QString::number(job->fileSize()));
items.append(file);
-
+
QXmppElement feature;
feature.setTagName("feature");
feature.setAttribute("xmlns", ns_feature_negotiation);
@@ -1478,7 +1478,7 @@ void QXmppTransferManager::streamInitiationSetReceived(const QXmppStreamInitiati
response.setType(QXmppIq::Error);
response.setError(error);
client()->sendPacket(response);
-
+
delete job;
return;
}
diff --git a/src/QXmppTransferManager.h b/src/QXmppTransferManager.h
index 88b227bb..900d2163 100644
--- a/src/QXmppTransferManager.h
+++ b/src/QXmppTransferManager.h
@@ -207,7 +207,7 @@ private:
/// \endcode
///
/// \ingroup Managers
-
+
class QXmppTransferManager : public QXmppClientExtension
{
Q_OBJECT
diff --git a/src/QXmppUtils.cpp b/src/QXmppUtils.cpp
index a6a28298..1698582f 100644
--- a/src/QXmppUtils.cpp
+++ b/src/QXmppUtils.cpp
@@ -253,7 +253,7 @@ QByteArray generateHmacSha1(const QByteArray &key, const QByteArray &text)
return generateHmac(QCryptographicHash::Sha1, key, text);
}
-/// Generates a random integer x between 0 and N-1.
+/// Generates a random integer x between 0 and N-1.
///
/// \param N
diff --git a/src/QXmppVCardIq.cpp b/src/QXmppVCardIq.cpp
index 82b4ed53..aaaf4554 100644
--- a/src/QXmppVCardIq.cpp
+++ b/src/QXmppVCardIq.cpp
@@ -42,7 +42,7 @@ QString getImageType(const QByteArray &contents)
else if (contents.contains("/* XPM */"))
return "image/x-xpm";
else if (contents.contains("<?xml") && contents.contains("<svg"))
- return "image/svg+xml";
+ return "image/svg+xml";
else if (contents.startsWith("\xFF\xD8\xFF\xE0"))
return "image/jpeg";
return "image/unknown";