Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kdbusaddons for openSUSE:Factory 
checked in at 2021-08-16 10:07:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdbusaddons (Old)
 and      /work/SRC/openSUSE:Factory/.kdbusaddons.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdbusaddons"

Mon Aug 16 10:07:40 2021 rev:93 rq:912123 version:5.85.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdbusaddons/kdbusaddons.changes  2021-07-16 
00:01:09.381198538 +0200
+++ /work/SRC/openSUSE:Factory/.kdbusaddons.new.1899/kdbusaddons.changes        
2021-08-16 10:11:38.163094982 +0200
@@ -1,0 +2,12 @@
+Fri Aug  6 12:12:02 UTC 2021 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.85.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/frameworks/5/5.85.0
+- Changes since 5.84.0:
+  * KDBusService: Pass the activation token upon activation
+  * Add compile time guards round QX11Info usage
+  * Fix DesktopStartup ID handling
+
+-------------------------------------------------------------------

Old:
----
  kdbusaddons-5.84.0.tar.xz
  kdbusaddons-5.84.0.tar.xz.sig

New:
----
  kdbusaddons-5.85.0.tar.xz
  kdbusaddons-5.85.0.tar.xz.sig

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

Other differences:
------------------
++++++ kdbusaddons.spec ++++++
--- /var/tmp/diff_new_pack.3FaZ9m/_old  2021-08-16 10:11:38.711094340 +0200
+++ /var/tmp/diff_new_pack.3FaZ9m/_new  2021-08-16 10:11:38.715094335 +0200
@@ -17,14 +17,14 @@
 
 
 %define lname   libKF5DBusAddons5
-%define _tar_path 5.84
+%define _tar_path 5.85
 # 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 lang
 Name:           kdbusaddons
-Version:        5.84.0
+Version:        5.85.0
 Release:        0
 Summary:        Convenience classes for QtDBus
 License:        LGPL-2.1-or-later


++++++ kdbusaddons-5.84.0.tar.xz -> kdbusaddons-5.85.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdbusaddons-5.84.0/CMakeLists.txt 
new/kdbusaddons-5.85.0/CMakeLists.txt
--- old/kdbusaddons-5.84.0/CMakeLists.txt       2021-07-03 14:09:14.000000000 
+0200
+++ new/kdbusaddons-5.85.0/CMakeLists.txt       2021-08-06 11:02:07.000000000 
+0200
@@ -1,10 +1,10 @@
 cmake_minimum_required(VERSION 3.16)
 
-set(KF_VERSION "5.84.0") # handled by release scripts
+set(KF_VERSION "5.85.0") # handled by release scripts
 project(KDBusAddons VERSION ${KF_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.84.0  NO_MODULE)
+find_package(ECM 5.85.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/kdbusaddons-5.84.0/po/zh_CN/kdbusaddons5_qt.po 
new/kdbusaddons-5.85.0/po/zh_CN/kdbusaddons5_qt.po
--- old/kdbusaddons-5.84.0/po/zh_CN/kdbusaddons5_qt.po  2021-07-03 
14:09:14.000000000 +0200
+++ new/kdbusaddons-5.85.0/po/zh_CN/kdbusaddons5_qt.po  2021-08-06 
11:02:07.000000000 +0200
@@ -2,7 +2,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: kdeorg\n"
-"PO-Revision-Date: 2021-06-20 07:35\n"
+"PO-Revision-Date: 2021-07-26 13:47\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/kdbusaddons-5.84.0/src/kdbusservice.cpp 
new/kdbusaddons-5.85.0/src/kdbusservice.cpp
--- old/kdbusaddons-5.84.0/src/kdbusservice.cpp 2021-07-03 14:09:14.000000000 
+0200
+++ new/kdbusaddons-5.85.0/src/kdbusservice.cpp 2021-08-06 11:02:07.000000000 
+0200
@@ -58,6 +58,23 @@
         return reversedDomain + app->applicationName();
     }
 
+    static void handlePlatformData(const QVariantMap &platformData)
+    {
+        #if HAVE_X11
+        if (QX11Info::isPlatformX11()) {
+            QByteArray desktopStartupId = 
platformData.value(QStringLiteral("desktop-startup-id")).toByteArray();
+            if (!desktopStartupId.isEmpty()) {
+                QX11Info::setNextStartupId(desktopStartupId);
+            }
+        }
+        #endif
+
+        const auto xdgActivationToken = 
platformData.value(QLatin1String("activation-token")).toByteArray();
+        if (!xdgActivationToken.isEmpty()) {
+            qputenv("XDG_ACTIVATION_TOKEN", xdgActivationToken);
+        }
+    }
+
     bool registered;
     QString serviceName;
     QString errorMessage;
@@ -190,7 +207,22 @@
         } else if (options & KDBusService::Unique) {
             // Already running so it's ok!
             QVariantMap platform_data;
-            platform_data.insert(QStringLiteral("desktop-startup-id"), 
QString::fromUtf8(qgetenv("DESKTOP_STARTUP_ID")));
+#if HAVE_X11
+            if (QX11Info::isPlatformX11()) {
+                QString startupId = 
QString::fromUtf8(qgetenv("DESKTOP_STARTUP_ID"));
+                if (startupId.isEmpty()) {
+                    startupId = QString::fromUtf8(QX11Info::nextStartupId());
+                }
+                if (!startupId.isEmpty()) {
+                    platform_data.insert(QStringLiteral("desktop-startup-id"), 
startupId);
+                }
+            }
+#endif
+
+            if (qEnvironmentVariableIsSet("XDG_ACTIVATION_TOKEN")) {
+                platform_data.insert(QStringLiteral("activation-token"), 
qgetenv("XDG_ACTIVATION_TOKEN"));
+            }
+
             if (QCoreApplication::arguments().count() > 1) {
                 OrgKdeKDBusServiceInterface iface(d->serviceName, objectPath, 
QDBusConnection::sessionBus());
                 iface.setTimeout(5 * 60 * 1000); // Application can take time 
to answer
@@ -284,50 +316,38 @@
 
 void KDBusService::Activate(const QVariantMap &platform_data)
 {
-    Q_UNUSED(platform_data);
-#if HAVE_X11
-    if (QX11Info::isPlatformX11()) {
-        QX11Info::setAppTime(QX11Info::getTimestamp());
-    }
-#endif
-    // TODO 
QX11Info::setNextStartupId(platform_data.value("desktop-startup-id"))
+    d->handlePlatformData(platform_data);
     Q_EMIT activateRequested(QStringList(), QString());
-    // TODO (via hook) 
KStartupInfo::appStarted(platform_data.value("desktop-startup-id"))
-    // ^^ same discussion as below
+    qunsetenv("XDG_ACTIVATION_TOKEN");
 }
 
 void KDBusService::Open(const QStringList &uris, const QVariantMap 
&platform_data)
 {
-    Q_UNUSED(platform_data);
-    // TODO 
QX11Info::setNextStartupId(platform_data.value("desktop-startup-id"))
+    d->handlePlatformData(platform_data);
     Q_EMIT openRequested(QUrl::fromStringList(uris));
-    // TODO (via hook) 
KStartupInfo::appStarted(platform_data.value("desktop-startup-id"))
-    // ^^ not needed if the app actually opened a new window.
-    // Solution 1: do it all the time anyway (needs API in QX11Info)
-    // Solution 2: pass the id to the app and let it use 
KStartupInfo::appStarted if reusing a window
+    qunsetenv("XDG_ACTIVATION_TOKEN");
 }
 
 void KDBusService::ActivateAction(const QString &action_name, const 
QVariantList &maybeParameter, const QVariantMap &platform_data)
 {
-    Q_UNUSED(platform_data);
+    d->handlePlatformData(platform_data);
+
     // This is a workaround for D-Bus not supporting null variants.
     const QVariant param = maybeParameter.count() == 1 ? 
maybeParameter.first() : QVariant();
+
     Q_EMIT activateActionRequested(action_name, param);
-    // TODO (via hook) 
KStartupInfo::appStarted(platform_data.value("desktop-startup-id"))
-    // if desktop-startup-id is set, the action is supposed to show a window 
(since it could be
-    // called when the app is not running)
+    qunsetenv("XDG_ACTIVATION_TOKEN");
 }
 
 int KDBusService::CommandLine(const QStringList &arguments, const QString 
&workingDirectory, const QVariantMap &platform_data)
 {
-    Q_UNUSED(platform_data);
     d->exitValue = 0;
+    d->handlePlatformData(platform_data);
     // The TODOs here only make sense if this method can be called from the 
GUI.
     // If it's for pure "usage in the terminal" then no startup notification 
got started.
     // But maybe one day the workspace wants to call this for the Exec key of 
a .desktop file?
-    // TODO 
QX11Info::setNextStartupId(platform_data.value("desktop-startup-id"))
     Q_EMIT activateRequested(arguments, workingDirectory);
-    // TODO (via hook) 
KStartupInfo::appStarted(platform_data.value("desktop-startup-id"))
+    qunsetenv("XDG_ACTIVATION_TOKEN");
     return d->exitValue;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kdbusaddons-5.84.0/src/kdbusservice.h 
new/kdbusaddons-5.85.0/src/kdbusservice.h
--- old/kdbusaddons-5.84.0/src/kdbusservice.h   2021-07-03 14:09:14.000000000 
+0200
+++ new/kdbusaddons-5.85.0/src/kdbusservice.h   2021-08-06 11:02:07.000000000 
+0200
@@ -220,9 +220,15 @@
      *        commandLineParser->parse(arguments); // same QCommandLineParser 
instance as the one used in main()
      *        handleCmdLine(workingDirectory); // shared method with main(), 
which uses commandLineParser to handle options and positional arguments
      *    }
-     *    // and for GUI applications, also terminate startup notification and 
activate the mainwindow:
-     *    KStartupInfo::setNewStartupId(mainWindow, KStartupInfo::startupId());
-     *    KWindowSystem::forceActiveWindow(mainWindow->winId());
+     *
+     *
+     *    For GUI applications on X11 , also terminate startup notification 
and activate the mainwindow:
+     *    The startup ID will exposed be via QX11Extras::nextStartupId
+     *
+     *    If an existing window is to be raised, call:
+     *    KStartupInfo::setNewStartupId(mainWindow, QX11Extras::nextStartupId);
+     *    mainWindow->raise();
+     *
      * @endcode
      *
      * If you're using the builtin handling of @c --help and @c --version in 
QCommandLineParser,

Reply via email to