libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp:311 for(const QVariant& act: theActions) { QAction* action = qobject_cast<QAction*>(act.value<QObject*>()); if (action->toolTip() == id) { action->setEnabled(false); action->setVisible(false); } } Comparing the id to the tooltip text (which then has to be untranslated) is of a hacky way of making the action not show up. It's abusing the tooltip text and there's also no code comment to explain this. Let's come up with a better way of hiding actions that's ideally self-documenting and opens the door to being able to set user-friendly tooltips that are translated.
Git commit a6d227780189e33d9d96b1d9f0423ec99e9570a2 by Aleix Pol. Committed on 01/12/2020 at 19:38. Pushed by apol into branch 'master'. flatpak: Improve tooltip in the "Add Flathub" button M +3 -2 libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.cpp https://invent.kde.org/plasma/discover/commit/a6d227780189e33d9d96b1d9f0423ec99e9570a2