Bug 416762 - New GHNS window shows non-updateable addons even if "Updateable only" is selected
Summary: New GHNS window shows non-updateable addons even if "Updateable only" is sele...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-knewstuff
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.66.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-25 20:16 UTC by Patrick Silva
Modified: 2020-05-06 15:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.71


Attachments
screenshot (465.91 KB, image/png)
2020-01-25 20:16 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-01-25 20:16:33 UTC
Created attachment 125413 [details]
screenshot

SUMMARY
Summary says by itself. See the attached screenshot please.
GHNS windows of Global themes, Plasma Styles and Color schemes are also affected. 

Operating System: Arch Linux 
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.0
Comment 1 Dan Leinir Turthra Jensen 2020-01-27 10:36:08 UTC
That does look not entirely right. It seems to be equating "Updateable Only" with "Installed", which of course is not right. Hoping that this is just a comparison fault somewhere ;)
Comment 2 Dan Leinir Turthra Jensen 2020-05-05 14:20:16 UTC
So further investigation and it turns out that some assumptions made while i worked on the Qt Quick dialog (specifically, that the old dialog already supported showing only entries with updates, and that thus this functionality would already work) were incorrect. I'm working on a patch to fix this issue. Also discovered that we might easily end up having more than one entry with the same information, so also fixing that while we're at it.
Comment 3 Dan Leinir Turthra Jensen 2020-05-06 08:43:09 UTC
Git commit 25d391c6f36b16a9c4f685de1e6e8d1a5d9d71b4 by Dan Leinir Turthra Jensen.
Committed on 06/05/2020 at 08:43.
Pushed by leinir into branch 'master'.

Fix showing updates when the option is selected

Summary:
This patch primarily fixes the issue that when picking the "Updateable Only" option on NewStuff.Page, we would be shown all the entries anyway. It also fixes duplicated entries on the "Installed Only" option, and further adds a little placeholder for when the view is expectedly empty.

* Use the right connections for update entry display
* While potentially expensive, only add entries to the model once
* Use Kirigami.PlaceholderMessage to show we have no entries when we don't

Test Plan:
Without this patch, behaviour is as shown in https://bugs.kde.org/show_bug.cgi?id=416762

With this patch, the behaviour is as expected (shows only updateable entries with that option selected, only shows installed entries once with that option, and shows a useful message when the list is empty and expected to be empty)

Reviewers: #knewstuff, #plasma, bugseforuns, ngraham, #frameworks

Reviewed By: ngraham

Subscribers: alex, kde-frameworks-devel

Tags: #frameworks, #plasma, #knewstuff

Differential Revision: https://phabricator.kde.org/D29447

M  +15   -12   src/core/itemsmodel.cpp
M  +11   -1    src/qtquick/qml/Page.qml
M  +10   -1    src/qtquick/quickitemsmodel.cpp

https://commits.kde.org/knewstuff/25d391c6f36b16a9c4f685de1e6e8d1a5d9d71b4