| Summary: |
Come up with a better way of marking actions as hidden |
| Product: |
[Applications] Discover
|
Reporter: |
Nate Graham <nate> |
| Component: |
Flatpak Backend | Assignee: |
Dan Leinir Turthra Jensen <leinir> |
| Status: |
RESOLVED
FIXED
|
|
|
| Severity: |
normal
|
CC: |
aleixpol, jgrulich
|
| Priority: |
NOR
|
|
|
| Version First Reported In: |
unspecified | |
|
| Target Milestone: |
--- | |
|
| Platform: |
Other | |
|
| OS: |
Linux | |
|
|
Latest Commit:
|
https://invent.kde.org/plasma/discover/commit/a6d227780189e33d9d96b1d9f0423ec99e9570a2
|
Version Fixed/Implemented In:
|
|
|
Sentry Crash Report:
|
|
| |
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.