Bug 492557

Summary: Splash screen installed from KDE Store is not available for selection until the KCM is reopened
Product: [Applications] systemsettings Reporter: Patrick Silva <bugseforuns>
Component: kcm_splashscreenAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: nate
Priority: NOR    
Version: 6.1.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

Description Patrick Silva 2024-09-02 19:09:04 UTC
STEPS TO REPRODUCE
1. open Splash Screen KCM
2. click on "Get new..." button
3. install a splash screen - I installed "Endeavour Lightbulb"
4. close "Get new..." window

OBSERVED RESULT
the splash screen installed in the step 3 is not listed (and Breeze is listed 2 or 3 times).
The splash screen installed in the step 3 is listed after reopening the KCM.

EXPECTED RESULT
the installed splash screen is available for selection immediately after the last step

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-09-05 20:31:14 UTC
Can mostly reproduce. What I actually see is that a new entry gets created in the KCM immediately, but it's a duplicate of "Breeze". Leaving the KCM and coming back restores it to its true form.
Comment 2 Bug Janitor Service 2024-09-20 14:31:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kpackage/-/merge_requests/98
Comment 3 Bug Janitor Service 2024-09-20 14:34:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knewstuff/-/merge_requests/335
Comment 4 Bug Janitor Service 2024-09-20 14:39:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2535
Comment 5 David Edmundson 2024-09-27 07:59:33 UTC
Git commit d3953a0220a571dcb84239bc21bbd93d062ed47e by David Edmundson, on behalf of Marco Martin.
Committed on 27/09/2024 at 07:59.
Pushed by davidedmundson into branch 'master'.

kcms/ksplash: Correctly remove entries when uninstalled via kns

QFileInfo::fileName() is empty if the path ends with a /,
manage the case when entry.installedFiles() is adirectory

depends on https://invent.kde.org/frameworks/kpackage/-/merge_requests/98
and https://invent.kde.org/frameworks/knewstuff/-/merge_requests/335

M  +2    -1    kcms/ksplash/kcm.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/d3953a0220a571dcb84239bc21bbd93d062ed47e
Comment 6 Bug Janitor Service 2024-09-27 08:11:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2556
Comment 7 David Edmundson 2024-09-27 08:22:40 UTC
Git commit 7e2e5087921b882365ce903b4e2f7caf18147545 by David Edmundson, on behalf of David Edmundson.
Committed on 27/09/2024 at 08:11.
Pushed by davidedmundson into branch 'Plasma/6.2'.

kcms/ksplash: Correctly remove entries when uninstalled via kns

QFileInfo::fileName() is empty if the path ends with a /,
manage the case when entry.installedFiles() is adirectory

depends on https://invent.kde.org/frameworks/kpackage/-/merge_requests/98
and https://invent.kde.org/frameworks/knewstuff/-/merge_requests/335


(cherry picked from commit d3953a0220a571dcb84239bc21bbd93d062ed47e)

6875fde4 Correctly remove entries when uninstalled via kns

Co-authored-by: Marco Martin <notmart@gmail.com>

M  +2    -1    kcms/ksplash/kcm.cpp

https://invent.kde.org/plasma/plasma-desktop/-/commit/7e2e5087921b882365ce903b4e2f7caf18147545
Comment 8 Marco Martin 2024-09-27 15:08:24 UTC
Git commit cdf14b11ef914e3304b0171b91a61c2388d0b7ee by Marco Martin.
Committed on 27/09/2024 at 15:08.
Pushed by mart into branch 'master'.

Don't double emit emitResult()

setupNotificationsOnJobFinished connects to jobThreadFinished and in
there emitResult() is called, so avoid a second connection that would
lead to a double emitted signal.

connect to installPathChanged before connecting to jobThreadFinished.
Signal order matters here, as some client code relies that the package
path() to already be the final "correct" one when the job finishes

together with https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2535

M  +6    -6    src/kpackage/packagejob.cpp

https://invent.kde.org/frameworks/kpackage/-/commit/cdf14b11ef914e3304b0171b91a61c2388d0b7ee
Comment 9 Marco Martin 2024-09-27 15:17:35 UTC
Git commit 1210fa8c0cea78737467c40e8439b1d51f2778b5 by Marco Martin.
Committed on 27/09/2024 at 15:17.
Pushed by mart into branch 'master'.

Don't emit twice slotEntryChanged

Don't connect KNSCore::Installation::signalEntryChanged as
is already forwarded to Transaction, which in turn is forwarded
to our slotEntryChanged, so avoids a double emission

This fixes double entries created after installing something with KNS

depends on https://invent.kde.org/frameworks/kpackage/-/merge_requests/98

M  +58   -0    autotests/core/knewstuffenginetest.cpp
M  +1    -0    src/core/transaction.cpp
M  +2    -1    src/qtquick/quickengine.cpp

https://invent.kde.org/frameworks/knewstuff/-/commit/1210fa8c0cea78737467c40e8439b1d51f2778b5
Comment 10 Patrick Silva 2024-10-12 20:16:04 UTC
It's still reproducible with the provided steps.

Operating System: Arch Linux 
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Graphics Platform: Wayland
Comment 11 Patrick Silva 2024-10-14 19:49:07 UTC
Cannot reproduce after updating to frameworks 6.7.

Operating System: Arch Linux 
KDE Plasma Version: 6.2.0
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.3
Graphics Platform: Wayland