Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libkgapi6 for openSUSE:Factory checked in at 2026-05-11 16:50:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libkgapi6 (Old) and /work/SRC/openSUSE:Factory/.libkgapi6.new.1966 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkgapi6" Mon May 11 16:50:08 2026 rev:28 rq:1351750 version:26.04.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libkgapi6/libkgapi6.changes 2026-04-17 21:49:44.886240276 +0200 +++ /work/SRC/openSUSE:Factory/.libkgapi6.new.1966/libkgapi6.changes 2026-05-11 16:51:28.554250472 +0200 @@ -1,0 +2,15 @@ +Thu May 7 08:03:25 UTC 2026 - Christophe Marin <[email protected]> + +- Update to 26.04.1 + * New bugfix release + * For more details please see: + * https://kde.org/announcements/gear/26.04.1/ +- Changes since 26.04.0: + * Fix qstring comparisons + * Add conversion test + * Fix conversions for addresses + * Improve addressee edit details handling + * Add method to set person from kcontacts addressee + * Fix wrong data insert that breaks recurrent event exceptions + +------------------------------------------------------------------- Old: ---- libkgapi-26.04.0.tar.xz libkgapi-26.04.0.tar.xz.sig New: ---- libkgapi-26.04.1.tar.xz libkgapi-26.04.1.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libkgapi6.spec ++++++ --- /var/tmp/diff_new_pack.gPMRNk/_old 2026-05-11 16:51:30.450328485 +0200 +++ /var/tmp/diff_new_pack.gPMRNk/_new 2026-05-11 16:51:30.466329143 +0200 @@ -22,7 +22,7 @@ %define rname libkgapi %bcond_without released Name: libkgapi6 -Version: 26.04.0 +Version: 26.04.1 Release: 0 Summary: Extension for accessing Google data License: GPL-2.0-or-later AND LGPL-2.1-or-later ++++++ libkgapi-26.04.0.tar.xz -> libkgapi-26.04.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/CMakeLists.txt new/libkgapi-26.04.1/CMakeLists.txt --- old/libkgapi-26.04.0/CMakeLists.txt 2026-04-08 05:47:05.000000000 +0200 +++ new/libkgapi-26.04.1/CMakeLists.txt 2026-04-29 12:08:35.000000000 +0200 @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.27) -set(PIM_VERSION "6.7.0") +set(PIM_VERSION "6.7.1") set(KGAPI_LIB_VERSION ${PIM_VERSION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/autotests/CMakeLists.txt new/libkgapi-26.04.1/autotests/CMakeLists.txt --- old/libkgapi-26.04.0/autotests/CMakeLists.txt 2026-04-08 05:47:05.000000000 +0200 +++ new/libkgapi-26.04.1/autotests/CMakeLists.txt 2026-04-29 12:08:35.000000000 +0200 @@ -113,3 +113,4 @@ add_libkgapi2_test(people personmodifyjobtest) add_libkgapi2_test(people personphotoupdatejobtest) add_libkgapi2_test(people personphotodeletejobtest) +add_libkgapi2_test(people kcontactsconversiontest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/autotests/people/kcontactsconversiontest.cpp new/libkgapi-26.04.1/autotests/people/kcontactsconversiontest.cpp --- old/libkgapi-26.04.0/autotests/people/kcontactsconversiontest.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/libkgapi-26.04.1/autotests/people/kcontactsconversiontest.cpp 2026-04-29 12:08:35.000000000 +0200 @@ -0,0 +1,113 @@ +/* + * SPDX-FileCopyrightText: 2023 Claudio Cambra <[email protected]> + * + * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL + */ + +#include <QObject> +#include <QTest> + +#include "people/person.h" +#include "people/emailaddress.h" +#include "people/phonenumber.h" +#include "people/address.h" +#include "people/name.h" + +#include <KContacts/Addressee> +#include <KContacts/Email> +#include <KContacts/PhoneNumber> +#include <KContacts/Address> + +namespace KGAPI2::People { + +class KContactsConversionTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void testEmailConversion() + { + EmailAddress email; + email.setValue(QStringLiteral("[email protected]")); + email.setType(QStringLiteral("home")); + + KContacts::Email kemail = email.toKContactsEmail(); + QCOMPARE(kemail.mail(), QStringLiteral("[email protected]")); + QCOMPARE(kemail.type(), KContacts::Email::Home); + + email.setType(QStringLiteral("work")); + kemail = email.toKContactsEmail(); + QCOMPARE(kemail.type(), KContacts::Email::Work); + + email.setType(QStringLiteral("other")); + kemail = email.toKContactsEmail(); + QCOMPARE(kemail.type(), KContacts::Email::Other); + } + + void testPhoneConversion() + { + PhoneNumber phone; + phone.setValue(QStringLiteral("123456789")); + phone.setType(QStringLiteral("home")); + + KContacts::PhoneNumber kphone = phone.toKContactsPhoneNumber(); + QCOMPARE(kphone.number(), QStringLiteral("123456789")); + QCOMPARE(kphone.type(), KContacts::PhoneNumber::Home); + + phone.setType(QStringLiteral("work")); + kphone = phone.toKContactsPhoneNumber(); + QCOMPARE(kphone.type(), KContacts::PhoneNumber::Work); + + phone.setType(QStringLiteral("mobile")); + kphone = phone.toKContactsPhoneNumber(); + QCOMPARE(kphone.type(), KContacts::PhoneNumber::Cell); + } + + void testAddressConversion() + { + Address addr; + addr.setCity(QStringLiteral("City")); + addr.setCountry(QStringLiteral("Country")); + addr.setStreetAddress(QStringLiteral("Street 123")); + addr.setPostalCode(QStringLiteral("12345")); + addr.setType(QStringLiteral("home")); + + KContacts::Address kaddr = addr.toKContactsAddress(); + QCOMPARE(kaddr.locality(), QStringLiteral("City")); + QCOMPARE(kaddr.country(), QStringLiteral("Country")); + QCOMPARE(kaddr.street(), QStringLiteral("Street 123")); + QCOMPARE(kaddr.postalCode(), QStringLiteral("12345")); + QVERIFY(kaddr.type() & KContacts::Address::Home); + + KContacts::Address kaddr2; + kaddr2.setLocality(QStringLiteral("OtherCity")); + kaddr2.setType(KContacts::Address::Work); + + Address addr2 = Address::fromKContactsAddress(kaddr2); + QCOMPARE(addr2.city(), QStringLiteral("OtherCity")); + QCOMPARE(addr2.type(), QStringLiteral("work")); + } + + void testPersonConversionDeletions() + { + PersonPtr person = PersonPtr::create(); + + EmailAddress email; + email.setValue(QStringLiteral("[email protected]")); + person->setEmailAddresses({email}); + + QCOMPARE(person->emailAddresses().count(), 1); + + KContacts::Addressee addressee; + // No emails in addressee + + person->setFromKContactsAddressee(addressee); + QCOMPARE(person->emailAddresses().count(), 0); // Should be cleared now + } +}; + +} + +QTEST_GUILESS_MAIN(KGAPI2::People::KContactsConversionTest) + +#include "kcontactsconversiontest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/src/calendar/calendarservice.cpp new/libkgapi-26.04.1/src/calendar/calendarservice.cpp --- old/libkgapi-26.04.0/src/calendar/calendarservice.cpp 2026-04-08 05:47:05.000000000 +0200 +++ new/libkgapi-26.04.1/src/calendar/calendarservice.cpp 2026-04-29 12:08:35.000000000 +0200 @@ -709,8 +709,7 @@ data.insert(eventEndParam, serializeDt(event, event->dtEnd(), dtFlags | SerializeDtFlag::IsDtEnd)); if (event->hasRecurrenceId()) { - data.insert(eventOrganizerParam, serializeDt(event, event->recurrenceId(), dtFlags)); - data.insert(eventRecurringEventIdParam, event->id()); + data.insert(eventOriginalStartTimeParam, serializeDt(event, event->recurrenceId(), dtFlags)); } if (event->transparency() == Event::Transparent) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/src/people/address.cpp new/libkgapi-26.04.1/src/people/address.cpp --- old/libkgapi-26.04.0/src/people/address.cpp 2026-04-08 05:47:05.000000000 +0200 +++ new/libkgapi-26.04.1/src/people/address.cpp 2026-04-29 12:08:35.000000000 +0200 @@ -234,4 +234,56 @@ return obj; } +Address Address::fromKContactsAddress(const KContacts::Address &address) +{ + Address convertedAddress; + convertedAddress.setCity(address.locality()); + convertedAddress.setCountry(address.country()); + convertedAddress.setExtendedAddress(address.extended()); + convertedAddress.setPoBox(address.postOfficeBox()); + convertedAddress.setPostalCode(address.postalCode()); + convertedAddress.setRegion(address.region()); + convertedAddress.setStreetAddress(address.street()); + + if (address.type() & KContacts::Address::Home) { + convertedAddress.setType(QStringLiteral("home")); + } else if (address.type() & KContacts::Address::Work) { + convertedAddress.setType(QStringLiteral("work")); + } else { + convertedAddress.setType(QStringLiteral("other")); + } + + return convertedAddress; +} + +QList<Address> Address::fromKContactsAddressList(const QList<KContacts::Address> &addressList) +{ + QList<Address> convertedAddresses; + std::transform(addressList.cbegin(), addressList.cend(), std::back_inserter(convertedAddresses), [](const KContacts::Address &address) { + return Address::fromKContactsAddress(address); + }); + return convertedAddresses; +} + +KContacts::Address Address::toKContactsAddress() const +{ + KContacts::Address convertedAddress; + convertedAddress.setLocality(city()); + convertedAddress.setCountry(country()); + convertedAddress.setExtended(extendedAddress()); + convertedAddress.setPostOfficeBox(poBox()); + convertedAddress.setPostalCode(postalCode()); + convertedAddress.setRegion(region()); + convertedAddress.setStreet(streetAddress()); + + const auto addressType = type(); + if (addressType.compare(QStringLiteral("home"), Qt::CaseInsensitive) == 0) { + convertedAddress.setType(KContacts::Address::Home); + } else if (addressType.compare(QStringLiteral("work"), Qt::CaseInsensitive) == 0) { + convertedAddress.setType(KContacts::Address::Work); + } + + return convertedAddress; +} + } // namespace KGAPI2::People diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/src/people/address.h new/libkgapi-26.04.1/src/people/address.h --- old/libkgapi-26.04.0/src/people/address.h 2026-04-08 05:47:05.000000000 +0200 +++ new/libkgapi-26.04.1/src/people/address.h 2026-04-29 12:08:35.000000000 +0200 @@ -18,6 +18,8 @@ #include <optional> +#include <KContacts/Address> + class QJsonValue; namespace KGAPI2::People @@ -43,6 +45,10 @@ /** Destructor. **/ ~Address(); + static Address fromKContactsAddress(const KContacts::Address &address); + static QList<Address> fromKContactsAddressList(const KContacts::Address::List &addressList); + [[nodiscard]] KContacts::Address toKContactsAddress() const; + bool operator==(const Address &) const; bool operator!=(const Address &) const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/src/people/emailaddress.cpp new/libkgapi-26.04.1/src/people/emailaddress.cpp --- old/libkgapi-26.04.0/src/people/emailaddress.cpp 2026-04-08 05:47:05.000000000 +0200 +++ new/libkgapi-26.04.1/src/people/emailaddress.cpp 2026-04-29 12:08:35.000000000 +0200 @@ -163,11 +163,11 @@ const auto emailType = type(); - if(QString::compare(emailType, QStringLiteral("home"), Qt::CaseInsensitive)) { + if (emailType.compare(QStringLiteral("home"), Qt::CaseInsensitive) == 0) { convertedEmail.setType(KContacts::Email::Home); - } else if(QString::compare(emailType, QStringLiteral("work"), Qt::CaseInsensitive)) { + } else if (emailType.compare(QStringLiteral("work"), Qt::CaseInsensitive) == 0) { convertedEmail.setType(KContacts::Email::Work); - } else if(QString::compare(emailType, QStringLiteral("other"), Qt::CaseInsensitive)) { + } else if (emailType.compare(QStringLiteral("other"), Qt::CaseInsensitive) == 0) { convertedEmail.setType(KContacts::Email::Other); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/src/people/person.cpp new/libkgapi-26.04.1/src/people/person.cpp --- old/libkgapi-26.04.0/src/people/person.cpp 2026-04-08 05:47:05.000000000 +0200 +++ new/libkgapi-26.04.1/src/people/person.cpp 2026-04-29 12:08:35.000000000 +0200 @@ -125,46 +125,48 @@ setKContactAddresseeOrganizationFields(addressee); setKContactAddresseeProfessionFields(addressee); setKContactAddresseePhoto(addressee); + setKContactAddresseeAddressFields(addressee); return addressee; } void setFromKContactsAddressee(const KContacts::Addressee &addressee) { - if (!addressee.familyName().isEmpty() || - !addressee.givenName().isEmpty() || - !addressee.prefix().isEmpty() || - !addressee.suffix().isEmpty()) { - + if (addressee.familyName().isEmpty() && + addressee.givenName().isEmpty() && + addressee.prefix().isEmpty() && + addressee.suffix().isEmpty()) { + names.clear(); + } else { names = {Name::fromKContactsAddressee(addressee)}; } const auto addresseeNickName = addressee.nickName(); - if (!addresseeNickName.isEmpty()) { + if (addresseeNickName.isEmpty()) { + nicknames.clear(); + } else { Nickname nickname; nickname.setValue(addresseeNickName); nicknames = {nickname}; } const auto addresseeBirthday = addressee.birthday(); - if (addresseeBirthday.isValid()) { + if (!addresseeBirthday.isValid()) { + birthdays.clear(); + } else { Birthday birthday; birthday.setDate(addresseeBirthday.date()); birthdays = {birthday}; } - const auto addresseeEmailList = addressee.emailList(); - if (!addresseeEmailList.isEmpty()) { - emailAddresses = EmailAddress::fromKContactsEmailList(addresseeEmailList); - } - - const auto addresseePhoneNumbers = addressee.phoneNumbers(); - if (!addresseePhoneNumbers.isEmpty()) { - phoneNumbers = PhoneNumber::fromKContactsPhoneNumberList(addressee.phoneNumbers()); - } + emailAddresses = EmailAddress::fromKContactsEmailList(addressee.emailList()); + phoneNumbers = PhoneNumber::fromKContactsPhoneNumberList(addressee.phoneNumbers()); + addresses = Address::fromKContactsAddressList(addressee.addresses()); const auto addresseeProfession = addressee.profession(); - if (!addresseeProfession.isEmpty()) { + if (addresseeProfession.isEmpty()) { + occupations.clear(); + } else { Occupation occupation; occupation.setValue(addresseeProfession); occupations = {occupation}; @@ -172,7 +174,9 @@ const auto addresseeOrganization = addressee.organization(); const auto addresseeDepartment = addressee.department(); - if (!addresseeOrganization.isEmpty() || !addresseeDepartment.isEmpty()) { + if (addresseeOrganization.isEmpty() && addresseeDepartment.isEmpty()) { + organizations.clear(); + } else { Organization organization; organization.setName(addresseeOrganization); organization.setDepartment(addresseeDepartment); @@ -180,12 +184,15 @@ } const auto addresseePhoto = addressee.photo(); - if (!addresseePhoto.isEmpty()) { + if (addresseePhoto.isEmpty()) { + photos.clear(); + } else { Photo photo; photo.setUrl(addressee.photo().url()); photos = {photo}; } + urls.clear(); const auto blogFeed = addressee.blogFeed(); if (!blogFeed.isEmpty()) { Url url; @@ -225,6 +232,7 @@ urls.append(url); } + calendarUrls.clear(); const auto addressessCalendarUrls = addressee.calendarUrlList(); for (const auto &calendarUrl : addressessCalendarUrls) { CalendarUrl gCalendarUrl; @@ -378,6 +386,17 @@ addressee.setPhoto(picture); } + void setKContactAddresseeAddressFields(KContacts::Addressee &addressee) + { + KContacts::Address::List convertedAddresses; + + std::transform(addresses.cbegin(), addresses.cend(), std::back_inserter(convertedAddresses), [](const Address &address) { + return address.toKContactsAddress(); + }); + + addressee.setAddresses(convertedAddresses); + } + void setKContactAddresseeUrlFields(KContacts::Addressee &addressee) { if (urls.isEmpty()) { @@ -1567,6 +1586,11 @@ return PersonPtr(person); } +void Person::setFromKContactsAddressee(const KContacts::Addressee &addressee) +{ + d->setFromKContactsAddressee(addressee); +} + bool Person::operator==(const Person &other) const { if (!Object::operator==(other)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/src/people/person.h new/libkgapi-26.04.1/src/people/person.h --- old/libkgapi-26.04.0/src/people/person.h 2026-04-08 05:47:05.000000000 +0200 +++ new/libkgapi-26.04.1/src/people/person.h 2026-04-29 12:08:35.000000000 +0200 @@ -94,6 +94,7 @@ ~Person(); static PersonPtr fromKContactsAddressee(const KContacts::Addressee &addressee); + void setFromKContactsAddressee(const KContacts::Addressee &addressee); KContacts::Addressee toKContactsAddressee() const; bool operator==(const Person &) const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-26.04.0/src/people/phonenumber.cpp new/libkgapi-26.04.1/src/people/phonenumber.cpp --- old/libkgapi-26.04.0/src/people/phonenumber.cpp 2026-04-08 05:47:05.000000000 +0200 +++ new/libkgapi-26.04.1/src/people/phonenumber.cpp 2026-04-29 12:08:35.000000000 +0200 @@ -199,23 +199,24 @@ KContacts::PhoneNumber convertedPhoneNumber; convertedPhoneNumber.setNumber(value()); - if(QString::compare(type(), QStringLiteral("home"), Qt::CaseInsensitive)) { + const auto phoneType = type(); + if (phoneType.compare(QStringLiteral("home"), Qt::CaseInsensitive) == 0) { convertedPhoneNumber.setType(KContacts::PhoneNumber::Home); - } else if(QString::compare(type(), QStringLiteral("work"), Qt::CaseInsensitive) || - QString::compare(type(), QStringLiteral("workMobile"), Qt::CaseInsensitive) || - QString::compare(type(), QStringLiteral("workPager"), Qt::CaseInsensitive)) { + } else if (phoneType.compare(QStringLiteral("work"), Qt::CaseInsensitive) == 0 || + phoneType.compare(QStringLiteral("workMobile"), Qt::CaseInsensitive) == 0 || + phoneType.compare(QStringLiteral("workPager"), Qt::CaseInsensitive) == 0) { convertedPhoneNumber.setType(KContacts::PhoneNumber::Work); - } else if(QString::compare(type(), QStringLiteral("mobile"), Qt::CaseInsensitive)) { + } else if (phoneType.compare(QStringLiteral("mobile"), Qt::CaseInsensitive) == 0) { convertedPhoneNumber.setType(KContacts::PhoneNumber::Cell); - } else if(QString::compare(type(), QStringLiteral("homeFax"), Qt::CaseInsensitive) || - QString::compare(type(), QStringLiteral("workFax"), Qt::CaseInsensitive) || - QString::compare(type(), QStringLiteral("otherFax"), Qt::CaseInsensitive)) { + } else if (phoneType.compare(QStringLiteral("homeFax"), Qt::CaseInsensitive) == 0 || + phoneType.compare(QStringLiteral("workFax"), Qt::CaseInsensitive) == 0 || + phoneType.compare(QStringLiteral("otherFax"), Qt::CaseInsensitive) == 0) { convertedPhoneNumber.setType(KContacts::PhoneNumber::Fax); - } else if(QString::compare(type(), QStringLiteral("pager"), Qt::CaseInsensitive)) { + } else if (phoneType.compare(QStringLiteral("pager"), Qt::CaseInsensitive) == 0) { convertedPhoneNumber.setType(KContacts::PhoneNumber::Pager); - } else if(QString::compare(type(), QStringLiteral("main"), Qt::CaseInsensitive)) { + } else if (phoneType.compare(QStringLiteral("main"), Qt::CaseInsensitive) == 0) { convertedPhoneNumber.setType(KContacts::PhoneNumber::Pref); - } else if(QString::compare(type(), QStringLiteral("googleVoice"), Qt::CaseInsensitive)) { + } else if (phoneType.compare(QStringLiteral("googleVoice"), Qt::CaseInsensitive) == 0) { convertedPhoneNumber.setType(KContacts::PhoneNumber::Voice); }
