Bug 476148 - Header bar says "0 items" while viewing plasma/app addons
Summary: Header bar says "0 items" while viewing plasma/app addons
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: KNewStuff Backend (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-10-27 12:46 UTC by Patrick Silva
Modified: 2024-01-25 16:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.10


Attachments
screenshot (172.00 KB, image/png)
2023-10-27 12:46 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-10-27 12:46:25 UTC
Created attachment 162589 [details]
screenshot

STEPS TO REPRODUCE
1. open Discover
2. click on Application addons" or "Plasma addons" in the sidebar
3. 

OBSERVED RESULT
the header bar says "0 items". Please see the attached screenshot.

EXPECTED RESULT
correct number of addons

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.6.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-10-27 15:20:10 UTC
Can reproduce.
Comment 2 Bug Janitor Service 2023-11-08 04:39:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/686
Comment 3 Bug Janitor Service 2023-11-09 22:25:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/687
Comment 4 Bug Janitor Service 2023-11-24 17:24:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/698
Comment 5 ratijas 2023-11-24 17:26:31 UTC
Git commit 576e460ade383da789727066929d14baa248aa02 by ivan tkachenko.
Committed on 24/11/2023 at 18:25.
Pushed by ratijas into branch 'master'.

Refactor roughCount into an atomic QGadget, fix usage of i18np

i18np's first argument should be a valid number. Meanwhile roughCount
was a string. Instead we should pass the original number as the
plural-deciding argument, while using the formatted string only for the
actual substitution.

It is only natural to factor out the counter into a gadget class of its
own, since all of its properties (and their semantics like the
`roughCount.length > 0` special case) change atomically and thus do not
require separate connections.

Also, let's store the Timer inline, instead of allocating dynamically.

M  +1    -0    discover/DiscoverDeclarativePlugin.cpp
M  +7    -8    discover/qml/ApplicationsListPage.qml
M  +34   -13   libdiscover/resources/ResourcesProxyModel.cpp
M  +27   -4    libdiscover/resources/ResourcesProxyModel.h

https://invent.kde.org/plasma/discover/-/commit/576e460ade383da789727066929d14baa248aa02
Comment 6 ratijas 2023-11-24 18:08:50 UTC
Git commit da234287041afdeaa68205a978385472267705ec by ivan tkachenko.
Committed on 24/11/2023 at 18:25.
Pushed by ratijas into branch 'Plasma/5.27'.

Refactor roughCount into an atomic QGadget, fix usage of i18np

i18np's first argument should be a valid number. Meanwhile roughCount
was a string. Instead we should pass the original number as the
plural-deciding argument, while using the formatted string only for the
actual substitution.

It is only natural to factor out the counter into a gadget class of its
own, since all of its properties (and their semantics like the
`roughCount.length > 0` special case) change atomically and thus do not
require separate connections.

Also, let's store the Timer inline, instead of allocating dynamically.

(cherry picked from commit 576e460ade383da789727066929d14baa248aa02)
(and adapted to Qt 5)

M  +1    -0    discover/DiscoverDeclarativePlugin.cpp
M  +8    -9    discover/qml/ApplicationsListPage.qml
M  +34   -13   libdiscover/resources/ResourcesProxyModel.cpp
M  +29   -4    libdiscover/resources/ResourcesProxyModel.h

https://invent.kde.org/plasma/discover/-/commit/da234287041afdeaa68205a978385472267705ec