backport systray applets not shown workaround (kde#352055)

epel9
Rex Dieter 9 years ago
parent 80905785ca
commit a6a9a90234

@ -0,0 +1,74 @@
From 42a3d8accd4e494d343954ddaa916a6c618d94f3 Mon Sep 17 00:00:00 2001
From: Marco Martin <notmart@gmail.com>
Date: Wed, 3 Feb 2016 15:36:31 +0100
Subject: [PATCH] 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.5.0

@ -7,7 +7,7 @@
Name: plasma-workspace Name: plasma-workspace
Summary: Plasma workspace, applications and applets Summary: Plasma workspace, applications and applets
Version: 5.5.4 Version: 5.5.4
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
URL: https://projects.kde.org/plasma-workspace URL: https://projects.kde.org/plasma-workspace
@ -40,6 +40,7 @@ Patch14: plasma-workspace-5.5.0-plasmawayland_desktop.patch
Patch1: kde-runtime-4.9.0-installdbgsymbols.patch Patch1: kde-runtime-4.9.0-installdbgsymbols.patch
## upstream Patches ## upstream Patches
Patch101: 0001-reset-the-model-on-list-always-shown-hide-change.patch
## master branch Patches ## master branch Patches
@ -340,6 +341,8 @@ Requires: qt5-qttools
%prep %prep
%setup -q %setup -q
%patch101 -p1 -b .0001
%patch1 -p1 -b .installdbgsymbols %patch1 -p1 -b .installdbgsymbols
%patch10 -p1 -b .konsole-in-contextmenu %patch10 -p1 -b .konsole-in-contextmenu
%if 0%{?fedora} > 21 %if 0%{?fedora} > 21
@ -562,6 +565,9 @@ fi
%changelog %changelog
* Thu Feb 04 2016 Rex Dieter <rdieter@fedoraproject.org> 5.5.4-2
- backport systray applets not shown workaround (kde#352055)
* Wed Jan 27 2016 Daniel Vrátil <dvratil@fedoraproject.org> - 5.5.4-1 * Wed Jan 27 2016 Daniel Vrátil <dvratil@fedoraproject.org> - 5.5.4-1
- Plasma 5.5.4 - Plasma 5.5.4

Loading…
Cancel
Save