diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index 8bce9d0..b61a5c0 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 4 16:20:20 UTC 2016 - hrvoje.senjan@gmail.com + +- Added reset-the-model-on-list-always-shown-hide-change.patch + (kde#357627, kde#352055) + ------------------------------------------------------------------- Tue Jan 26 22:20:18 UTC 2016 - hrvoje.senjan@gmail.com diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index 25a1663..4a83b93 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -35,6 +35,7 @@ Patch1: create_kdehome.patch # PATCH-FIX_OPENSUSE fix-breeze-sddm-theme-with-many-users.patch alarrosa@suse.com -- Asks for user/password and hide the user list when there's a large number of users Patch2: fix-breeze-sddm-theme-with-many-users.patch # PATCHES 100-200 and above are from upstream 5.5 branch +Patch100: reset-the-model-on-list-always-shown-hide-change.patch # PATCHES 201-300 and above are from upstream master/5.6 branch BuildRequires: kf5-filesystem BuildRequires: update-desktop-files @@ -203,6 +204,7 @@ workspace. Development files. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch100 -p1 %build %cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=share/locale/kf5 diff --git a/reset-the-model-on-list-always-shown-hide-change.patch b/reset-the-model-on-list-always-shown-hide-change.patch new file mode 100644 index 0000000..5ad0b68 --- /dev/null +++ b/reset-the-model-on-list-always-shown-hide-change.patch @@ -0,0 +1,74 @@ +From 42a3d8accd4e494d343954ddaa916a6c618d94f3 Mon Sep 17 00:00:00 2001 +From: Marco Martin +Date: Wed, 3 Feb 2016 15:36:31 +0100 +Subject: [PATCH 1/1] reset the model on list always shown/hide change + +something really wrong is going on on the proxymodel updates +the wrong item gets removed from the list. +it may be a wrong mapping between source and dest model +(doesn't seem so) +or may have been some misguided attempt by QML to recycle delegates + +anyways resetting the model in some conditions even if expensive +seems to be the only way to workaround this. +Anyways this systray implementation is beyond any repair and +the rewritten version won't have to rely on so many models +and proxymodels + +BUG:357627 +CCBUG:352055 +--- + applets/systemtray/plugin/tasksproxymodel.cpp | 13 ++++++++++--- + applets/systemtray/plugin/tasksproxymodel.h | 5 ++++- + 2 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/applets/systemtray/plugin/tasksproxymodel.cpp b/applets/systemtray/plugin/tasksproxymodel.cpp +index 632e84b..b93b05e 100644 +--- a/applets/systemtray/plugin/tasksproxymodel.cpp ++++ b/applets/systemtray/plugin/tasksproxymodel.cpp +@@ -50,9 +50,9 @@ void TasksProxyModel::setHost(Host *host) + + connect(m_host, &Host::taskStatusChanged, this, &TasksProxyModel::invalidateFilter); + connect(m_host, &Host::shownCategoriesChanged, this, &TasksProxyModel::invalidateFilter); +- connect(m_host, &Host::showAllItemsChanged, this, &TasksProxyModel::invalidateFilter); +- connect(m_host, &Host::forcedHiddenItemsChanged, this, &TasksProxyModel::invalidateFilter); +- connect(m_host, &Host::forcedShownItemsChanged, this, &TasksProxyModel::invalidateFilter); ++ connect(m_host, &Host::showAllItemsChanged, this, &TasksProxyModel::reset); ++ connect(m_host, &Host::forcedHiddenItemsChanged, this, &TasksProxyModel::reset); ++ connect(m_host, &Host::forcedShownItemsChanged, this, &TasksProxyModel::reset); + } + + invalidateFilter(); +@@ -74,6 +74,13 @@ void TasksProxyModel::setCategory(Category category) + } + } + ++void TasksProxyModel::reset() ++{ ++ beginResetModel(); ++ invalidateFilter(); ++ endResetModel(); ++} ++ + bool TasksProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const + { + Q_UNUSED(sourceParent); +diff --git a/applets/systemtray/plugin/tasksproxymodel.h b/applets/systemtray/plugin/tasksproxymodel.h +index 70e723a..5799d62 100644 +--- a/applets/systemtray/plugin/tasksproxymodel.h ++++ b/applets/systemtray/plugin/tasksproxymodel.h +@@ -56,7 +56,10 @@ public: + + virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; + +-signals: ++private Q_SLOTS: ++ void reset(); ++ ++Q_SIGNALS: + void hostChanged(); + void categoryChanged(); + void countChanged(); +-- +2.6.2 +