diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -set(PIM_VERSION "5.11.43") +set(PIM_VERSION "5.11.44") project(KContacts VERSION ${PIM_VERSION}) diff --git a/autotests/relatedtest.cpp b/autotests/relatedtest.cpp --- a/autotests/relatedtest.cpp +++ b/autotests/relatedtest.cpp @@ -114,8 +114,8 @@ KContacts::VCardTool vcard; const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); QCOMPARE(lst.count(), 1); - QCOMPARE(lst.at(0).relationShips().count(), 1); - const KContacts::Related related = lst.at(0).relationShips().at(0); + QCOMPARE(lst.at(0).relationships().count(), 1); + const KContacts::Related related = lst.at(0).relationships().at(0); QCOMPARE(related.related(), QStringLiteral("friend")); } @@ -133,8 +133,8 @@ KContacts::VCardTool vcard; const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); QCOMPARE(lst.count(), 1); - QCOMPARE(lst.at(0).relationShips().count(), 1); - const KContacts::Related related = lst.at(0).relationShips().at(0); + QCOMPARE(lst.at(0).relationships().count(), 1); + const KContacts::Related related = lst.at(0).relationships().at(0); QCOMPARE(related.related(), QStringLiteral("friend")); QCOMPARE(related.parameters().count(), 2); } @@ -152,7 +152,7 @@ KContacts::VCardTool vcard; const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); QCOMPARE(lst.count(), 1); - QCOMPARE(lst.at(0).relationShips().count(), 0); + QCOMPARE(lst.at(0).relationships().count(), 0); } void RelatedTest::shouldCreateVCard4() @@ -164,7 +164,7 @@ KContacts::Related::List lstRelated; KContacts::Related related(QStringLiteral("friend")); lstRelated << related; - addr.setRelationShips(lstRelated); + addr.setRelationships(lstRelated); lst << addr; KContacts::VCardTool vcard; const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); @@ -189,7 +189,7 @@ KContacts::Related related(QStringLiteral("friend")); KContacts::Related related2(QStringLiteral("kde")); lstRelated << related << related2; - addr.setRelationShips(lstRelated); + addr.setRelationships(lstRelated); lst << addr; KContacts::VCardTool vcard; const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); @@ -218,7 +218,7 @@ params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); related.setParameters(params); lstRelated << related; - addr.setRelationShips(lstRelated); + addr.setRelationships(lstRelated); lst << addr; KContacts::VCardTool vcard; const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); @@ -245,7 +245,7 @@ params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); related.setParameters(params); lstRelated << related; - addr.setRelationShips(lstRelated); + addr.setRelationships(lstRelated); lst << addr; KContacts::VCardTool vcard; const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); diff --git a/src/addressee.h b/src/addressee.h --- a/src/addressee.h +++ b/src/addressee.h @@ -1087,9 +1087,9 @@ QStringList members() const; //Relation - void insertRelationShip(const Related &related); - void setRelationShips(const Related::List &c); - Related::List relationShips() const; + void insertRelationship(const Related &related); + void setRelationships(const Related::List &c); + Related::List relationships() const; //Source void insertSourceUrl(const QUrl &url); diff --git a/src/addressee.cpp b/src/addressee.cpp --- a/src/addressee.cpp +++ b/src/addressee.cpp @@ -93,7 +93,7 @@ mLogoExtraList = other.mLogoExtraList; mUrlExtraList = other.mUrlExtraList; mMembers = other.mMembers; - mRelationShips = other.mRelationShips; + mRelationships = other.mRelationships; mSources = other.mSources; mEmpty = other.mEmpty; mImpps = other.mImpps; @@ -146,7 +146,7 @@ ResourceLocatorUrl::List mUrlExtraList; QVector mSources; QStringList mMembers; - Related::List mRelationShips; + Related::List mRelationships; FieldGroup::List mFieldGroupList; Title::List mTitleExtraList; Role::List mRoleExtraList; @@ -363,8 +363,8 @@ qCDebug(KCONTACTS_LOG) << "Extra url differs"; return false; } - if (!listEquals(d->mRelationShips, addressee.d->mRelationShips)) { - qCDebug(KCONTACTS_LOG) << "RelationShips differs"; + if (!listEquals(d->mRelationships, addressee.d->mRelationships)) { + qCDebug(KCONTACTS_LOG) << "Relationships differs"; return false; } if (!listEquals(d->mSources, addressee.d->mSources)) { @@ -2126,26 +2126,26 @@ return d->mMembers; } -void Addressee::insertRelationShip(const Related &relation) +void Addressee::insertRelationship(const Related &relation) { d->mEmpty = false; - if (d->mRelationShips.contains(relation)) { + if (d->mRelationships.contains(relation)) { return; } - d->mRelationShips.append(relation); + d->mRelationships.append(relation); } -void Addressee::setRelationShips(const Related::List &c) +void Addressee::setRelationships(const Related::List &c) { d->mEmpty = false; - d->mRelationShips = c; + d->mRelationships = c; } -Related::List Addressee::relationShips() const +Related::List Addressee::relationships() const { - return d->mRelationShips; + return d->mRelationships; } static const auto VENDOR_ID = QStringLiteral("KADDRESSBOOK"); @@ -2546,7 +2546,7 @@ s << a.d->mLogoExtraList; s << a.d->mUrlExtraList; s << a.d->mMembers; - s << a.d->mRelationShips; + s << a.d->mRelationships; s << a.d->mSources; s << a.d->mImpps; s << a.d->mFieldGroupList; @@ -2601,7 +2601,7 @@ s >> a.d->mLogoExtraList; s >> a.d->mUrlExtraList; s >> a.d->mMembers; - s >> a.d->mRelationShips; + s >> a.d->mRelationships; s >> a.d->mSources; s >> a.d->mImpps; s >> a.d->mFieldGroupList; diff --git a/src/vcardtool.cpp b/src/vcardtool.cpp --- a/src/vcardtool.cpp +++ b/src/vcardtool.cpp @@ -293,7 +293,7 @@ card.addLine(line); } - const Related::List relatedList = (*addrIt).relationShips(); + const Related::List relatedList = (*addrIt).relationships(); Related::List::ConstIterator relatedIt; Related::List::ConstIterator relatedEnd(relatedList.end()); for (relatedIt = relatedList.begin(); relatedIt != relatedEnd; ++relatedIt) { @@ -1145,7 +1145,7 @@ Related related; related.setRelated((*lineIt).value().toString()); related.setParameters((*lineIt).parameterMap()); - addr.insertRelationShip(related); + addr.insertRelationship(related); } // CLIENTPIDMAP (vcard 4.0) else if (identifier == QLatin1String("clientpidmap")) {