summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-28 18:46:45 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-28 18:46:45 (GMT)
commit1bf03d7237525bc3a57f3a67d16520a5ea9754ad (patch)
tree0719f699ec66a158dbbb3c06038e194f564d7788
parent969decf04244881af9dbfc9c925891e14ff0181a (diff)
Astyle kdelibs
-rw-r--r--autotests/identitytest.cpp8
-rw-r--r--autotests/identitytest.h3
-rw-r--r--src/identity.cpp62
3 files changed, 37 insertions, 36 deletions
diff --git a/autotests/identitytest.cpp b/autotests/identitytest.cpp
index 85a661d..a7ee0fb 100644
--- a/autotests/identitytest.cpp
+++ b/autotests/identitytest.cpp
@@ -47,7 +47,7 @@ bool IdentityTester::compareIdentities(const Identity &actual, const Identity &e
//QCOMPARE(actual.isDefault(), expected.isDefault());
QCOMPARE(actual.identityName(), expected.identityName());
QCOMPARE(actual.fullName(), expected.fullName());
- QCOMPARE(actual.organization(), expected.organization());
+ QCOMPARE(actual.organization(), expected.organization());
QCOMPARE(actual.pgpEncryptionKey(), expected.pgpEncryptionKey());
QCOMPARE(actual.pgpSigningKey(), expected.pgpSigningKey());
QCOMPARE(actual.smimeEncryptionKey(), expected.smimeEncryptionKey());
@@ -66,7 +66,7 @@ bool IdentityTester::compareIdentities(const Identity &actual, const Identity &e
QCOMPARE(actual.pgpAutoEncrypt(), expected.pgpAutoEncrypt());
QCOMPARE(actual.defaultDomainName(), expected.defaultDomainName());
QCOMPARE(actual.signatureText(), expected.signatureText());
- QCOMPARE(const_cast<Identity&>(actual).signature(), const_cast<Identity&>(expected).signature());
+ QCOMPARE(const_cast<Identity &>(actual).signature(), const_cast<Identity &>(expected).signature());
QCOMPARE(actual.transport(), expected.transport());
QCOMPARE(actual.fcc(), expected.fcc());
QCOMPARE(actual.drafts(), expected.drafts());
@@ -80,7 +80,6 @@ bool IdentityTester::compareIdentities(const Identity &actual, const Identity &e
return ok;
}
-
void IdentityTester::test_Identity()
{
Identity identity;
@@ -93,7 +92,7 @@ void IdentityTester::test_Identity()
identity.setFullName(QStringLiteral("Daniel Vrátil"));
QCOMPARE(identity.fullName(), QStringLiteral("Daniel Vrátil"));
identity.setOrganization(QStringLiteral("KDE"));
- QCOMPARE(identity.organization(), QStringLiteral("KDE"));
+ QCOMPARE(identity.organization(), QStringLiteral("KDE"));
identity.setPGPEncryptionKey("0x0123456789ABCDEF");
QCOMPARE(identity.pgpEncryptionKey(), QByteArray("0x0123456789ABCDEF"));
identity.setPGPSigningKey("0xFEDCBA9876543210");
@@ -183,7 +182,6 @@ void IdentityTester::test_Identity()
}
}
-
void IdentityTester::test_NullIdentity()
{
IdentityManager manager;
diff --git a/autotests/identitytest.h b/autotests/identitytest.h
index 8710fc2..b05cd5c 100644
--- a/autotests/identitytest.h
+++ b/autotests/identitytest.h
@@ -22,7 +22,8 @@
#include <qobject.h>
-namespace KIdentityManagement {
+namespace KIdentityManagement
+{
class Identity;
}
diff --git a/src/identity.cpp b/src/identity.cpp
index 367fb49..22ff09e 100644
--- a/src/identity.cpp
+++ b/src/identity.cpp
@@ -168,34 +168,34 @@ QDataStream &KIdentityManagement::operator<<
(QDataStream &stream, const KIdentityManagement::Identity &i)
{
return stream << static_cast<quint32>(i.uoid())
- << i.mPropertiesMap[QLatin1String(s_identity)]
- << i.mPropertiesMap[QLatin1String(s_name)]
- << i.mPropertiesMap[QLatin1String(s_organization)]
- << i.mPropertiesMap[QLatin1String(s_pgps)]
- << i.mPropertiesMap[QLatin1String(s_pgpe)]
- << i.mPropertiesMap[QLatin1String(s_smimes)]
- << i.mPropertiesMap[QLatin1String(s_smimee)]
- << i.mPropertiesMap[QLatin1String(s_primaryEmail)]
- << i.mPropertiesMap[QLatin1String(s_emailAliases)]
- << i.mPropertiesMap[QLatin1String(s_replyto)]
- << i.mPropertiesMap[QLatin1String(s_bcc)]
- << i.mPropertiesMap[QLatin1String(s_vcard)]
- << i.mPropertiesMap[QLatin1String(s_transport)]
- << i.mPropertiesMap[QLatin1String(s_fcc)]
- << i.mPropertiesMap[QLatin1String(s_drafts)]
- << i.mPropertiesMap[QLatin1String(s_templates)]
- << i.mSignature
- << i.mPropertiesMap[QLatin1String(s_dict)]
- << i.mPropertiesMap[QLatin1String(s_xface)]
- << i.mPropertiesMap[QLatin1String(s_xfaceenabled)]
- << i.mPropertiesMap[QLatin1String(s_prefcrypt)]
- << i.mPropertiesMap[QLatin1String(s_cc)]
- << i.mPropertiesMap[QLatin1String(s_attachVcard)]
- << i.mPropertiesMap[QLatin1String(s_autocorrectionLanguage)]
- << i.mPropertiesMap[QLatin1String(s_disabledFcc)]
- << i.mPropertiesMap[QLatin1String(s_pgpautosign)]
- << i.mPropertiesMap[QLatin1String(s_pgpautoencrypt)]
- << i.mPropertiesMap[QLatin1String(s_defaultDomainName)];
+ << i.mPropertiesMap[QLatin1String(s_identity)]
+ << i.mPropertiesMap[QLatin1String(s_name)]
+ << i.mPropertiesMap[QLatin1String(s_organization)]
+ << i.mPropertiesMap[QLatin1String(s_pgps)]
+ << i.mPropertiesMap[QLatin1String(s_pgpe)]
+ << i.mPropertiesMap[QLatin1String(s_smimes)]
+ << i.mPropertiesMap[QLatin1String(s_smimee)]
+ << i.mPropertiesMap[QLatin1String(s_primaryEmail)]
+ << i.mPropertiesMap[QLatin1String(s_emailAliases)]
+ << i.mPropertiesMap[QLatin1String(s_replyto)]
+ << i.mPropertiesMap[QLatin1String(s_bcc)]
+ << i.mPropertiesMap[QLatin1String(s_vcard)]
+ << i.mPropertiesMap[QLatin1String(s_transport)]
+ << i.mPropertiesMap[QLatin1String(s_fcc)]
+ << i.mPropertiesMap[QLatin1String(s_drafts)]
+ << i.mPropertiesMap[QLatin1String(s_templates)]
+ << i.mSignature
+ << i.mPropertiesMap[QLatin1String(s_dict)]
+ << i.mPropertiesMap[QLatin1String(s_xface)]
+ << i.mPropertiesMap[QLatin1String(s_xfaceenabled)]
+ << i.mPropertiesMap[QLatin1String(s_prefcrypt)]
+ << i.mPropertiesMap[QLatin1String(s_cc)]
+ << i.mPropertiesMap[QLatin1String(s_attachVcard)]
+ << i.mPropertiesMap[QLatin1String(s_autocorrectionLanguage)]
+ << i.mPropertiesMap[QLatin1String(s_disabledFcc)]
+ << i.mPropertiesMap[QLatin1String(s_pgpautosign)]
+ << i.mPropertiesMap[QLatin1String(s_pgpautoencrypt)]
+ << i.mPropertiesMap[QLatin1String(s_defaultDomainName)];
}
QDataStream &KIdentityManagement::operator>>
@@ -276,8 +276,10 @@ bool Identity::operator== (const Identity &other) const
// regular mPropertiesMap == other.mPropertiesMap comparison will fail.
// This algo considers both maps equal even if one map does not contain the
// key and the other one contains the key but with an invalid value
- for (const auto &pair : { qMakePair(mPropertiesMap, other.mPropertiesMap),
- qMakePair(other.mPropertiesMap, mPropertiesMap) }) {
+ for (const auto &pair : {
+ qMakePair(mPropertiesMap, other.mPropertiesMap),
+ qMakePair(other.mPropertiesMap, mPropertiesMap)
+ }) {
const auto lhs = pair.first;
const auto rhs = pair.second;
for (auto lhsIt = lhs.constBegin(), lhsEnd = lhs.constEnd(); lhsIt != lhsEnd; ++lhsIt) {