[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kactivities] src/lib/stats: When the current activity is changed, resetting the model is more optim
From: Ivan Čukić <ivan.cukic () kde ! org>
Date: 2015-05-31 22:28:25
Message-ID: E1YzBiT-0002o5-NJ () scm ! kde ! org
[Download RAW message or body]
Git commit 7b383a09841cc38495818442aee7e20fe3a07b1c by Ivan =C4=8Cuki=C4=87.
Committed on 30/05/2015 at 11:36.
Pushed by ivan into branch 'master'.
When the current activity is changed, resetting the model is more optimal
M +6 -1 src/lib/stats/resultmodel.cpp
http://commits.kde.org/kactivities/7b383a09841cc38495818442aee7e20fe3a07b1c
diff --git a/src/lib/stats/resultmodel.cpp b/src/lib/stats/resultmodel.cpp
index d8bc6f8..66b5e9e 100644
--- a/src/lib/stats/resultmodel.cpp
+++ b/src/lib/stats/resultmodel.cpp
@@ -529,7 +529,12 @@ public:
void onCurrentActivityChanged(const QString &activity)
{
Q_UNUSED(activity);
- reload();
+ // If the current activity has changed, and
+ // the query lists items for the ':current' one,
+ // reset the model (not a simple refresh this time)
+ if (query.activities().contains(CURRENT_ACTIVITY_TAG)) {
+ fetch(FetchReset);
+ }
}
=
private:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic