Commit 1bf03d72 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Astyle kdelibs

parent 969decf0
......@@ -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;
......
......@@ -22,7 +22,8 @@
#include <qobject.h>
namespace KIdentityManagement {
namespace KIdentityManagement
{
class Identity;
}
......
......@@ -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) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment