Commit 07377036 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Astyle kdelibs

parent 54623589
......@@ -38,13 +38,13 @@ BirthDayTest::~BirthDayTest()
void BirthDayTest::shouldParseBirthDay()
{
QByteArray vcarddata("BEGIN:VCARD\r\n"
"VERSION:4.0\r\n"
"BDAY:19760505T120505\r\n"
"EMAIL:foo@kde.org\r\n"
"EMAIL:bla@kde.org\r\n"
"N:;;;;\r\n"
"UID:testuid\r\n"
"END:VCARD\r\n\r\n");
"VERSION:4.0\r\n"
"BDAY:19760505T120505\r\n"
"EMAIL:foo@kde.org\r\n"
"EMAIL:bla@kde.org\r\n"
"N:;;;;\r\n"
"UID:testuid\r\n"
"END:VCARD\r\n\r\n");
KContacts::VCardTool vcard;
const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata);
......@@ -57,13 +57,13 @@ void BirthDayTest::shouldParseBirthDay()
void BirthDayTest::shouldParseBirthDayWithoutTime()
{
QByteArray vcarddata("BEGIN:VCARD\r\n"
"VERSION:4.0\r\n"
"BDAY:19760505\r\n"
"EMAIL:foo@kde.org\r\n"
"EMAIL:bla@kde.org\r\n"
"N:;;;;\r\n"
"UID:testuid\r\n"
"END:VCARD\r\n\r\n");
"VERSION:4.0\r\n"
"BDAY:19760505\r\n"
"EMAIL:foo@kde.org\r\n"
"EMAIL:bla@kde.org\r\n"
"N:;;;;\r\n"
"UID:testuid\r\n"
"END:VCARD\r\n\r\n");
KContacts::VCardTool vcard;
const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata);
......@@ -76,13 +76,13 @@ void BirthDayTest::shouldParseBirthDayWithoutTime()
void BirthDayTest::shouldParseBirthDayWithoutTimeAndYear()
{
QByteArray vcarddata("BEGIN:VCARD\r\n"
"VERSION:4.0\r\n"
"BDAY:--0505\r\n"
"EMAIL:foo@kde.org\r\n"
"EMAIL:bla@kde.org\r\n"
"N:;;;;\r\n"
"UID:testuid\r\n"
"END:VCARD\r\n\r\n");
"VERSION:4.0\r\n"
"BDAY:--0505\r\n"
"EMAIL:foo@kde.org\r\n"
"EMAIL:bla@kde.org\r\n"
"N:;;;;\r\n"
"UID:testuid\r\n"
"END:VCARD\r\n\r\n");
KContacts::VCardTool vcard;
const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata);
......
......@@ -22,7 +22,6 @@
#include <QTest>
#include <vcardtool.h>
DateTimeTest::DateTimeTest(QObject *parent)
: QObject(parent)
{
......
......@@ -273,7 +273,6 @@ public:
void setExtraNickNameList(const NickName::List &nickNameList);
NickName::List extraNickNameList() const;
/**
Return nick name.
*/
......@@ -520,7 +519,6 @@ public:
void setExtraOrganizationList(const Org::List &orgList);
Org::List extraOrganizationList() const;
/**
Return organization.
*/
......
......@@ -1224,8 +1224,7 @@ QDateTime VCardTool::parseDateTime(const QString &str, bool *timeValid)
timeString = timeString.replace(QLatin1String(":"), QString());
QStringList timeStrings = timeString.split(QRegularExpression(QStringLiteral("[Z+-]")));
const QString hhmmssString = timeStrings.at(0);
switch(hhmmssString.size())
{
switch (hhmmssString.size()) {
case 2:
time = QTime::fromString(hhmmssString, QStringLiteral("hh"));
break;
......@@ -1243,8 +1242,7 @@ QDateTime VCardTool::parseDateTime(const QString &str, bool *timeValid)
spec = Qt::OffsetFromUTC;
QTime offsetTime;
const QString offsetString = timeStrings.at(1);
switch(offsetString.size())
{
switch (offsetString.size()) {
case 2:
offsetTime = QTime::fromString(offsetString, QStringLiteral("hh"));
break;
......
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