Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kpeople5 for openSUSE:Factory 
checked in at 2022-05-16 18:07:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kpeople5 (Old)
 and      /work/SRC/openSUSE:Factory/.kpeople5.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kpeople5"

Mon May 16 18:07:07 2022 rev:88 rq:977193 version:5.94.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kpeople5/kpeople5.changes        2022-04-11 
23:48:51.351336213 +0200
+++ /work/SRC/openSUSE:Factory/.kpeople5.new.1538/kpeople5.changes      
2022-05-16 18:09:08.605308053 +0200
@@ -1,0 +2,11 @@
+Tue May 10 08:18:06 UTC 2022 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.94.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/frameworks/5/5.94.0
+- Changes since 5.93.0:
+  * Add windows CI
+  * Add avatar image provider
+
+-------------------------------------------------------------------

Old:
----
  kpeople-5.93.0.tar.xz
  kpeople-5.93.0.tar.xz.sig

New:
----
  kpeople-5.94.0.tar.xz
  kpeople-5.94.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kpeople5.spec ++++++
--- /var/tmp/diff_new_pack.eXlAb4/_old  2022-05-16 18:09:09.225308546 +0200
+++ /var/tmp/diff_new_pack.eXlAb4/_new  2022-05-16 18:09:09.229308549 +0200
@@ -17,14 +17,14 @@
 
 
 %define rname kpeople
-%define _tar_path 5.93
+%define _tar_path 5.94
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without released
 Name:           kpeople5
-Version:        5.93.0
+Version:        5.94.0
 Release:        0
 Summary:        Library for access to contacts and identity holders
 License:        LGPL-2.1-or-later


++++++ kpeople-5.93.0.tar.xz -> kpeople-5.94.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/.gitlab-ci.yml 
new/kpeople-5.94.0/.gitlab-ci.yml
--- old/kpeople-5.93.0/.gitlab-ci.yml   2022-04-02 12:25:38.000000000 +0200
+++ new/kpeople-5.94.0/.gitlab-ci.yml   2022-05-07 23:25:43.000000000 +0200
@@ -7,3 +7,4 @@
   - 
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
   - 
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
   - 
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android-qt6.yml
+  - 
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/.kde-ci.yml 
new/kpeople-5.94.0/.kde-ci.yml
--- old/kpeople-5.93.0/.kde-ci.yml      2022-04-02 12:25:38.000000000 +0200
+++ new/kpeople-5.94.0/.kde-ci.yml      2022-05-07 23:25:43.000000000 +0200
@@ -9,3 +9,4 @@
 
 Options:
   test-before-installing: True
+  require-passing-tests-on: [ 'Linux', 'FreeBSD' ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/CMakeLists.txt 
new/kpeople-5.94.0/CMakeLists.txt
--- old/kpeople-5.93.0/CMakeLists.txt   2022-04-02 12:25:38.000000000 +0200
+++ new/kpeople-5.94.0/CMakeLists.txt   2022-05-07 23:25:43.000000000 +0200
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.16)
 
-set(KF_VERSION "5.93.0") # handled by release scripts
+set(KF_VERSION "5.94.0") # handled by release scripts
 set(KF_DEP_VERSION "5.93.0") # handled by release scripts
 project (KPeople VERSION ${KF_VERSION})
 
@@ -14,7 +14,7 @@
 set(REQUIRED_QT_VERSION 5.15.2)
 include(KDEInstallDirs)
 
-find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui 
Sql Widgets Qml)
+find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui 
Sql Widgets Qml Quick)
 
 # On non-Apple UNIX DBus integration is required, on Android it does not exist 
and on other platforms it is optional
 if(UNIX AND NOT APPLE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/po/tr/kpeople5.po 
new/kpeople-5.94.0/po/tr/kpeople5.po
--- old/kpeople-5.93.0/po/tr/kpeople5.po        2022-04-02 12:25:38.000000000 
+0200
+++ new/kpeople-5.94.0/po/tr/kpeople5.po        2022-05-07 23:25:43.000000000 
+0200
@@ -1,27 +1,27 @@
-# SOME DESCRIPTIVE TITLE.
 # Copyright (C) YEAR This_file_is_part_of_KDE
 # This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 #
+# Emir SARI <[email protected]>, 2022.
 msgid ""
 msgstr ""
 "Project-Id-Version: kpeople5\n"
 "Report-Msgid-Bugs-To: https://bugs.kde.org\n";
 "POT-Creation-Date: 2021-06-11 00:14+0000\n"
-"PO-Revision-Date: 2017-10-04 11:32+0000\n"
-"Last-Translator: Kaan <[email protected]>\n"
-"Language-Team: Turkish <[email protected]>\n"
+"PO-Revision-Date: 2022-04-19 11:09+0300\n"
+"Last-Translator: Emir SARI <[email protected]>\n"
+"Language-Team: Turkish <[email protected]>\n"
 "Language: tr\n"
 "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"
+"X-Generator: Lokalize 21.12.3\n"
 
 #: match.cpp:46
 #, kde-format
 msgctxt "@title:column"
 msgid "Name"
-msgstr "??sim"
+msgstr "Ad"
 
 #: match.cpp:49
 #, kde-format
@@ -50,12 +50,12 @@
 #: widgets/mergedialog.cpp:52
 #, kde-format
 msgid "Duplicates Manager"
-msgstr ""
+msgstr "Yinelenmi??ler Y??neticisi"
 
 #: widgets/mergedialog.cpp:63
 #, kde-format
 msgid "Select contacts to be merged"
-msgstr "Birle??tirelecek olan ki??ileri se??in"
+msgstr "Birle??tirilecek ki??ileri se??in"
 
 #. i18n: ectx: property (text), widget (QLabel, avatarPixmapLabel)
 #: widgets/person-details-presentation.ui:43
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/po/zh_CN/kpeople5.po 
new/kpeople-5.94.0/po/zh_CN/kpeople5.po
--- old/kpeople-5.93.0/po/zh_CN/kpeople5.po     2022-04-02 12:25:38.000000000 
+0200
+++ new/kpeople-5.94.0/po/zh_CN/kpeople5.po     2022-05-07 23:25:43.000000000 
+0200
@@ -7,7 +7,7 @@
 "Project-Id-Version: kdeorg\n"
 "Report-Msgid-Bugs-To: https://bugs.kde.org\n";
 "POT-Creation-Date: 2021-06-11 00:14+0000\n"
-"PO-Revision-Date: 2022-03-31 13:30\n"
+"PO-Revision-Date: 2022-04-26 15:19\n"
 "Last-Translator: \n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/src/declarative/CMakeLists.txt 
new/kpeople-5.94.0/src/declarative/CMakeLists.txt
--- old/kpeople-5.93.0/src/declarative/CMakeLists.txt   2022-04-02 
12:25:38.000000000 +0200
+++ new/kpeople-5.94.0/src/declarative/CMakeLists.txt   2022-05-07 
23:25:43.000000000 +0200
@@ -4,14 +4,25 @@
     declarativepersondata.cpp
     personactionsmodel.cpp
     peopleqmlplugin.cpp
+    avatarimageprovider.cpp
 
     # automoc the ActionType enum
     ../widgets/actions.h
 )
 
+ecm_qt_declare_logging_category(KF5PeopleDeclarative
+    HEADER kpeopledeclarative_debug.h
+    IDENTIFIER KPEOPLE_DECLARATIVE_LOG
+    CATEGORY_NAME kf.people.declarative
+    DESCRIPTION "KPeople QML plugin"
+    EXPORT KPEOPLE_DECLARATIVE
+)
+
 target_link_libraries(KF5PeopleDeclarative
     Qt${QT_MAJOR_VERSION}::Qml
+    Qt${QT_MAJOR_VERSION}::Quick
     KF5::PeopleWidgets # QAction
+    KF5PeopleBackend
 )
 
 install(TARGETS KF5PeopleDeclarative DESTINATION 
${KDE_INSTALL_QMLDIR}/org/kde/people)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kpeople-5.93.0/src/declarative/avatarimageprovider.cpp 
new/kpeople-5.94.0/src/declarative/avatarimageprovider.cpp
--- old/kpeople-5.93.0/src/declarative/avatarimageprovider.cpp  1970-01-01 
01:00:00.000000000 +0100
+++ new/kpeople-5.94.0/src/declarative/avatarimageprovider.cpp  2022-05-07 
23:25:43.000000000 +0200
@@ -0,0 +1,61 @@
+/*
+    SPDX-FileCopyrightText: 2022 Jonah Br??chert <[email protected]>
+
+    SPDX-License-Identifier: LGPL-2.1-or-later
+*/
+
+#include "avatarimageprovider.h"
+
+#include <abstractcontact.h>
+#include <persondata.h>
+
+#include "kpeopledeclarative_debug.h"
+
+AvatarImageProvider::AvatarImageProvider()
+    : QQuickImageProvider(QQuickImageProvider::Pixmap)
+{
+}
+
+QPixmap AvatarImageProvider::requestPixmap(const QString &id, QSize *size, 
const QSize &requestedSize)
+{
+    const auto base64encoded = QStringView(id).split(u'#').constFirst();
+    const auto decoded = QByteArray::fromBase64(base64encoded.toUtf8(), 
QByteArray::AbortOnBase64DecodingErrors);
+    if (decoded.isEmpty()) {
+        qCDebug(KPEOPLE_DECLARATIVE_LOG) << "AvatarImageProvider:" << id << 
"could not be decoded as a person uri";
+        return {};
+    }
+
+    auto personUri = QString::fromUtf8(decoded);
+    if (personUri.isEmpty()) {
+        qCDebug(KPEOPLE_DECLARATIVE_LOG()) << "AvatarImageProvider:"
+                                           << "passed person uri" << personUri 
<< "was not valid utf8";
+        return {};
+    }
+
+    KPeople::PersonData person(personUri);
+    if (!person.isValid()) {
+        qCDebug(KPEOPLE_DECLARATIVE_LOG()) << "AvatarImageProvider:"
+                                           << "No contact found with person 
uri" << personUri;
+        return {};
+    }
+
+    const auto avatar = [&person]() -> QPixmap {
+        QVariant pic = 
person.contactCustomProperty(KPeople::AbstractContact::PictureProperty);
+        if (pic.canConvert<QImage>()) {
+            return QPixmap::fromImage(pic.value<QImage>());
+        } else if (pic.canConvert<QUrl>()) {
+            return QPixmap(pic.toUrl().toLocalFile());
+        }
+        return {};
+    }();
+
+    if (avatar.isNull()) {
+        return {};
+    }
+
+    if (size) {
+        *size = requestedSize;
+    }
+
+    return avatar.scaled(requestedSize);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/src/declarative/avatarimageprovider.h 
new/kpeople-5.94.0/src/declarative/avatarimageprovider.h
--- old/kpeople-5.93.0/src/declarative/avatarimageprovider.h    1970-01-01 
01:00:00.000000000 +0100
+++ new/kpeople-5.94.0/src/declarative/avatarimageprovider.h    2022-05-07 
23:25:43.000000000 +0200
@@ -0,0 +1,34 @@
+/*
+    SPDX-FileCopyrightText: 2022 Jonah Br??chert <[email protected]>
+
+    SPDX-License-Identifier: LGPL-2.1-or-later
+*/
+
+#pragma once
+
+#include <QQuickImageProvider>
+
+/**
+ * @brief An image provider for displaying a contact's photo
+ *
+ * It is automatically available when importing the KPeople QML module.
+ *
+ * Image URIs for it can be retrieved from `KPeople.PersonData`'s 
`photoImageProviderUri` property,
+ * or from `KPeople.PersonsModel`'s `photoImageProviderUri` role.
+ *
+ * Example:
+ * \code
+ * Kirigami.Avatar {
+ *     source: person.photoImageProviderUri
+ * }
+ * \endcode
+ *
+ * @since 5.93.0
+ */
+class AvatarImageProvider : public QQuickImageProvider
+{
+public:
+    explicit AvatarImageProvider();
+
+    QPixmap requestPixmap(const QString &id, QSize *size, const QSize 
&requestedSize) override;
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kpeople-5.93.0/src/declarative/declarativepersondata.cpp 
new/kpeople-5.94.0/src/declarative/declarativepersondata.cpp
--- old/kpeople-5.93.0/src/declarative/declarativepersondata.cpp        
2022-04-02 12:25:38.000000000 +0200
+++ new/kpeople-5.94.0/src/declarative/declarativepersondata.cpp        
2022-05-07 23:25:43.000000000 +0200
@@ -7,12 +7,17 @@
 #include "declarativepersondata.h"
 
 #include "../persondata.h"
+#include "avatarimageprovider.h"
 #include "kpeople_debug.h"
+#include <imageprovideruri_p.h>
+
+#include <QStringBuilder>
 
 DeclarativePersonData::DeclarativePersonData(QObject *parent)
     : QObject(parent)
     , m_person(nullptr)
 {
+    connect(this, &DeclarativePersonData::personChanged, this, 
&DeclarativePersonData::photoImageProviderUriChanged);
 }
 
 void DeclarativePersonData::setPersonUri(const QString &id)
@@ -27,6 +32,7 @@
         m_person = nullptr;
     } else {
         m_person = new KPeople::PersonData(id, this);
+        connect(m_person, &KPeople::PersonData::dataChanged, this, 
&DeclarativePersonData::photoImageProviderUriChanged);
     }
 
     Q_EMIT personChanged();
@@ -37,6 +43,11 @@
     return m_person;
 }
 
+QString DeclarativePersonData::photoImageProviderUri() const
+{
+    return ::photoImageProviderUri(m_id);
+}
+
 QString DeclarativePersonData::personUri() const
 {
     return m_id;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kpeople-5.93.0/src/declarative/declarativepersondata.h 
new/kpeople-5.94.0/src/declarative/declarativepersondata.h
--- old/kpeople-5.93.0/src/declarative/declarativepersondata.h  2022-04-02 
12:25:38.000000000 +0200
+++ new/kpeople-5.94.0/src/declarative/declarativepersondata.h  2022-05-07 
23:25:43.000000000 +0200
@@ -15,6 +15,7 @@
 
     Q_PROPERTY(QString personUri READ personUri WRITE setPersonUri NOTIFY 
personChanged)
     Q_PROPERTY(KPeople::PersonData *person READ person NOTIFY personChanged)
+    Q_PROPERTY(QString photoImageProviderUri READ photoImageProviderUri NOTIFY 
photoImageProviderUriChanged)
 
 public:
     explicit DeclarativePersonData(QObject *parent = nullptr);
@@ -24,8 +25,11 @@
 
     KPeople::PersonData *person() const;
 
+    QString photoImageProviderUri() const;
+
 Q_SIGNALS:
     void personChanged();
+    void photoImageProviderUriChanged();
 
 private:
     QString m_id;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/src/declarative/peopleqmlplugin.cpp 
new/kpeople-5.94.0/src/declarative/peopleqmlplugin.cpp
--- old/kpeople-5.93.0/src/declarative/peopleqmlplugin.cpp      2022-04-02 
12:25:38.000000000 +0200
+++ new/kpeople-5.94.0/src/declarative/peopleqmlplugin.cpp      2022-05-07 
23:25:43.000000000 +0200
@@ -7,6 +7,8 @@
 
 #include "peopleqmlplugin.h"
 
+#include <QQmlEngine>
+
 #include <actions.h>
 #include <personactionsmodel_p.h>
 #include <persondata.h>
@@ -14,8 +16,8 @@
 #include <personsmodel.h>
 #include <personssortfilterproxymodel.h>
 
+#include "avatarimageprovider.h"
 #include "declarativepersondata.h"
-#include <qqml.h>
 
 class ActionTypeWrapper : public QObject
 {
@@ -47,6 +49,12 @@
     }
 };
 
+void PeopleQMLPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
+{
+    Q_ASSERT(uri == QByteArrayLiteral("org.kde.people"));
+    engine->addImageProvider(QStringLiteral("kpeople-avatar"), new 
AvatarImageProvider());
+}
+
 void PeopleQMLPlugin::registerTypes(const char *uri)
 {
     qmlRegisterType<KPeople::PersonsModel>(uri, 1, 0, "PersonsModel");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/src/declarative/peopleqmlplugin.h 
new/kpeople-5.94.0/src/declarative/peopleqmlplugin.h
--- old/kpeople-5.93.0/src/declarative/peopleqmlplugin.h        2022-04-02 
12:25:38.000000000 +0200
+++ new/kpeople-5.94.0/src/declarative/peopleqmlplugin.h        2022-05-07 
23:25:43.000000000 +0200
@@ -15,6 +15,7 @@
     Q_OBJECT
     Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
 public:
+    void initializeEngine(QQmlEngine *engine, const char *uri) override;
     void registerTypes(const char *uri) override;
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/src/imageprovideruri_p.h 
new/kpeople-5.94.0/src/imageprovideruri_p.h
--- old/kpeople-5.93.0/src/imageprovideruri_p.h 1970-01-01 01:00:00.000000000 
+0100
+++ new/kpeople-5.94.0/src/imageprovideruri_p.h 2022-05-07 23:25:43.000000000 
+0200
@@ -0,0 +1,15 @@
+/*
+    SPDX-FileCopyrightText: 2022 Jonah Br??chert <[email protected]>
+
+    SPDX-License-Identifier: LGPL-2.1-or-later
+*/
+
+#pragma once
+
+#include <QRandomGenerator>
+#include <QString>
+
+inline QString photoImageProviderUri(const QStringView personUri)
+{
+    return u"image://kpeople-avatar/" % 
QString::fromUtf8(personUri.toUtf8().toBase64()) % u"#" % 
QString::number(QRandomGenerator::system()->generate());
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/src/personsmodel.cpp 
new/kpeople-5.94.0/src/personsmodel.cpp
--- old/kpeople-5.93.0/src/personsmodel.cpp     2022-04-02 12:25:38.000000000 
+0200
+++ new/kpeople-5.94.0/src/personsmodel.cpp     2022-05-07 23:25:43.000000000 
+0200
@@ -11,6 +11,7 @@
 
 #include "backends/abstractcontact.h"
 #include "backends/basepersonsdatasource.h"
+#include "imageprovideruri_p.h"
 #include "metacontact_p.h"
 #include "personmanager_p.h"
 #include "personpluginmanager.h"
@@ -108,6 +109,7 @@
     roles.insert(PersonVCardRole, "personVCard");
     roles.insert(ContactsVCardRole, "contactsVCard");
     roles.insert(PhoneNumberRole, "phoneNumber");
+    roles.insert(PhotoImageProviderUri, "photoImageProviderUri");
     return roles;
 }
 
@@ -175,6 +177,8 @@
         return person->customProperty(QStringLiteral("all-groups"));
     case PersonsModel::PhoneNumberRole:
         return person->customProperty(AbstractContact::PhoneNumberProperty);
+    case PersonsModel::PhotoImageProviderUri:
+        return ::photoImageProviderUri(personUri);
     }
     return QVariant();
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kpeople-5.93.0/src/personsmodel.h 
new/kpeople-5.94.0/src/personsmodel.h
--- old/kpeople-5.93.0/src/personsmodel.h       2022-04-02 12:25:38.000000000 
+0200
+++ new/kpeople-5.94.0/src/personsmodel.h       2022-05-07 23:25:43.000000000 
+0200
@@ -45,6 +45,7 @@
 
         GroupsRole, /// groups QStringList
         PhoneNumberRole,
+        PhotoImageProviderUri, ///< Provide a URL to use with QtQuick's 
Image.source, similar to the Photo Role. @since 5.93
 
         UserRole = Qt::UserRole + 0x1000, ///< in case it's needed to extend, 
use this one to start from
     };

Reply via email to