Hello community,

here is the log from the commit of package plasma5-workspace for 
openSUSE:Factory checked in at 2015-06-01 09:39:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/plasma5-workspace (Old)
 and      /work/SRC/openSUSE:Factory/.plasma5-workspace.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "plasma5-workspace"

Changes:
--------
--- /work/SRC/openSUSE:Factory/plasma5-workspace/plasma5-workspace.changes      
2015-05-29 10:28:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.plasma5-workspace.new/plasma5-workspace.changes 
2015-06-01 09:39:43.000000000 +0200
@@ -1,0 +2,14 @@
+Thu May 28 23:05:36 UTC 2015 - [email protected]
+
+- Added patches from upstream:
+  0001-Bugzilla-Integration-Look-for-the-mappings-file-in-t.patch
+  0002-Reuse-the-existing-Notify-method-for-Notification-s-.patch
+  (kde#342605)
+  0003-notifications-Make-sure-the-Open.-button-on-finished.patch
+  0004-notifications-Optimize-sending-the-notification-data.patch
+  0005-Fix-launcher-sorting-the-by-activity-sorting-strateg.patch
+  (kde#348324)
+  0001-Unbreak-Undo-notifications-on-Plasmoid-removal.patch
+  (kde#345149)
+
+-------------------------------------------------------------------

New:
----
  0001-Bugzilla-Integration-Look-for-the-mappings-file-in-t.patch
  0001-Unbreak-Undo-notifications-on-Plasmoid-removal.patch
  0002-Reuse-the-existing-Notify-method-for-Notification-s-.patch
  0003-notifications-Make-sure-the-Open.-button-on-finished.patch
  0004-notifications-Optimize-sending-the-notification-data.patch
  0005-Fix-launcher-sorting-the-by-activity-sorting-strateg.patch

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

Other differences:
------------------
++++++ plasma5-workspace.spec ++++++
--- /var/tmp/diff_new_pack.BH1ZnI/_old  2015-06-01 09:39:44.000000000 +0200
+++ /var/tmp/diff_new_pack.BH1ZnI/_new  2015-06-01 09:39:44.000000000 +0200
@@ -34,6 +34,12 @@
 # PATCH-FIX_OPENSUSE 0003-Remove-export-of-QT_PLUGIN_PATH.patch -- we install 
plugins to directory known to Qt5, so export just pollutes both Qt4 and Qt5 
plugins
 Patch2:         0003-Remove-export-of-QT_PLUGIN_PATH.patch
 # PATCHES 100-200 and above are from upstream 5.3 branch
+Patch100:       0001-Bugzilla-Integration-Look-for-the-mappings-file-in-t.patch
+Patch101:       0002-Reuse-the-existing-Notify-method-for-Notification-s-.patch
+Patch102:       0003-notifications-Make-sure-the-Open.-button-on-finished.patch
+Patch103:       0004-notifications-Optimize-sending-the-notification-data.patch
+Patch104:       0005-Fix-launcher-sorting-the-by-activity-sorting-strateg.patch
+Patch105:       0001-Unbreak-Undo-notifications-on-Plasmoid-removal.patch
 # PATCHES 201-300 and above are from upstream master/5.4 branch
 BuildRequires:  alsa-devel
 BuildRequires:  baloo5-devel >= %{version}
@@ -190,6 +196,12 @@
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+%patch104 -p1
+%patch105 -p1
 
 %build
   %cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm 
-DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5

++++++ 0001-Bugzilla-Integration-Look-for-the-mappings-file-in-t.patch ++++++
>From 660eb9412a274e28ce13b7091b0e6e7620e5d68b Mon Sep 17 00:00:00 2001
From: Vishesh Handa <[email protected]>
Date: Thu, 28 May 2015 16:37:44 +0200
Subject: [PATCH 1/5] Bugzilla Integration: Look for the mappings file in the
 correct location

The "mappings" file is not installed in the 'GenericDataLocation', it is
installed under the drkonqi prefix in /usr/share/. We should look for it
in the correct place.

Reviewed-By: Aleix Pol

Cherry-picked from b67f43013426
---
 drkonqi/bugzillaintegration/productmapping.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drkonqi/bugzillaintegration/productmapping.cpp 
b/drkonqi/bugzillaintegration/productmapping.cpp
index 
96cac5fbceb05168e7a57ed00a94e3c6d4c6bfec..2dcbf7bbfa52dc66fc1f4374a1eadd73ee46add9
 100644
--- a/drkonqi/bugzillaintegration/productmapping.cpp
+++ b/drkonqi/bugzillaintegration/productmapping.cpp
@@ -57,7 +57,7 @@ void ProductMapping::map(const QString & appName)
 
 void ProductMapping::mapUsingInternalFile(const QString & appName)
 {
-    KConfig mappingsFile(QString::fromLatin1("mappings"), KConfig::NoGlobals, 
QStandardPaths::GenericDataLocation);
+    KConfig mappingsFile(QString::fromLatin1("mappings"), KConfig::NoGlobals, 
QStandardPaths::DataLocation);
     const KConfigGroup mappings = mappingsFile.group("Mappings");
     if (mappings.hasKey(appName)) {
         QString mappingString = mappings.readEntry(appName);
@@ -82,7 +82,7 @@ void 
ProductMapping::getRelatedProductsUsingInternalFile(const QString & bugzill
     //ProductGroup ->  kontact=kdepim
     //Groups -> kdepim=kontact|kmail|korganizer|akonadi|pimlibs..etc
 
-    KConfig mappingsFile(QString::fromLatin1("mappings"), KConfig::NoGlobals, 
QStandardPaths::GenericDataLocation);
+    KConfig mappingsFile(QString::fromLatin1("mappings"), KConfig::NoGlobals, 
QStandardPaths::DataLocation);
     const KConfigGroup productGroup = mappingsFile.group("ProductGroup");
 
     //Get groups of the application
-- 
2.4.1

++++++ 0001-Unbreak-Undo-notifications-on-Plasmoid-removal.patch ++++++
>From 6b3900767b6c97916e0e82dd8aa8fa8029ca7616 Mon Sep 17 00:00:00 2001
From: Martin Klapetek <[email protected]>
Date: Fri, 29 May 2015 09:28:49 +0200
Subject: [PATCH 1/1] Unbreak Undo notifications on Plasmoid removal

REVIEW: 123926
BUG: 345149
---
 dataengines/notifications/notificationsengine.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dataengines/notifications/notificationsengine.cpp 
b/dataengines/notifications/notificationsengine.cpp
index 
509f349278f6883f509276b59f088418469a3797..c3bf373ca979bb5f75c7bf967692ff76c40360b3
 100644
--- a/dataengines/notifications/notificationsengine.cpp
+++ b/dataengines/notifications/notificationsengine.cpp
@@ -154,7 +154,7 @@ uint NotificationsEngine::Notify(const QString &app_name, 
uint replaces_id,
 
     //don't let applications spam too much, except ourself
     //needed to display all the "applet deleted" notifications and not merge 
them
-    if (m_activeNotifications.values().contains(app_name + summary) && 
app_name != QGuiApplication::applicationDisplayName() && 
!m_alwaysReplaceAppsList.contains(app_name)) {
+    if (m_activeNotifications.values().contains(app_name + summary) && 
app_name != QLatin1String("Plasma Workspace") && 
!m_alwaysReplaceAppsList.contains(app_name)) {
         // cut off the "notification " from the source name
         partOf = m_activeNotifications.key(app_name + 
summary).mid(13).toUInt();
 
-- 
2.4.1

++++++ 0002-Reuse-the-existing-Notify-method-for-Notification-s-.patch ++++++
>From a12bb76502952749c069b9ab70ac61ee1353079b Mon Sep 17 00:00:00 2001
From: Martin Klapetek <[email protected]>
Date: Thu, 28 May 2015 17:21:17 +0200
Subject: [PATCH 2/5] Reuse the existing Notify method for Notification's
 DataEngine createNotification call

REVIEW: 123923
BUG: 342605
FIXED-IN: 5.3.2
---
 applets/notifications/package/contents/ui/Jobs.qml | 25 +++++++++++-----------
 .../package/contents/ui/Notifications.qml          |  7 ++++++
 dataengines/notifications/notificationaction.cpp   |  6 +++---
 dataengines/notifications/notifications.operations |  5 ++++-
 dataengines/notifications/notificationsengine.cpp  | 18 +++++-----------
 dataengines/notifications/notificationsengine.h    |  3 ++-
 6 files changed, 34 insertions(+), 30 deletions(-)

diff --git a/applets/notifications/package/contents/ui/Jobs.qml 
b/applets/notifications/package/contents/ui/Jobs.qml
index 
3307d38b9a1ea54b075b61f023b083eae08428ac..d16a55d9b26f966f8a5ed80439bdb780c2a8e7bf
 100644
--- a/applets/notifications/package/contents/ui/Jobs.qml
+++ b/applets/notifications/package/contents/ui/Jobs.qml
@@ -80,18 +80,19 @@ Column {
                 summary = infoMessage ? i18nc("the job, which can be anything, 
failed to complete", "%1: Failed", infoMessage) : i18n("Job Failed")
             }
 
-            notifications.addNotification({
-                source: source,
-                appIcon: runningJobs[source]["appIconName"],
-                appName: runningJobs[source]["appName"],
-                summary: summary,
-                body: errorText || message,
-                isPersistent: true,
-                expireTimeout: 6000,
-                urgency: 0,
-                configurable: false,
-                actions: !error && UrlHelper.isUrlValid(message) ? [{"id": 
message, "text": i18n("Open...")}] : [] // If the source contains "Job", it 
tries to open the "id" value (which is "message")
-            })
+            var op = [];
+            op["source"] = source;
+            op["appIcon"] = runningJobs[source]["appIconName"];
+            op["appName"] = runningJobs[source]["appName"];
+            op["summary"] = summary;
+            op["body"] = errorText || message;
+            op["isPersistent"] = true;
+            op["expireTimeout"] = 6000;
+            op["urgency"] = 0;
+            op["configurable"] = false;
+            op["actions"] = !error && UrlHelper.isUrlValid(message) ? 
[message, i18n("Open...")] : []; // If the source contains "Job", it tries to 
open the "id" value (which is "message")
+
+            notifications.createNotification(op);
 
             delete runningJobs[source]
         }
diff --git a/applets/notifications/package/contents/ui/Notifications.qml 
b/applets/notifications/package/contents/ui/Notifications.qml
index 
333f5b84202a267227f466d26bb6cc571c3af1e9..5571a7608c9ece18e5475bb80c5fb2accf905b6b
 100644
--- a/applets/notifications/package/contents/ui/Notifications.qml
+++ b/applets/notifications/package/contents/ui/Notifications.qml
@@ -98,6 +98,13 @@ Column {
         op["appRealName"] = appRealName;
         service.startOperationCall(op)
     }
+    function createNotification(data) {
+        var service = notificationsSource.serviceForSource("notification");
+        var op = service.operationDescription("createNotification");
+        // add everything from "data" to "op"
+        for (var attrname in data) { op[attrname] = data[attrname]; }
+        service.startOperationCall(op);
+    }
 
     function closeNotification(source) {
         var service = notificationsSource.serviceForSource(source)
diff --git a/dataengines/notifications/notificationaction.cpp 
b/dataengines/notifications/notificationaction.cpp
index 
db27cb31055668f58291c36bd70314df09000236..5302f7808fd43c924a3f7b1fd7cfc0acba45c500
 100644
--- a/dataengines/notifications/notificationaction.cpp
+++ b/dataengines/notifications/notificationaction.cpp
@@ -59,9 +59,9 @@ void NotificationAction::start()
                                               
parameters().value("appIcon").toString(),
                                               
parameters().value("summary").toString(),
                                               
parameters().value("body").toString(),
-                                              
parameters().value("timeout").toInt(),
-                                              false,
-                                              QString()
+                                              
parameters().value("expireTimeout").toInt(),
+                                              QString(),
+                                              
parameters().value("actions").toStringList()
                                              );
         setResult(rv);
     } else if (operationName() == "configureNotification") {
diff --git a/dataengines/notifications/notifications.operations 
b/dataengines/notifications/notifications.operations
index 
93b7f0c5b37e4b3a0c2379daa6e28e755e1aac03..046776ec1af981d7fb23db9ddb9bd9d34ec55300
 100644
--- a/dataengines/notifications/notifications.operations
+++ b/dataengines/notifications/notifications.operations
@@ -23,9 +23,12 @@
     <entry name="body" type="String">
       <label>The whole text of the notification</label>
     </entry>
-    <entry name="timeout" type="Int">
+    <entry name="expireTimeout" type="Int">
       <label>The timeout after which the notification will be closed</label>
     </entry>
+    <entry name="actions" type="StringList">
+      <label>List of actions in the format of [{"id": "id-of-the-action", 
"text": i18n("User visible text")}], </label>
+    </entry>
   </group>
 
   <group name="configureNotification">
diff --git a/dataengines/notifications/notificationsengine.cpp 
b/dataengines/notifications/notificationsengine.cpp
index 
37a11dd1f70bc7692112be1d51918a39682969d9..509f349278f6883f509276b59f088418469a3797
 100644
--- a/dataengines/notifications/notificationsengine.cpp
+++ b/dataengines/notifications/notificationsengine.cpp
@@ -354,20 +354,12 @@ QString 
NotificationsEngine::GetServerInformation(QString& vendor, QString& vers
     return "Plasma";
 }
 
-int NotificationsEngine::createNotification(const QString &appName, const 
QString &appIcon, const QString &summary, const QString &body, int timeout, 
bool configurable, const QString &appRealName)
+int NotificationsEngine::createNotification(const QString &appName, const 
QString &appIcon, const QString &summary,
+                                            const QString &body, int timeout, 
const QString &appRealName, const QStringList &actions)
 {
-    const QString source = QString("notification %1").arg(++m_nextId);
-    Plasma::DataEngine::Data notificationData;
-    notificationData.insert("id", QString::number(m_nextId));
-    notificationData.insert("appName", appName);
-    notificationData.insert("appIcon", appIcon);
-    notificationData.insert("summary", summary);
-    notificationData.insert("body", body);
-    notificationData.insert("expireTimeout", timeout);
-    notificationData.insert("configurable", configurable);
-    notificationData.insert("appRealName", appRealName);
-
-    setData(source, notificationData);
+    QVariantMap hints;
+    hints.insert("x-kde-appname", appRealName);
+    Notify(appName, 0, appIcon, summary, body, actions, hints, timeout);
     return m_nextId;
 }
 
diff --git a/dataengines/notifications/notificationsengine.h 
b/dataengines/notifications/notificationsengine.h
index 
d8507d0faafe065db89c1a11cd4f2ff3e741c220..7810787776206c4a74d2d831e3c8f367bfcc7618
 100644
--- a/dataengines/notifications/notificationsengine.h
+++ b/dataengines/notifications/notificationsengine.h
@@ -53,7 +53,8 @@ public:
 
     QString GetServerInformation(QString& vendor, QString& version, QString& 
specVersion);
 
-    int createNotification(const QString &appName, const QString &appIcon, 
const QString &summary, const QString &body, int timeout, bool configurable, 
const QString &appRealName);
+    int createNotification(const QString &appName, const QString &appIcon, 
const QString &summary,
+                           const QString &body, int timeout, const QString 
&appRealName, const QStringList &actions);
 
     void configureNotification(const QString &appName);
 
-- 
2.4.1

++++++ 0003-notifications-Make-sure-the-Open.-button-on-finished.patch ++++++
>From 36bd67d2d9d9e74fda52343ae7ccc5b41e5b4498 Mon Sep 17 00:00:00 2001
From: Martin Klapetek <[email protected]>
Date: Thu, 28 May 2015 17:31:15 +0200
Subject: [PATCH 3/5] [notifications] Make sure the "Open..." button on
 finished jobs still work

With the previous patch, now everything has "notification N" source
name, so there's needed another way to detect that it's a job's
notification.

Reviewed-by: Kai Uwe Broulik
---
 applets/notifications/package/contents/ui/Jobs.qml          | 2 +-
 applets/notifications/package/contents/ui/Notifications.qml | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/applets/notifications/package/contents/ui/Jobs.qml 
b/applets/notifications/package/contents/ui/Jobs.qml
index 
d16a55d9b26f966f8a5ed80439bdb780c2a8e7bf..5d68cfecef1a10c564aab508d9ea0e7cc6203b53
 100644
--- a/applets/notifications/package/contents/ui/Jobs.qml
+++ b/applets/notifications/package/contents/ui/Jobs.qml
@@ -90,7 +90,7 @@ Column {
             op["expireTimeout"] = 6000;
             op["urgency"] = 0;
             op["configurable"] = false;
-            op["actions"] = !error && UrlHelper.isUrlValid(message) ? 
[message, i18n("Open...")] : []; // If the source contains "Job", it tries to 
open the "id" value (which is "message")
+            op["actions"] = !error && UrlHelper.isUrlValid(message) ? 
["jobUrl#" + message, i18n("Open...")] : []; // If the source contains "Job", 
it tries to open the "id" value (which is "message")
 
             notifications.createNotification(op);
 
diff --git a/applets/notifications/package/contents/ui/Notifications.qml 
b/applets/notifications/package/contents/ui/Notifications.qml
index 
5571a7608c9ece18e5475bb80c5fb2accf905b6b..13be7d49a14ebbe5399a7f0bf333862f545671a2
 100644
--- a/applets/notifications/package/contents/ui/Notifications.qml
+++ b/applets/notifications/package/contents/ui/Notifications.qml
@@ -80,15 +80,16 @@ Column {
 
     function executeAction(source, id) {
         //try to use the service
-        if (source.indexOf("notification") !== -1) {
+        if (id.indexOf("jobUrl#") === -1) {
             var service = notificationsSource.serviceForSource(source)
             var op = service.operationDescription("invokeAction")
             op["actionId"] = id
 
             service.startOperationCall(op)
         //try to open the id as url
-        } else if (source.indexOf("Job") !== -1) {
-            Qt.openUrlExternally(id)
+        } else if (id.indexOf("jobUrl#") !== -1) {
+            Qt.openUrlExternally(id.slice(7));
+            notificationPositioner.closePopup(source);
         }
     }
 
-- 
2.4.1

++++++ 0004-notifications-Optimize-sending-the-notification-data.patch ++++++
>From c0276440ee8ca26cf79a08a1a4ac2ce12425c10b Mon Sep 17 00:00:00 2001
From: Martin Klapetek <[email protected]>
Date: Thu, 28 May 2015 17:32:55 +0200
Subject: [PATCH 4/5] [notifications] Optimize sending the notification data a
 bit

According to Kai:

"object literal is more performant
same with [] vs new Array()
also you should avoid putting the keys in ""
{"foo": bar} is also less performant than {foo: bar} :)"

And so I did to his bidding.

Reviewed-by: Kai Uwe Broulik
---
 applets/notifications/package/contents/ui/Jobs.qml | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/applets/notifications/package/contents/ui/Jobs.qml 
b/applets/notifications/package/contents/ui/Jobs.qml
index 
5d68cfecef1a10c564aab508d9ea0e7cc6203b53..669d0bde600c0b50197b3df06ef7cdf466042e8a
 100644
--- a/applets/notifications/package/contents/ui/Jobs.qml
+++ b/applets/notifications/package/contents/ui/Jobs.qml
@@ -80,17 +80,17 @@ Column {
                 summary = infoMessage ? i18nc("the job, which can be anything, 
failed to complete", "%1: Failed", infoMessage) : i18n("Job Failed")
             }
 
-            var op = [];
-            op["source"] = source;
-            op["appIcon"] = runningJobs[source]["appIconName"];
-            op["appName"] = runningJobs[source]["appName"];
-            op["summary"] = summary;
-            op["body"] = errorText || message;
-            op["isPersistent"] = true;
-            op["expireTimeout"] = 6000;
-            op["urgency"] = 0;
-            op["configurable"] = false;
-            op["actions"] = !error && UrlHelper.isUrlValid(message) ? 
["jobUrl#" + message, i18n("Open...")] : []; // If the source contains "Job", 
it tries to open the "id" value (which is "message")
+            var op = {
+                appIcon: runningJobs[source].appIconName,
+                appName: runningJobs[source].appName,
+                summary: summary,
+                body: errorText || message,
+                isPersistent: true,
+                expireTimeout: 6000,
+                urgency: 0,
+                configurable: false,
+                actions: !error && UrlHelper.isUrlValid(message) ? ["jobUrl#" 
+ message, i18n("Open...")] : []
+            }; // If the actionId contains "jobUrl#", it tries to open the 
"id" value (which is "message")
 
             notifications.createNotification(op);
 
-- 
2.4.1

++++++ 0005-Fix-launcher-sorting-the-by-activity-sorting-strateg.patch ++++++
>From c66f30f6ddb3420e3c2fb62e404c684d6231d264 Mon Sep 17 00:00:00 2001
From: Eike Hein <[email protected]>
Date: Thu, 28 May 2015 20:11:31 +0200
Subject: [PATCH 5/5] Fix launcher sorting the by-activity sorting strategy.

BUG:348324
---
 .../strategies/activitysortingstrategy.cpp         | 30 ++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/libtaskmanager/strategies/activitysortingstrategy.cpp 
b/libtaskmanager/strategies/activitysortingstrategy.cpp
index 
29207329b91a859219c7ce26c875d0ca0ab32efd..cfe916c7624a537da993b1f46eb41009c2d29092
 100644
--- a/libtaskmanager/strategies/activitysortingstrategy.cpp
+++ b/libtaskmanager/strategies/activitysortingstrategy.cpp
@@ -33,11 +33,36 @@ ActivitySortingStrategy::ActivitySortingStrategy(QObject 
*parent)
 
 class ActivitySortingStrategy::Comparator {
 public:
-    Comparator(QStringList *activitiesOrder) {
+    Comparator(QStringList *activitiesOrder, GroupManager *groupManager) {
         m_activitiesOrder = activitiesOrder;
+        m_groupManager = groupManager;
     }
 
     bool operator()(const AbstractGroupableItem *i1, const 
AbstractGroupableItem *i2) {
+        if (m_groupManager && m_groupManager->separateLaunchers()) {
+            if (i1->isStartupItem()) {
+                if (i2->isStartupItem()) {
+                    return i1->name().toLower() < i2->name().toLower();
+                }
+                return false;
+            }
+
+            if (i2->isStartupItem()) {
+                return true;
+            }
+
+            if (i1->itemType() == LauncherItemType) {
+                if (i2->itemType() == LauncherItemType) {
+                    return i1->name().toLower() < i2->name().toLower();
+                }
+                return true;
+            }
+
+            if (i2->itemType() == LauncherItemType) {
+                return false;
+            }
+        }
+
         if (!m_priorityCache.contains(i1->id())) {
             addToCache(i1);
         }
@@ -97,6 +122,7 @@ private:
         m_priorityCache[item->id()] = cacheEntry;
     }
 
+    GroupManager *m_groupManager;
     const QStringList *m_activitiesOrder;
     QHash<int, QList<int> > m_priorityCache;
 };
@@ -111,7 +137,7 @@ void ActivitySortingStrategy::sortItems(ItemList& items)
         checkActivitiesOrder(items);
     }
 
-    Comparator comparator(&m_activitiesOrder);
+    Comparator comparator(&m_activitiesOrder, qobject_cast<GroupManager 
*>(parent()));
 
     qStableSort(items.begin(), items.end(), comparator);
 }
-- 
2.4.1


Reply via email to