Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libkgapi for openSUSE:Factory checked in at 2023-05-12 20:33:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libkgapi (Old) and /work/SRC/openSUSE:Factory/.libkgapi.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkgapi" Fri May 12 20:33:59 2023 rev:97 rq:1086436 version:23.04.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libkgapi/libkgapi.changes 2023-04-23 22:47:07.862598725 +0200 +++ /work/SRC/openSUSE:Factory/.libkgapi.new.1533/libkgapi.changes 2023-05-12 20:34:47.797046146 +0200 @@ -1,0 +2,11 @@ +Tue May 9 10:47:44 UTC 2023 - Christophe Marin <christo...@krop.fr> + +- Update to 23.04.1 + * New bugfix release + * For more details please see: + * https://kde.org/announcements/gear/23.04.1/ +- Changes since 23.04.0: + * Convert urls and calendarurls from KContacts to KGAPI + * Fix syncing name + +------------------------------------------------------------------- Old: ---- libkgapi-23.04.0.tar.xz libkgapi-23.04.0.tar.xz.sig New: ---- libkgapi-23.04.1.tar.xz libkgapi-23.04.1.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libkgapi.spec ++++++ --- /var/tmp/diff_new_pack.OKCR09/_old 2023-05-12 20:34:48.329049070 +0200 +++ /var/tmp/diff_new_pack.OKCR09/_new 2023-05-12 20:34:48.333049092 +0200 @@ -18,7 +18,7 @@ %bcond_without released Name: libkgapi -Version: 23.04.0 +Version: 23.04.1 Release: 0 Summary: Extension for accessing Google data License: GPL-2.0-or-later AND LGPL-2.1-or-later ++++++ libkgapi-23.04.0.tar.xz -> libkgapi-23.04.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-23.04.0/CMakeLists.txt new/libkgapi-23.04.1/CMakeLists.txt --- old/libkgapi-23.04.0/CMakeLists.txt 2023-04-11 06:38:40.000000000 +0200 +++ new/libkgapi-23.04.1/CMakeLists.txt 2023-05-06 09:26:43.000000000 +0200 @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) -set(PIM_VERSION "5.23.0") +set(PIM_VERSION "5.23.1") set(KGAPI_LIB_VERSION ${PIM_VERSION}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-23.04.0/poqm/de/libkgapi_qt.po new/libkgapi-23.04.1/poqm/de/libkgapi_qt.po --- old/libkgapi-23.04.0/poqm/de/libkgapi_qt.po 2023-04-11 06:38:40.000000000 +0200 +++ new/libkgapi-23.04.1/poqm/de/libkgapi_qt.po 2023-05-06 09:26:43.000000000 +0200 @@ -13,7 +13,7 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 22.12.3\n" "X-Qt-Contexts: true\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-23.04.0/poqm/gl/libkgapi_qt.po new/libkgapi-23.04.1/poqm/gl/libkgapi_qt.po --- old/libkgapi-23.04.0/poqm/gl/libkgapi_qt.po 2023-04-11 06:38:40.000000000 +0200 +++ new/libkgapi-23.04.1/poqm/gl/libkgapi_qt.po 2023-05-06 09:26:43.000000000 +0200 @@ -1,16 +1,16 @@ # Copyright (C) YEAR This_file_is_part_of_KDE # This file is distributed under the same license as the PACKAGE package. -# # Xosé <xoseca...@gmail.com>, 2012. # Marce Villarino <mvillar...@kde-espana.es>, 2012, 2014. # Adrián Chaves Fernández (Gallaecio) <adriyeticha...@gmail.com>, 2015. -# Adrián Chaves (Gallaecio) <adr...@chaves.io>, 2017, 2018, 2019. +# Adrián Chaves (Gallaecio) <adr...@chaves.io>, 2017, 2018, 2019, 2023. +# msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-08-23 01:46+0000\n" -"PO-Revision-Date: 2019-08-11 17:02+0200\n" +"PO-Revision-Date: 2023-04-30 15:00+0200\n" "Last-Translator: Adrián Chaves (Gallaecio) <adr...@chaves.io>\n" "Language-Team: Galician <proxe...@trasno.gal>\n" "Language: gl\n" @@ -18,7 +18,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Lokalize 19.04.1\n" +"X-Generator: Lokalize 23.04.0\n" "X-Qt-Contexts: true\n" #: src/blogger/blogfetchjob.cpp:82 @@ -242,62 +242,42 @@ "Google respondeu «%1»" #: src/core/private/fullauthenticationjob.cpp:54 -#, fuzzy, qt-format -#| msgctxt "KGAPI2::AuthWidgetPrivate|" -#| msgid "Error receiving response: %1" +#, qt-format msgctxt "KGAPI2::FullAuthenticationJob|" msgid "Error receiving response: %1" msgstr "Erro ao recibir a resposta: %1" #: src/core/private/fullauthenticationjob.cpp:61 -#, fuzzy -#| msgctxt "KGAPI2::AuthJob|" -#| msgid "Authentication canceled" msgctxt "KGAPI2::FullAuthenticationJob|" msgid "Authentication successful" -msgstr "Cancelouse a autenticación" +msgstr "A autenticación é correcta" #: src/core/private/fullauthenticationjob.cpp:62 msgctxt "KGAPI2::FullAuthenticationJob|" msgid "You can close this tab and return to the application now." -msgstr "" +msgstr "Xa pode pechar este separador e volver á aplicación." #: src/core/private/fullauthenticationjob.cpp:77 -#, fuzzy -#| msgctxt "KGAPI2::AuthWidgetPrivate|" -#| msgid "Token response invalid" msgctxt "KGAPI2::FullAuthenticationJob|" msgid "Token response invalid" msgstr "A resposta de código é incorrecta." #: src/core/private/fullauthenticationjob.cpp:92 -#, fuzzy -#| msgctxt "KGAPI2::AuthWidgetPrivate|" -#| msgid "Could not extract token from HTTP answer" msgctxt "KGAPI2::FullAuthenticationJob|" msgid "Could not extract token from HTTP answer" msgstr "Non se puido extraer o código da resposta HTTP." #: src/core/private/fullauthenticationjob.cpp:185 -#, fuzzy -#| msgctxt "KGAPI2::AuthWidget|" -#| msgid "Invalid account" msgctxt "KGAPI2::FullAuthenticationJob|" msgid "Invalid account" msgstr "Conta incorrecta" #: src/core/private/fullauthenticationjob.cpp:189 -#, fuzzy -#| msgctxt "KGAPI2::AuthWidget|" -#| msgid "No scopes to authenticate for" msgctxt "KGAPI2::FullAuthenticationJob|" msgid "No scopes to authenticate for" msgstr "Non hai ámbitos nos que autenticarse" #: src/core/private/fullauthenticationjob.cpp:202 -#, fuzzy -#| msgctxt "KGAPI2::AuthWidget|" -#| msgid "Could not start oauth http server" msgctxt "KGAPI2::FullAuthenticationJob|" msgid "Could not start OAuth HTTP server" msgstr "Non se puido iniciar o servidor HTTP de OAuth." @@ -308,9 +288,6 @@ msgstr "Non se puido analizar a resposta do servidor." #: src/core/private/refreshtokensjob.cpp:92 -#, fuzzy -#| msgctxt "KGAPI2::AuthJob|" -#| msgid "Failed to parse newly fetched tokens" msgctxt "KGAPI2::RefreshTokensJob|" msgid "Failed to parse newly fetched tokens" msgstr "Non se puideron analizar os elementos obtidos recentemente" @@ -368,17 +345,17 @@ #: src/drive/fileabstractresumablejob.cpp:313 msgctxt "KGAPI2::Drive::FileAbstractResumableJob|" msgid "Failed opening upload session" -msgstr "" +msgstr "Non se puido abrir a sesión de envÃo" #: src/drive/fileabstractresumablejob.cpp:342 msgctxt "KGAPI2::Drive::FileAbstractResumableJob|" msgid "Failed uploading chunk" -msgstr "" +msgstr "Non se puido enviar o anaco" #: src/drive/fileabstractresumablejob.cpp:363 msgctxt "KGAPI2::Drive::FileAbstractResumableJob|" msgid "Failed completing upload session" -msgstr "" +msgstr "Non se puido completar a sesión de envÃo" #: src/drive/fileabstractuploadjob.cpp:282 msgctxt "KGAPI2::Drive::FileAbstractUploadJob|" @@ -461,49 +438,31 @@ msgstr "Tipo de contido da resposta incorrecto" #: src/people/contactgroupcreatejob.cpp:93 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::ContactGroupCreateJob|" msgid "Invalid response content type" msgstr "Tipo de contido da resposta incorrecto" #: src/people/contactgroupmodifyjob.cpp:91 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::ContactGroupModifyJob|" msgid "Invalid response content type" msgstr "Tipo de contido da resposta incorrecto" #: src/people/personcreatejob.cpp:89 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonCreateJob|" msgid "Invalid response content type" msgstr "Tipo de contido da resposta incorrecto" #: src/people/personmodifyjob.cpp:104 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonModifyJob|" msgid "Invalid response content type" msgstr "Tipo de contido da resposta incorrecto" #: src/people/personphotodeletejob.cpp:87 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonPhotoDeleteJob|" msgid "Invalid response content type" msgstr "Tipo de contido da resposta incorrecto" #: src/people/personphotoupdatejob.cpp:97 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonPhotoUpdateJob|" msgid "Invalid response content type" msgstr "Tipo de contido da resposta incorrecto" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-23.04.0/poqm/ko/libkgapi_qt.po new/libkgapi-23.04.1/poqm/ko/libkgapi_qt.po --- old/libkgapi-23.04.0/poqm/ko/libkgapi_qt.po 2023-04-11 06:38:40.000000000 +0200 +++ new/libkgapi-23.04.1/poqm/ko/libkgapi_qt.po 2023-05-06 09:26:43.000000000 +0200 @@ -1,13 +1,13 @@ # Copyright (C) YEAR This_file_is_part_of_KDE # This file is distributed under the same license as the PACKAGE package. -# Shinjo Park <k...@peremen.name>, 2014, 2015, 2017, 2018, 2019, 2020, 2022. +# Shinjo Park <k...@peremen.name>, 2014, 2015, 2017, 2018, 2019, 2020, 2022, 2023. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-08-23 01:46+0000\n" -"PO-Revision-Date: 2022-05-07 02:15+0200\n" +"PO-Revision-Date: 2023-04-22 00:22+0200\n" "Last-Translator: Shinjo Park <k...@peremen.name>\n" "Language-Team: Korean <kde...@kde.org>\n" "Language: ko\n" @@ -15,7 +15,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Lokalize 21.12.3\n" +"X-Generator: Lokalize 22.12.3\n" "X-Qt-Contexts: true\n" #: src/blogger/blogfetchjob.cpp:82 @@ -435,49 +435,31 @@ msgstr "ì못ë ìëµ ë´ì© íì" #: src/people/contactgroupcreatejob.cpp:93 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::ContactGroupCreateJob|" msgid "Invalid response content type" msgstr "ì못ë ìëµ ë´ì© íì" #: src/people/contactgroupmodifyjob.cpp:91 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::ContactGroupModifyJob|" msgid "Invalid response content type" msgstr "ì못ë ìëµ ë´ì© íì" #: src/people/personcreatejob.cpp:89 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonCreateJob|" msgid "Invalid response content type" msgstr "ì못ë ìëµ ë´ì© íì" #: src/people/personmodifyjob.cpp:104 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonModifyJob|" msgid "Invalid response content type" msgstr "ì못ë ìëµ ë´ì© íì" #: src/people/personphotodeletejob.cpp:87 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonPhotoDeleteJob|" msgid "Invalid response content type" msgstr "ì못ë ìëµ ë´ì© íì" #: src/people/personphotoupdatejob.cpp:97 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonPhotoUpdateJob|" msgid "Invalid response content type" msgstr "ì못ë ìëµ ë´ì© íì" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-23.04.0/poqm/ru/libkgapi_qt.po new/libkgapi-23.04.1/poqm/ru/libkgapi_qt.po --- old/libkgapi-23.04.0/poqm/ru/libkgapi_qt.po 2023-04-11 06:38:40.000000000 +0200 +++ new/libkgapi-23.04.1/poqm/ru/libkgapi_qt.po 2023-05-06 09:26:43.000000000 +0200 @@ -4,22 +4,22 @@ # Alexander Lakhin <exclus...@gmail.com>, 2013. # Alexander Potashev <aspotas...@gmail.com>, 2015, 2016, 2017. # Alexander Yavorsky <kekc...@gmail.com>, 2018. -# ÐаÑÐ¸Ñ Ð¨Ð¸ÐºÑнова <translation-t...@basealt.ru>, 2022. +# ÐаÑÐ¸Ñ Ð¨Ð¸ÐºÑнова <translation-t...@basealt.ru>, 2022, 2023. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-08-23 01:46+0000\n" -"PO-Revision-Date: 2022-02-18 15:36+0300\n" -"Last-Translator: ÐаÑÐ¸Ñ Ð¨Ð¸ÐºÑнова <translation-t...@basealt.ru>\n" -"Language-Team: Russian <kde-russ...@lists.kde.ru>\n" +"PO-Revision-Date: 2023-04-21 16:17+0300\n" +"Last-Translator: Olesya Gerasimenko <translation-t...@basealt.ru>\n" +"Language-Team: Basealt Translation Team\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -"X-Generator: Lokalize 21.08.3\n" +"X-Generator: Lokalize 22.12.3\n" "X-Environment: kde\n" "X-Accelerator-Marker: &\n" "X-Text-Markup: kde4\n" @@ -442,49 +442,31 @@ msgstr "ÐеизвеÑÑнÑй Ñип ÑодеÑжимого оÑвеÑа" #: src/people/contactgroupcreatejob.cpp:93 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::ContactGroupCreateJob|" msgid "Invalid response content type" msgstr "ÐеизвеÑÑнÑй Ñип ÑодеÑжимого оÑвеÑа" #: src/people/contactgroupmodifyjob.cpp:91 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::ContactGroupModifyJob|" msgid "Invalid response content type" msgstr "ÐеизвеÑÑнÑй Ñип ÑодеÑжимого оÑвеÑа" #: src/people/personcreatejob.cpp:89 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonCreateJob|" msgid "Invalid response content type" msgstr "ÐеизвеÑÑнÑй Ñип ÑодеÑжимого оÑвеÑа" #: src/people/personmodifyjob.cpp:104 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonModifyJob|" msgid "Invalid response content type" msgstr "ÐеизвеÑÑнÑй Ñип ÑодеÑжимого оÑвеÑа" #: src/people/personphotodeletejob.cpp:87 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonPhotoDeleteJob|" msgid "Invalid response content type" msgstr "ÐеизвеÑÑнÑй Ñип ÑодеÑжимого оÑвеÑа" #: src/people/personphotoupdatejob.cpp:97 -#, fuzzy -#| msgctxt "KGAPI2::Blogger::BlogFetchJob|" -#| msgid "Invalid response content type" msgctxt "KGAPI2::People::PersonPhotoUpdateJob|" msgid "Invalid response content type" msgstr "ÐеизвеÑÑнÑй Ñип ÑодеÑжимого оÑвеÑа" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-23.04.0/poqm/zh_CN/libkgapi_qt.po new/libkgapi-23.04.1/poqm/zh_CN/libkgapi_qt.po --- old/libkgapi-23.04.0/poqm/zh_CN/libkgapi_qt.po 2023-04-11 06:38:40.000000000 +0200 +++ new/libkgapi-23.04.1/poqm/zh_CN/libkgapi_qt.po 2023-05-06 09:26:43.000000000 +0200 @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: kdeorg\n" -"PO-Revision-Date: 2023-04-10 14:12\n" +"PO-Revision-Date: 2023-04-29 08:36\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-23.04.0/src/people/name.cpp new/libkgapi-23.04.1/src/people/name.cpp --- old/libkgapi-23.04.0/src/people/name.cpp 2023-04-11 06:38:40.000000000 +0200 +++ new/libkgapi-23.04.1/src/people/name.cpp 2023-05-06 09:26:43.000000000 +0200 @@ -280,6 +280,7 @@ name.setGivenName(addressee.givenName()); name.setHonorificPrefix(addressee.prefix()); name.setHonorificSuffix(addressee.suffix()); + name.setUnstructuredName(addressee.formattedName()); return name; } @@ -290,6 +291,7 @@ addressee.setGivenName(givenName()); addressee.setPrefix(honorificPrefix()); addressee.setSuffix(honorificSuffix()); + addressee.setFormattedName(displayName()); } } // namespace KGAPI2::People diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-23.04.0/src/people/person.cpp new/libkgapi-23.04.1/src/people/person.cpp --- old/libkgapi-23.04.0/src/people/person.cpp 2023-04-11 06:38:40.000000000 +0200 +++ new/libkgapi-23.04.1/src/people/person.cpp 2023-05-06 09:26:43.000000000 +0200 @@ -121,6 +121,7 @@ setKContactAddresseeBirthdayFields(addressee); setKContactAddresseeEmailFields(addressee); setKContactAddresseePhoneFields(addressee); + setKContactAddresseeUrlFields(addressee); setKContactAddresseeOrganizationFields(addressee); setKContactAddresseeProfessionFields(addressee); setKContactAddresseePhoto(addressee); @@ -184,6 +185,63 @@ photo.setUrl(addressee.photo().url()); photos = {photo}; } + + const auto blogFeed = addressee.blogFeed(); + if (!blogFeed.isEmpty()) { + Url url; + url.setValue(blogFeed.toString()); + url.setType(QStringLiteral("blog")); + urls.append(url); + } + + const auto addresseeUrls = addressee.extraUrlList(); + for (const auto &addresseeUrl : addresseeUrls) { + Url url; + url.setValue(addresseeUrl.toString()); + + switch (addresseeUrl.type()) { + case KContacts::ResourceLocatorUrl::Home: + url.setType(QStringLiteral("home")); + break; + case KContacts::ResourceLocatorUrl::Profile: + url.setType(QStringLiteral("profile")); + break; + case KContacts::ResourceLocatorUrl::Work: + url.setType(QStringLiteral("work")); + break; +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) + case KContacts::ResourceLocatorUrl::Ftp: + url.setType("ftp"); + break; + case KContacts::ResourceLocatorUrl::AppInstallPage: + url.setType("appInstallPage"); + break; + case KContacts::ResourceLocatorUrl::Reservations: + url.setType("reservations"); + break; +#endif + default: + url.setType(QStringLiteral("other")); + } + + urls.append(url); + } + + const auto addressessCalendarUrls = addressee.calendarUrlList(); + for (const auto &calendarUrl : addressessCalendarUrls) { + CalendarUrl gCalendarUrl; + if (calendarUrl.type() == KContacts::CalendarUrl::FBUrl) { + gCalendarUrl.setType(QStringLiteral("freeBusy")); + } else if (calendarUrl.type() == KContacts::CalendarUrl::CALUri) { + gCalendarUrl.setType(QStringLiteral("CALUri")); + } else if (calendarUrl.type() == KContacts::CalendarUrl::CALADRUri) { + gCalendarUrl.setType(QStringLiteral("CALADRUri")); + } else { + gCalendarUrl.setType(QStringLiteral("other")); + } + gCalendarUrl.setUrl(calendarUrl.url().toString()); + calendarUrls.append(gCalendarUrl); + } } QVector<Nickname> nicknames{}; @@ -321,6 +379,63 @@ KContacts::Picture picture(photoToUse.url()); addressee.setPhoto(picture); } + + void setKContactAddresseeUrlFields(KContacts::Addressee &addressee) + { + if (urls.isEmpty()) { + addressee.setBlogFeed({}); + addressee.setUrl(QUrl{}); + addressee.setExtraUrlList({}); + } else { + for (const auto &url : std::as_const(urls)) { + if (url.type() == QStringLiteral("blog")) { + addressee.setBlogFeed(QUrl(url.value())); + } else { + KContacts::ResourceLocatorUrl::Type type; + + if (url.type() == QStringLiteral("home") + || url.type() == QStringLiteral("homePage")) { + type = KContacts::ResourceLocatorUrl::Home; + } else if (url.type() == QStringLiteral("profile")) { + type = KContacts::ResourceLocatorUrl::Profile; + } else if (url.type() == QStringLiteral("work")) { + type = KContacts::ResourceLocatorUrl::Work; +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) + } else if (url.type() == QStringLiteral("ftp")) { + type = KContacts::ResourceLocatorUrl::Ftp; + } else if (url.type() == QStringLiteral("appInstallPage")) { + type = KContacts::ResourceLocatorUrl::AppInstallPage; + } else if (url.type() == QStringLiteral("reservations")) { + type = KContacts::ResourceLocatorUrl::Reservations; +#endif + } else { + type = KContacts::ResourceLocatorUrl::Other; + } + + KContacts::ResourceLocatorUrl resourceUrl; + resourceUrl.setUrl(QUrl(url.value())); + resourceUrl.setType(type); + addressee.insertExtraUrl(resourceUrl); + } + } + } + + + for (const auto &calendarUrl : std::as_const(calendarUrls)) { + KContacts::CalendarUrl kCalendarUrl; + if (calendarUrl.type() == QStringLiteral("freeBusy")) { + kCalendarUrl.setType(KContacts::CalendarUrl::FBUrl); + } else if (calendarUrl.type() == QStringLiteral("CALUri")) { + kCalendarUrl.setType(KContacts::CalendarUrl::CALUri); + } else if (calendarUrl.type() == QStringLiteral("CALADRUri")) { + kCalendarUrl.setType(KContacts::CalendarUrl::CALADRUri); + } else { + kCalendarUrl.setType(KContacts::CalendarUrl::Unknown); + } + kCalendarUrl.setUrl(QUrl(calendarUrl.url())); + addressee.insertCalendarUrl(kCalendarUrl); + } + } }; Person::Person() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkgapi-23.04.0/src/people/url.h new/libkgapi-23.04.1/src/people/url.h --- old/libkgapi-23.04.0/src/people/url.h 2023-04-11 06:38:40.000000000 +0200 +++ new/libkgapi-23.04.1/src/people/url.h 2023-05-06 09:26:43.000000000 +0200 @@ -54,8 +54,18 @@ /** Sets value of the value property. **/ void setValue(const QString &value); - /** The type of the URL. The type can be custom or one of these predefined values: * `home` * `work` * `blog` * `profile` * `homePage` * `ftp` * - * `reservations` * `appInstallPage`: website for a Currents application. * `other` **/ + /** + * The type of the URL. The type can be custom or one of these predefined values: + * * `home` + * * `work` + * * `blog` + * * `profile` + * * `homePage` + * * `ftp` + * * `reservations` + * * `appInstallPage`: website for a Currents application. + * * `other` + **/ Q_REQUIRED_RESULT QString type() const; /** Sets value of the type property. **/ void setType(const QString &value);