Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kf6-knotifications for 
openSUSE:Factory checked in at 2024-04-15 20:12:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kf6-knotifications (Old)
 and      /work/SRC/openSUSE:Factory/.kf6-knotifications.new.26366 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kf6-knotifications"

Mon Apr 15 20:12:10 2024 rev:2 rq:1167200 version:6.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kf6-knotifications/kf6-knotifications.changes    
2024-03-11 15:26:27.589926064 +0100
+++ 
/work/SRC/openSUSE:Factory/.kf6-knotifications.new.26366/kf6-knotifications.changes
 2024-04-15 20:15:30.786047513 +0200
@@ -1,0 +2,9 @@
+Fri Apr  5 12:52:49 UTC 2024 - Christophe Marin <[email protected]>
+
+- Update to 6.1.0
+  * New feature release
+- Changes since 6.0.0:
+  * update version for new release
+  * Port QML module to declarative type registration
+
+-------------------------------------------------------------------

Old:
----
  knotifications-6.0.0.tar.xz
  knotifications-6.0.0.tar.xz.sig

New:
----
  knotifications-6.1.0.tar.xz
  knotifications-6.1.0.tar.xz.sig

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

Other differences:
------------------
++++++ kf6-knotifications.spec ++++++
--- /var/tmp/diff_new_pack.0pVVnX/_old  2024-04-15 20:15:31.422070920 +0200
+++ /var/tmp/diff_new_pack.0pVVnX/_new  2024-04-15 20:15:31.426071068 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package kf6-knotifications
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,13 +19,13 @@
 %define qt6_version 6.6.0
 
 %define rname knotifications
-# Full KF6 version (e.g. 6.0.0)
+# Full KF6 version (e.g. 6.1.0)
 %{!?_kf6_version: %global _kf6_version %{version}}
 # Last major and minor KF6 version (e.g. 6.0)
 %{!?_kf6_bugfix_version: %define _kf6_bugfix_version %(echo %{_kf6_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without released
 Name:           kf6-knotifications
-Version:        6.0.0
+Version:        6.1.0
 Release:        0
 Summary:        KDE Desktop notifications
 License:        LGPL-2.1-or-later


++++++ knotifications-6.0.0.tar.xz -> knotifications-6.1.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knotifications-6.0.0/CMakeLists.txt 
new/knotifications-6.1.0/CMakeLists.txt
--- old/knotifications-6.0.0/CMakeLists.txt     2024-02-21 12:26:19.000000000 
+0100
+++ new/knotifications-6.1.0/CMakeLists.txt     2024-04-05 12:57:45.000000000 
+0200
@@ -1,12 +1,12 @@
 cmake_minimum_required(VERSION 3.16)
 
-set(KF_VERSION "6.0.0") # handled by release scripts
-set(KF_DEP_VERSION "6.0.0") # handled by release scripts
+set(KF_VERSION "6.1.0") # handled by release scripts
+set(KF_DEP_VERSION "6.1.0") # handled by release scripts
 project(KNotifications VERSION ${KF_VERSION})
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 6.0.0  NO_MODULE)
+find_package(ECM 6.1.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/knotifications-6.0.0/poqm/zh_CN/knotifications6_qt.po 
new/knotifications-6.1.0/poqm/zh_CN/knotifications6_qt.po
--- old/knotifications-6.0.0/poqm/zh_CN/knotifications6_qt.po   2024-02-21 
12:26:19.000000000 +0100
+++ new/knotifications-6.1.0/poqm/zh_CN/knotifications6_qt.po   2024-04-05 
12:57:45.000000000 +0200
@@ -12,5 +12,5 @@
 "Project-Id-Version: kdeorg\n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
-"PO-Revision-Date: 2024-02-05 11:37\n"
+"PO-Revision-Date: 2024-03-30 19:36\n"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knotifications-6.0.0/src/CMakeLists.txt 
new/knotifications-6.1.0/src/CMakeLists.txt
--- old/knotifications-6.0.0/src/CMakeLists.txt 2024-02-21 12:26:19.000000000 
+0100
+++ new/knotifications-6.1.0/src/CMakeLists.txt 2024-04-05 12:57:45.000000000 
+0200
@@ -1,6 +1,8 @@
 add_library(KF6Notifications)
 add_library(KF6::Notifications ALIAS KF6Notifications)
 
+qt_extract_metatypes(KF6Notifications)
+
 set_target_properties(KF6Notifications PROPERTIES
     VERSION     ${KNOTIFICATIONS_VERSION}
     SOVERSION   ${KNOTIFICATIONS_SOVERSION}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/knotifications-6.0.0/src/qml/CMakeLists.txt 
new/knotifications-6.1.0/src/qml/CMakeLists.txt
--- old/knotifications-6.0.0/src/qml/CMakeLists.txt     2024-02-21 
12:26:19.000000000 +0100
+++ new/knotifications-6.1.0/src/qml/CMakeLists.txt     2024-04-05 
12:57:45.000000000 +0200
@@ -1,7 +1,7 @@
 # SPDX-FileCopyrightText: 2021 Volker Krause <[email protected]>
 # SPDX-License-Identifier: BSD-3-Clause
 
-ecm_add_qml_module(knotificationqmlplugin URI org.kde.notification VERSION 1.0)
+ecm_add_qml_module(knotificationqmlplugin URI org.kde.notification VERSION 1.0 
GENERATE_PLUGIN_SOURCE)
 
 target_sources(knotificationqmlplugin PRIVATE
     knotificationqmlplugin.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/knotifications-6.0.0/src/qml/knotificationqmlplugin.cpp 
new/knotifications-6.1.0/src/qml/knotificationqmlplugin.cpp
--- old/knotifications-6.0.0/src/qml/knotificationqmlplugin.cpp 2024-02-21 
12:26:19.000000000 +0100
+++ new/knotifications-6.1.0/src/qml/knotificationqmlplugin.cpp 2024-04-05 
12:57:45.000000000 +0200
@@ -6,110 +6,64 @@
 
 #include "knotificationqmlplugin.h"
 
-#include <KNotification>
-#include <KNotificationPermission>
-#include <KNotificationReplyAction>
-
-class NotificationWrapper : public KNotification
-{
-    Q_OBJECT
-    Q_PROPERTY(KNotificationReplyAction *replyAction READ replyActionFactory 
CONSTANT)
-    Q_PROPERTY(QQmlListProperty<KNotificationAction> actions READ 
actionsProperty NOTIFY actionsChanged)
-    Q_PROPERTY(KNotificationAction *defaultAction READ defaultAction WRITE 
setDefaultActionQml NOTIFY defaultActionChanged)
-public:
-    explicit NotificationWrapper(QObject *parent = nullptr)
-        : KNotification(QString(), KNotification::CloseOnTimeout, parent)
-    {
-        setAutoDelete(false);
-
-        m_actionsProperty = QQmlListProperty<KNotificationAction>(this,
-                                                                  nullptr,
-                                                                  
&NotificationWrapper::appendAction,
-                                                                  
&NotificationWrapper::actionsCount,
-                                                                  
&NotificationWrapper::actionAt,
-                                                                  
&NotificationWrapper::clearActions);
-    }
-
-    KNotificationReplyAction *replyActionFactory()
-    {
-        if (!replyAction()) {
-            
setReplyAction(std::make_unique<KNotificationReplyAction>(QString()));
-        }
-        return replyAction();
-    }
-
-    int actionCount() const
-    {
-        return actions().count();
-    }
-
-    KNotificationAction *actionAt(qsizetype index)
-    {
-        return actions().at(index);
-    }
+NotificationWrapper::NotificationWrapper(QObject *parent)
+    : KNotification(QString(), KNotification::CloseOnTimeout, parent)
+{
+    setAutoDelete(false);
 
-    QQmlListProperty<KNotificationAction> actionsProperty() const
-    {
-        return m_actionsProperty;
-    }
+    m_actionsProperty = QQmlListProperty<KNotificationAction>(this,
+                                                              nullptr,
+                                                              
&NotificationWrapper::appendAction,
+                                                              
&NotificationWrapper::actionsCount,
+                                                              
&NotificationWrapper::actionAt,
+                                                              
&NotificationWrapper::clearActions);
+}
 
-    static qsizetype actionsCount(QQmlListProperty<KNotificationAction> *list)
-    {
-        return static_cast<NotificationWrapper *>(list->object)->actionCount();
+KNotificationReplyAction *NotificationWrapper::replyActionFactory()
+{
+    if (!replyAction()) {
+        setReplyAction(std::make_unique<KNotificationReplyAction>(QString()));
     }
+    return replyAction();
+}
 
-    static void appendAction(QQmlListProperty<KNotificationAction> *list, 
KNotificationAction *value)
-    {
-        auto notification = static_cast<NotificationWrapper *>(list->object);
-        auto actions = notification->actions();
-        actions << value;
-        notification->setActionsQml(actions);
-    }
+int NotificationWrapper::actionCount() const
+{
+    return actions().count();
+}
 
-    static KNotificationAction *actionAt(QQmlListProperty<KNotificationAction> 
*list, qsizetype index)
-    {
-        return static_cast<NotificationWrapper 
*>(list->object)->actionAt(index);
-    }
+KNotificationAction *NotificationWrapper::actionAt(qsizetype index)
+{
+    return actions().at(index);
+}
 
-    static void clearActions(QQmlListProperty<KNotificationAction> *list)
-    {
-        auto notification = static_cast<KNotification *>(list->object);
-        notification->clearActions();
-    }
+QQmlListProperty<KNotificationAction> NotificationWrapper::actionsProperty() 
const
+{
+    return m_actionsProperty;
+}
 
-private:
-    QQmlListProperty<KNotificationAction> m_actionsProperty;
-};
-
-class NotificationPermissionWrapper
-{
-    Q_GADGET
-public:
-    Q_INVOKABLE bool checkPermission()
-    {
-        return KNotificationPermission::checkPermission() == 
Qt::PermissionStatus::Granted;
-    }
+qsizetype 
NotificationWrapper::actionsCount(QQmlListProperty<KNotificationAction> *list)
+{
+    return static_cast<NotificationWrapper *>(list->object)->actionCount();
+}
 
-    Q_INVOKABLE void requestPermission(const QJSValue &callback)
-    {
-        KNotificationPermission::requestPermission(m_engine, 
[&callback](Qt::PermissionStatus status) {
-            callback.call({status == Qt::PermissionStatus::Granted});
-        });
-    }
+void NotificationWrapper::appendAction(QQmlListProperty<KNotificationAction> 
*list, KNotificationAction *value)
+{
+    auto notification = static_cast<NotificationWrapper *>(list->object);
+    auto actions = notification->actions();
+    actions << value;
+    notification->setActionsQml(actions);
+}
 
-    QQmlEngine *m_engine = nullptr;
-};
+KNotificationAction 
*NotificationWrapper::actionAt(QQmlListProperty<KNotificationAction> *list, 
qsizetype index)
+{
+    return static_cast<NotificationWrapper *>(list->object)->actionAt(index);
+}
 
-void KNotificationQmlPlugin::registerTypes(const char *uri)
+void NotificationWrapper::clearActions(QQmlListProperty<KNotificationAction> 
*list)
 {
-    Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.notification"));
-    qmlRegisterType<NotificationWrapper>(uri, 1, 0, "Notification");
-    qmlRegisterType<KNotificationAction>(uri, 1, 0, "NotificationAction");
-    qmlRegisterUncreatableType<KNotificationReplyAction>(uri, 1, 0, 
"NotificationReplyAction", {});
-    qmlRegisterSingletonType("org.kde.notification", 1, 0, 
"NotificationPermission", [](QQmlEngine *engine, QJSEngine *) -> QJSValue {
-        return engine->toScriptValue(NotificationPermissionWrapper{engine});
-    });
+    auto notification = static_cast<KNotification *>(list->object);
+    notification->clearActions();
 }
 
-#include "knotificationqmlplugin.moc"
 #include "moc_knotificationqmlplugin.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/knotifications-6.0.0/src/qml/knotificationqmlplugin.h 
new/knotifications-6.1.0/src/qml/knotificationqmlplugin.h
--- old/knotifications-6.0.0/src/qml/knotificationqmlplugin.h   2024-02-21 
12:26:19.000000000 +0100
+++ new/knotifications-6.1.0/src/qml/knotificationqmlplugin.h   2024-04-05 
12:57:45.000000000 +0200
@@ -8,14 +8,71 @@
 #define KNOTIFICATIONQMLPLUGIN_H
 
 #include <QQmlEngine>
-#include <QQmlExtensionPlugin>
 
-class KNotificationQmlPlugin : public QQmlExtensionPlugin
+#include <KNotification>
+#include <KNotificationPermission>
+#include <KNotificationReplyAction>
+
+struct NotificationActionForeign {
+    Q_GADGET
+    QML_NAMED_ELEMENT(NotificationAction)
+    QML_FOREIGN(KNotificationAction);
+};
+
+struct NotificationReplyActionForeign {
+    Q_GADGET
+    QML_NAMED_ELEMENT(NotificationReplyAction)
+    QML_UNCREATABLE("")
+    QML_FOREIGN(KNotificationReplyAction);
+};
+
+class NotificationWrapper : public KNotification
+{
+    Q_OBJECT
+    QML_NAMED_ELEMENT(Notification)
+    Q_PROPERTY(KNotificationReplyAction *replyAction READ replyActionFactory 
CONSTANT)
+    Q_PROPERTY(QQmlListProperty<KNotificationAction> actions READ 
actionsProperty NOTIFY actionsChanged)
+    Q_PROPERTY(KNotificationAction *defaultAction READ defaultAction WRITE 
setDefaultActionQml NOTIFY defaultActionChanged)
+public:
+    explicit NotificationWrapper(QObject *parent = nullptr);
+
+    KNotificationReplyAction *replyActionFactory();
+
+    int actionCount() const;
+
+    KNotificationAction *actionAt(qsizetype index);
+
+    QQmlListProperty<KNotificationAction> actionsProperty() const;
+
+    static qsizetype actionsCount(QQmlListProperty<KNotificationAction> *list);
+
+    static void appendAction(QQmlListProperty<KNotificationAction> *list, 
KNotificationAction *value);
+
+    static KNotificationAction *actionAt(QQmlListProperty<KNotificationAction> 
*list, qsizetype index);
+
+    static void clearActions(QQmlListProperty<KNotificationAction> *list);
+
+private:
+    QQmlListProperty<KNotificationAction> m_actionsProperty;
+};
+
+class NotificationPermissionWrapper : public QObject
 {
     Q_OBJECT
-    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
+    QML_NAMED_ELEMENT(NotificationPermission)
+    QML_SINGLETON
 public:
-    void registerTypes(const char *uri) override;
+    Q_INVOKABLE bool checkPermission()
+    {
+        return KNotificationPermission::checkPermission() == 
Qt::PermissionStatus::Granted;
+    }
+
+    Q_INVOKABLE void requestPermission(const QJSValue &callback)
+    {
+        KNotificationPermission::requestPermission(this, 
[&callback](Qt::PermissionStatus status) {
+            callback.call({status == Qt::PermissionStatus::Granted});
+        });
+    }
 };
 
 #endif // KNOTIFICATIONQMLPLUGIN_H

Reply via email to