Commit d160cd58 authored by Laurent Montel's avatar Laurent Montel 😁

Astyle kdelibs

parent 5e723248
...@@ -234,7 +234,6 @@ void AddressTest::formatTest() ...@@ -234,7 +234,6 @@ void AddressTest::formatTest()
} }
} }
void AddressTest::shouldExportVcard3() void AddressTest::shouldExportVcard3()
{ {
KContacts::Address address; KContacts::Address address;
...@@ -353,7 +352,6 @@ void AddressTest::shouldParseAddressVCard4WithGeoPosition() ...@@ -353,7 +352,6 @@ void AddressTest::shouldParseAddressVCard4WithGeoPosition()
QCOMPARE(geo.longitude(), 45.1f); QCOMPARE(geo.longitude(), 45.1f);
} }
void AddressTest::shouldExportVCard4WithGeoPosition() void AddressTest::shouldExportVCard4WithGeoPosition()
{ {
KContacts::Address address; KContacts::Address address;
...@@ -375,7 +373,6 @@ void AddressTest::shouldExportVCard4WithGeoPosition() ...@@ -375,7 +373,6 @@ void AddressTest::shouldExportVCard4WithGeoPosition()
geo.setLongitude(45.1f); geo.setLongitude(45.1f);
address.setGeo(geo); address.setGeo(geo);
KContacts::AddresseeList lst; KContacts::AddresseeList lst;
KContacts::Addressee addr; KContacts::Addressee addr;
addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); addr.setEmails(QStringList() << QStringLiteral("foo@kde.org"));
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <QTest> #include <QTest>
#include "vcardtool.h" #include "vcardtool.h"
ImportExportVCardTest::ImportExportVCardTest(QObject *parent) ImportExportVCardTest::ImportExportVCardTest(QObject *parent)
: QObject(parent) : QObject(parent)
{ {
...@@ -107,7 +106,7 @@ void ImportExportVCardTest::shouldExportFullTestVcard4() ...@@ -107,7 +106,7 @@ void ImportExportVCardTest::shouldExportFullTestVcard4()
const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata);
const QByteArray result = vcard.exportVCards(lst, KContacts::VCard::v4_0); const QByteArray result = vcard.exportVCards(lst, KContacts::VCard::v4_0);
qDebug() << " result "<< result; qDebug() << " result " << result;
QCOMPARE(result, vcardexpected); QCOMPARE(result, vcardexpected);
} }
......
...@@ -156,7 +156,6 @@ void ImppTest::shouldParseImppVcard4() ...@@ -156,7 +156,6 @@ void ImppTest::shouldParseImppVcard4()
QCOMPARE(impp.type(), KContacts::Impp::Skype); QCOMPARE(impp.type(), KContacts::Impp::Skype);
} }
QByteArray createCard(KContacts::Impp::ImppType type) QByteArray createCard(KContacts::Impp::ImppType type)
{ {
QByteArray expected("BEGIN:VCARD\n" QByteArray expected("BEGIN:VCARD\n"
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <qtest.h> #include <qtest.h>
#include "vcardtool.h" #include "vcardtool.h"
QTEST_MAIN(KeyTest) QTEST_MAIN(KeyTest)
void KeyTest::storeTest() void KeyTest::storeTest()
......
...@@ -143,7 +143,6 @@ void RelatedTest::shouldParseRelatedWithArgument() ...@@ -143,7 +143,6 @@ void RelatedTest::shouldParseRelatedWithArgument()
QCOMPARE(related.parameters().count(), 2); QCOMPARE(related.parameters().count(), 2);
} }
void RelatedTest::shouldParseWithoutRelated() void RelatedTest::shouldParseWithoutRelated()
{ {
QByteArray vcarddata("BEGIN:VCARD\n" QByteArray vcarddata("BEGIN:VCARD\n"
......
...@@ -332,7 +332,6 @@ public: ...@@ -332,7 +332,6 @@ public:
*/ */
Geo geo() const; Geo geo() const;
private: private:
class Private; class Private;
QSharedDataPointer<Private> d; QSharedDataPointer<Private> d;
......
...@@ -460,7 +460,6 @@ public: ...@@ -460,7 +460,6 @@ public:
void setExtraTitleList(const Title::List &urltitle); void setExtraTitleList(const Title::List &urltitle);
Title::List extraTitleList() const; Title::List extraTitleList() const;
/** /**
Return title. Return title.
*/ */
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <QtCore/QVector> #include <QtCore/QVector>
#include <QtCore/QMap> #include <QtCore/QMap>
namespace KContacts namespace KContacts
{ {
...@@ -210,7 +209,6 @@ public: ...@@ -210,7 +209,6 @@ public:
void setParameters(const QMap<QString, QStringList> &params); void setParameters(const QMap<QString, QStringList> &params);
QMap<QString, QStringList> parameters() const; QMap<QString, QStringList> parameters() const;
private: private:
class Private; class Private;
QSharedDataPointer<Private> d; QSharedDataPointer<Private> d;
......
...@@ -116,13 +116,13 @@ VCard::List VCardParser::parseVCards(const QByteArray &text) ...@@ -116,13 +116,13 @@ VCard::List VCardParser::parseVCards(const QByteArray &text)
QByteArray key; QByteArray key;
QList<QByteArray> params; QList<QByteArray> params;
const int currentLineLength(currentLine.length()); const int currentLineLength(currentLine.length());
for(int i = 0; i < currentLineLength; ++i) { for (int i = 0; i < currentLineLength; ++i) {
char character = currentLine.at(i); char character = currentLine.at(i);
if (keyFound) { if (keyFound) {
QList<QByteArray> tmpParams = currentLine.right(currentLineLength-i).split(';'); QList<QByteArray> tmpParams = currentLine.right(currentLineLength - i).split(';');
QByteArray tmpParameter; QByteArray tmpParameter;
bool valueAdded = false; bool valueAdded = false;
Q_FOREACH(const QByteArray &parameter, tmpParams) { Q_FOREACH (const QByteArray &parameter, tmpParams) {
if (parameter.contains('=')) { if (parameter.contains('=')) {
if (tmpParameter.isEmpty()) { if (tmpParameter.isEmpty()) {
tmpParameter = parameter; tmpParameter = parameter;
......
...@@ -164,7 +164,6 @@ QByteArray VCardTool::createVCards(const Addressee::List &list, ...@@ -164,7 +164,6 @@ QByteArray VCardTool::createVCards(const Addressee::List &list,
adrLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); adrLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE"));
} }
const bool hasLabel = !(*it).label().isEmpty(); const bool hasLabel = !(*it).label().isEmpty();
QMap<QString, Address::TypeFlag>::ConstIterator typeIt; QMap<QString, Address::TypeFlag>::ConstIterator typeIt;
QStringList addreLineType; QStringList addreLineType;
...@@ -749,7 +748,7 @@ Addressee::List VCardTool::parseVCards(const QByteArray &vcard) const ...@@ -749,7 +748,7 @@ Addressee::List VCardTool::parseVCards(const QByteArray &vcard) const
if (!label.isEmpty()) { if (!label.isEmpty()) {
if (label.length() > 1) { if (label.length() > 1) {
if (label.at(0) == QLatin1Char('"') && label.at(label.length() - 1) == QLatin1Char('"')) { if (label.at(0) == QLatin1Char('"') && label.at(label.length() - 1) == QLatin1Char('"')) {
label = label.mid(1, label.length() - 2 ); label = label.mid(1, label.length() - 2);
} }
} }
address.setLabel(label); address.setLabel(label);
...@@ -1494,7 +1493,6 @@ QStringList VCardTool::splitString(QChar sep, const QString &str) const ...@@ -1494,7 +1493,6 @@ QStringList VCardTool::splitString(QChar sep, const QString &str) const
return list; return list;
} }
void VCardTool::imppService(const QString &serviceType, KContacts::Impp &impp) const void VCardTool::imppService(const QString &serviceType, KContacts::Impp &impp) const
{ {
if (serviceType == QLatin1String("facebook")) { if (serviceType == QLatin1String("facebook")) {
......
Markdown is supported
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