File kamd-rename.patch of Package kactivitymanagerd

diff -ur kactivitymanagerd-5.13.90.old/src/common/dbus/common.h kactivitymanagerd-5.13.90/src/common/dbus/common.h
--- kactivitymanagerd-5.13.90.old/src/common/dbus/common.h
+++ kactivitymanagerd-5.13.90/src/common/dbus/common.h
@@ -25,14 +25,14 @@
 #include <QDBusInterface>
 
 #define KAMD_DBUS_SERVICE                                                      \
-    QStringLiteral("org.kde.ActivityManager")
+    QStringLiteral("org.kde.ActivityManager5")
 
 #define KAMD_DBUS_OBJECT_PATH(A)                                               \
     (sizeof(#A) > 2 ? QLatin1String("/ActivityManager/" #A)                    \
                     : QLatin1String("/ActivityManager"))
 
 #define KAMD_DBUS_OBJECT(A)                                                    \
-    QLatin1String("org.kde.ActivityManager." #A)
+    QLatin1String("org.kde.ActivityManager5." #A)
 
 #define KAMD_DBUS_INTERFACE(OBJECT_PATH, OBJECT, PARENT)                       \
     QDBusInterface(KAMD_DBUS_SERVICE,                                          \
@@ -49,7 +49,7 @@
                    nullptr)
 
 #define KAMD_DBUS_CLASS_INTERFACE(OBJECT_PATH, OBJECT, PARENT)                 \
-    org::kde::ActivityManager::OBJECT(                                         \
+    org::kde::ActivityManager5::OBJECT(                                        \
                 KAMD_DBUS_SERVICE,                                             \
                 KAMD_DBUS_OBJECT_PATH(OBJECT_PATH),                            \
                 QDBusConnection::sessionBus(),                                 \
diff -ur kactivitymanagerd-5.13.90.old/src/common/dbus/org.kde.ActivityManager.Activities.xml kactivitymanagerd-5.13.90/src/common/dbus/org.kde.ActivityManager.Activities.xml
--- kactivitymanagerd-5.13.90.old/src/common/dbus/org.kde.ActivityManager.Activities.xml
+++ kactivitymanagerd-5.13.90/src/common/dbus/org.kde.ActivityManager.Activities.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
 <node>
-  <interface name="org.kde.ActivityManager.Activities">
+  <interface name="org.kde.ActivityManager5.Activities">
 
     <method name="CurrentActivity">
       <arg type="s" direction="out"/>
diff -ur kactivitymanagerd-5.12.90.old/src/common/dbus/org.kde.ActivityManager.Application.xml kactivitymanagerd-5.12.90/src/common/dbus/org.kde.ActivityManager.Application.xml
--- kactivitymanagerd-5.12.90.old/src/common/dbus/org.kde.ActivityManager.Application.xml
+++ kactivitymanagerd-5.12.90/src/common/dbus/org.kde.ActivityManager.Application.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
 <node>
-  <interface name="org.kde.ActivityManager.Application">
+  <interface name="org.kde.ActivityManager5.Application">
     <method name="quit">
     </method>
     <method name="serviceVersion">
diff -ur kactivitymanagerd-5.12.90.old/src/common/dbus/org.kde.ActivityManager.Features.xml kactivitymanagerd-5.12.90/src/common/dbus/org.kde.ActivityManager.Features.xml
--- kactivitymanagerd-5.12.90.old/src/common/dbus/org.kde.ActivityManager.Features.xml
+++ kactivitymanagerd-5.12.90/src/common/dbus/org.kde.ActivityManager.Features.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
 <node>
-  <interface name="org.kde.ActivityManager.Features">
+  <interface name="org.kde.ActivityManager5.Features">
     <method name="IsFeatureOperational">
       <arg type="b" direction="out"/>
       <arg name="feature" type="s" direction="in"/>
diff -ur kactivitymanagerd-5.12.90.old/src/common/dbus/org.kde.ActivityManager.ResourcesLinking.xml kactivitymanagerd-5.12.90/src/common/dbus/org.kde.ActivityManager.ResourcesLinking.xml
--- kactivitymanagerd-5.12.90.old/src/common/dbus/org.kde.ActivityManager.ResourcesLinking.xml
+++ kactivitymanagerd-5.12.90/src/common/dbus/org.kde.ActivityManager.ResourcesLinking.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
 <node>
-  <interface name="org.kde.ActivityManager.ResourcesLinking">
+  <interface name="org.kde.ActivityManager5.ResourcesLinking">
 
     <method name="LinkResourceToActivity">
       <arg name="agent" type="s" direction="in"/>
diff -ur kactivitymanagerd-5.12.90.old/src/common/dbus/org.kde.ActivityManager.ResourcesScoring.xml kactivitymanagerd-5.12.90/src/common/dbus/org.kde.ActivityManager.ResourcesScoring.xml
--- kactivitymanagerd-5.12.90.old/src/common/dbus/org.kde.ActivityManager.ResourcesScoring.xml
+++ kactivitymanagerd-5.12.90/src/common/dbus/org.kde.ActivityManager.ResourcesScoring.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
 <node>
-    <interface name="org.kde.ActivityManager.ResourcesScoring">
+    <interface name="org.kde.ActivityManager5.ResourcesScoring">
 
         <signal name="ResourceScoreUpdated">
             <arg name="activity" type="s" direction="out"/>
diff -ur kactivitymanagerd-5.13.90.old/src/common/dbus/org.kde.ActivityManager.Resources.xml kactivitymanagerd-5.13.90/src/common/dbus/org.kde.ActivityManager.Resources.xml
--- kactivitymanagerd-5.13.90.old/src/common/dbus/org.kde.ActivityManager.Resources.xml
+++ kactivitymanagerd-5.13.90/src/common/dbus/org.kde.ActivityManager.Resources.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
 <node>
-  <interface name="org.kde.ActivityManager.Resources">
+  <interface name="org.kde.ActivityManager5.Resources">
 
     <method name="RegisterResourceEvent">
       <arg name="application" type="s" direction="in"/>
diff -ur kactivitymanagerd-5.13.90.old/src/service/Activities.h kactivitymanagerd-5.13.90/src/service/Activities.h
--- kactivitymanagerd-5.13.90.old/src/service/Activities.h
+++ kactivitymanagerd-5.13.90/src/service/Activities.h
@@ -39,7 +39,7 @@
  */
 class Activities : public Module {
     Q_OBJECT
-    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager.Activities")
+    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager5.Activities")
     Q_PROPERTY(QString CurrentActivity READ CurrentActivity WRITE SetCurrentActivity NOTIFY CurrentActivityChanged)
 
 public:
diff -ur kactivitymanagerd-5.14.4.old/src/service/Application.cpp kactivitymanagerd-5.14.4/src/service/Application.cpp
--- kactivitymanagerd-5.14.4.old/src/service/Application.cpp
+++ kactivitymanagerd-5.14.4/src/service/Application.cpp
@@ -109,7 +109,7 @@
         const auto pluginName = plugin.pluginId();
         qCDebug(KAMD_LOG_APPLICATION) << "Plugin Name is " << pluginName << plugin.fileName();
 
-        if (pluginName == QLatin1String("org.kde.ActivityManager.ResourceScoring")) {
+        if (pluginName == QLatin1String("org.kde.ActivityManager5.ResourceScoring")) {
             // SQLite plugin is necessary for the proper workspace behaviour
             return true;
         } else {
@@ -296,7 +296,7 @@
     QGuiApplication::setDesktopSettingsAware(false);
 
     Application application(argc, argv);
-    application.setApplicationName(QStringLiteral("ActivityManager"));
+    application.setApplicationName(QStringLiteral("ActivityManager5"));
     application.setOrganizationDomain(QStringLiteral("kde.org"));
 
     KCrash::initialize();
diff -ur kactivitymanagerd-5.13.90.old/src/service/Application.h kactivitymanagerd-5.13.90/src/service/Application.h
--- kactivitymanagerd-5.13.90.old/src/service/Application.h
+++ kactivitymanagerd-5.13.90/src/service/Application.h
@@ -39,7 +39,7 @@
  */
 class Application : public QApplication {
     Q_OBJECT
-    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager.Application")
+    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager5.Application")
 
 public:
     Application(int &argc, char **argv);
diff -ur kactivitymanagerd-5.13.90.old/src/service/CMakeLists.txt kactivitymanagerd-5.13.90/src/service/CMakeLists.txt
--- kactivitymanagerd-5.13.90.old/src/service/CMakeLists.txt
+++ kactivitymanagerd-5.13.90/src/service/CMakeLists.txt
@@ -57,9 +57,9 @@
    Features.h Features
    )
 
-add_executable (kactivitymanagerd ${kactivitymanager_SRCS})
+add_executable (kactivitymanagerd5 ${kactivitymanager_SRCS})
 
-target_link_libraries (kactivitymanagerd
+target_link_libraries (kactivitymanagerd5
    Qt5::Core
    Qt5::DBus
    Qt5::Gui
@@ -81,7 +81,7 @@
    )
 
 install (TARGETS
-    kactivitymanagerd
+    kactivitymanagerd5
     DESTINATION ${KDE_INSTALL_LIBEXECDIR}
    )
 
 install (FILES
diff -ur kactivitymanagerd-5.13.90.old/src/service/Features.h kactivitymanagerd-5.13.90/src/service/Features.h
--- kactivitymanagerd-5.13.90.old/src/service/Features.h
+++ kactivitymanagerd-5.13.90/src/service/Features.h
@@ -39,7 +39,7 @@
  */
 class Features : public Module {
     Q_OBJECT
-    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager.Features")
+    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager5.Features")
 
 public:
     explicit Features(QObject *parent = nullptr);
diff -ur kactivitymanagerd-5.13.90.old/src/service/files/kactivitymanagerd.desktop kactivitymanagerd-5.13.90/src/service/files/kactivitymanagerd.desktop
--- kactivitymanagerd-5.13.90.old/src/service/files/kactivitymanagerd.desktop
+++ kactivitymanagerd-5.13.90/src/service/files/kactivitymanagerd.desktop
@@ -4,7 +4,7 @@
 X-KDE-ServiceTypes=
 X-DBUS-StartupType=Unique
 X-KDE-StartupNotify=false
-Exec=kactivitymanagerd
+Exec=/opt/kf5/bin/kactivitymanagerd5
 
 Name=Activity Manager
 Name[ar]=مدير الأنشطة
diff -ur kactivitymanagerd-5.13.90.old/src/service/plugins/activitytemplates/org.kde.ActivityManager.Templates.xml kactivitymanagerd-5.13.90/src/service/plugins/activitytemplates/org.kde.ActivityManager.Templates.xml
--- kactivitymanagerd-5.13.90.old/src/service/plugins/activitytemplates/org.kde.ActivityManager.Templates.xml
+++ kactivitymanagerd-5.13.90/src/service/plugins/activitytemplates/org.kde.ActivityManager.Templates.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
 <node>
-  <interface name="org.kde.ActivityManager.Templates">
+  <interface name="org.kde.ActivityManager5.Templates">
     <method name="createActivity">
       <arg name="values" type="v" direction="in"/>
     </method>
diff -ur kactivitymanagerd-5.13.90.old/src/service/plugins/activitytemplates/TemplatesPlugin.cpp kactivitymanagerd-5.13.90/src/service/plugins/activitytemplates/TemplatesPlugin.cpp
--- kactivitymanagerd-5.13.90.old/src/service/plugins/activitytemplates/TemplatesPlugin.cpp
+++ kactivitymanagerd-5.13.90/src/service/plugins/activitytemplates/TemplatesPlugin.cpp
@@ -39,7 +39,7 @@
 {
     Q_UNUSED(args);
 
-    setName(QStringLiteral("org.kde.ActivityManager.ActivityTemplates"));
+    setName(QStringLiteral("org.kde.ActivityManager5.ActivityTemplates"));
 
     new TemplatesAdaptor(this);
     KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/Templates"), this);
diff -ur kactivitymanagerd-5.13.90.old/src/service/plugins/activitytemplates/TemplatesPlugin.h kactivitymanagerd-5.13.90/src/service/plugins/activitytemplates/TemplatesPlugin.h
--- kactivitymanagerd-5.13.90.old/src/service/plugins/activitytemplates/TemplatesPlugin.h
+++ kactivitymanagerd-5.13.90/src/service/plugins/activitytemplates/TemplatesPlugin.h
@@ -25,7 +25,7 @@
 
 class TemplatesPlugin : public Plugin {
     Q_OBJECT
-    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager.Templates")
+    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager5.Templates")
 
 public:
     explicit TemplatesPlugin(QObject *parent = nullptr,
diff -ur kactivitymanagerd-5.13.90.old/src/service/plugins/slc/org.kde.ActivityManager.SLC.xml kactivitymanagerd-5.13.90/src/service/plugins/slc/org.kde.ActivityManager.SLC.xml
--- kactivitymanagerd-5.13.90.old/src/service/plugins/slc/org.kde.ActivityManager.SLC.xml
+++ kactivitymanagerd-5.13.90/src/service/plugins/slc/org.kde.ActivityManager.SLC.xml
@@ -1,6 +1,6 @@
 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
 <node>
-  <interface name="org.kde.ActivityManager.SLC">
+  <interface name="org.kde.ActivityManager5.SLC">
     <signal name="focusChanged">
       <arg name="uri" type="s" direction="out"/>
       <arg name="mimetype" type="s" direction="out"/>
diff -ur kactivitymanagerd-5.13.90.old/src/service/plugins/slc/SlcPlugin.h kactivitymanagerd-5.13.90/src/service/plugins/slc/SlcPlugin.h
--- kactivitymanagerd-5.13.90.old/src/service/plugins/slc/SlcPlugin.h
+++ kactivitymanagerd-5.13.90/src/service/plugins/slc/SlcPlugin.h
@@ -22,7 +22,7 @@
 
 class SlcPlugin : public Plugin {
     Q_OBJECT
-    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager.SLC")
+    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager5.SLC")
     // Q_PLUGIN_METADATA(IID "org.kde.ActivityManager.plugins.slc")
 
 public:
diff -ur kactivitymanagerd-5.13.90.old/src/service/plugins/sqlite/ResourceLinking.h kactivitymanagerd-5.13.90/src/service/plugins/sqlite/ResourceLinking.h
--- kactivitymanagerd-5.13.90.old/src/service/plugins/sqlite/ResourceLinking.h
+++ kactivitymanagerd-5.13.90/src/service/plugins/sqlite/ResourceLinking.h
@@ -39,7 +39,7 @@
  */
 class ResourceLinking : public QObject {
     Q_OBJECT
-    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager.Resources.Linking")
+    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager5.Resources.Linking")
 
 public:
     explicit ResourceLinking(QObject *parent);
diff -ur kactivitymanagerd-5.13.90.old/src/service/plugins/sqlite/StatsPlugin.cpp kactivitymanagerd-5.13.90/src/service/plugins/sqlite/StatsPlugin.cpp
--- kactivitymanagerd-5.13.90.old/src/service/plugins/sqlite/StatsPlugin.cpp
+++ kactivitymanagerd-5.13.90/src/service/plugins/sqlite/StatsPlugin.cpp
@@ -61,7 +61,7 @@
     KDBusConnectionPool::threadConnection().registerObject(
         QStringLiteral("/ActivityManager/Resources/Scoring"), this);
 
-    setName(QStringLiteral("org.kde.ActivityManager.Resources.Scoring"));
+    setName(QStringLiteral("org.kde.ActivityManager5.Resources.Scoring"));
 }
 
 bool StatsPlugin::init(QHash<QString, QObject *> &modules)
diff -ur kactivitymanagerd-5.13.90.old/src/service/plugins/virtualdesktopswitch/VirtualDesktopSwitchPlugin.cpp kactivitymanagerd-5.13.90/src/service/plugins/virtualdesktopswitch/VirtualDesktopSwitchPlugin.cpp
--- kactivitymanagerd-5.13.90.old/src/service/plugins/virtualdesktopswitch/VirtualDesktopSwitchPlugin.cpp
+++ kactivitymanagerd-5.13.90/src/service/plugins/virtualdesktopswitch/VirtualDesktopSwitchPlugin.cpp
@@ -31,7 +31,7 @@
 {
     Q_UNUSED(args);
 
-    setName("org.kde.ActivityManager.VirtualDesktopSwitch");
+    setName("org.kde.ActivityManager5.VirtualDesktopSwitch");
 }
 
 VirtualDesktopSwitchPlugin::~VirtualDesktopSwitchPlugin()
diff -ur kactivitymanagerd-5.13.90.old/src/service/Resources.h kactivitymanagerd-5.13.90/src/service/Resources.h
--- kactivitymanagerd-5.13.90.old/src/service/Resources.h
+++ kactivitymanagerd-5.13.90/src/service/Resources.h
@@ -38,7 +38,7 @@
  */
 class Resources : public Module {
     Q_OBJECT
-    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager.Resources")
+    Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager5.Resources")
 
 public:
     explicit Resources(QObject *parent = nullptr);
diff -ur kactivitymanagerd-5.13.90.old/src/org.kde.activitymanager.service.in kactivitymanagerd-5.13.90/src/org.kde.activitymanager.service.in
--- kactivitymanagerd-5.13.90.old/src/org.kde.activitymanager.service.in
+++ kactivitymanagerd-5.13.90/src/org.kde.activitymanager.service.in
@@ -1,3 +1,3 @@
 [D-BUS Service]
-Name=org.kde.ActivityManager
-Exec=${KDE_INSTALL_FULL_LIBEXECDIR}/kactivitymanagerd
+Name=org.kde.ActivityManager5
+Exec=${KDE_INSTALL_FULL_LIBEXECDIR}/kactivitymanagerd5