File 0020-Don-t-pass-immutable-properties-from-updateAction.patch of Package plasma5-workspace

From 3a97148056df256492a6ad6f3fef5423409e7cf7 Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Wed, 11 Jan 2017 19:05:52 +0000
Subject: [PATCH 20/44] Don't pass immutable properties from updateAction

Summary:
See comment at the top of createAction
Reduces the number of warnings in updateAction about unhandled
properties

Test Plan: Still works

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D4088
---
 libdbusmenuqt/dbusmenuimporter.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libdbusmenuqt/dbusmenuimporter.cpp b/libdbusmenuqt/dbusmenuimporter.cpp
index dd77b2e3..9265212d 100644
--- a/libdbusmenuqt/dbusmenuimporter.cpp
+++ b/libdbusmenuqt/dbusmenuimporter.cpp
@@ -180,7 +180,6 @@ public:
             updateActionVisible(action, value);
         } else if (key == QLatin1String("shortcut")) {
             updateActionShortcut(action, value);
-        } else if (key == QLatin1String("children-display")) {
         } else {
             qWarning() << "Unhandled property update" << key;
         }
@@ -436,7 +435,11 @@ void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher)
             menu->addAction(action);
         } else {
             action = *it;
-            d->updateAction(*it, dbusMenuItem.properties, dbusMenuItem.properties.keys());
+            QStringList filteredKeys = dbusMenuItem.properties.keys();
+            filteredKeys.removeOne("type");
+            filteredKeys.removeOne("toggle-type");
+            filteredKeys.removeOne("children-display");
+            d->updateAction(*it, dbusMenuItem.properties, filteredKeys);
         }
     }
 
-- 
2.12.0

openSUSE Build Service is sponsored by