Summary: | "Add flathub" button is useless when flathub repo is already enabled | ||
---|---|---|---|
Product: | [Applications] Discover | Reporter: | Patrick Silva <bugseforuns> |
Component: | discover | Assignee: | Dan Leinir Turthra Jensen <leinir> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aleixpol, nate |
Priority: | VHI | Keywords: | regression |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/discover/commit/4725f5040207696a83314ee29f316ee02253d3d9 | Version Fixed In: | 5.20 |
Sentry Crash Report: | |||
Attachments: | screenshot |
Can confirm. Don't think it used to be always visible in the past. Maybe something changed. Something like this outghta fix it: diff --git libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp index 8e766376..41b4eee6 100644 --- libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp +++ libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp @@ -230,7 +230,9 @@ bool FlatpakSourcesBackend::removeSource(const QString &id) QVariantList FlatpakSourcesBackend::actions() const { - return { QVariant::fromValue<QObject*>(m_flathubAction) }; + if (/*flathub not already among sources*/) { + return { QVariant::fromValue<QObject*>(m_flathubAction) }; + } } bool FlatpakSourcesBackend::listRepositories(FlatpakInstallation* installation) Now to figure out how to turn /*flathub not already among sources*/ into real code... libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp:313 sets the action to setVisible(false) when the repository is found. It's probably a regression in Kirigami, it needs fixing there. Git commit 4725f5040207696a83314ee29f316ee02253d3d9 by Aleix Pol. Committed on 13/08/2020 at 10:50. Pushed by apol into branch 'master'. Propagate QAction visibility to QML M +1 -0 discover/qml/SourcesPage.qml https://invent.kde.org/plasma/discover/commit/4725f5040207696a83314ee29f316ee02253d3d9 That commit causes Discover to reproducibly crash for me when visiting the Settings page. Before it crashes, I can see that all of the Flatpak-related actions are hidden, not just the "Add Flathub" one. this fix did not land on neon unstable yet and Discover is crashing in Settings page. reported a few days ago https://bugs.kde.org/show_bug.cgi?id=425110 Ah, must be something else. |
Created attachment 130806 [details] screenshot SUMMARY As we can see in the attached screenshot, "Add flathub" button is still present and enabled in "Settings" page of Discover even when flathub repo is already enabled. Nothing happens when we click on it. This button should be hidden or greyed out when flathub repo is already enabled. Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.19.80 KDE Frameworks Version: 5.74.0 Qt Version: 5.14.2