https://bugs.kde.org/show_bug.cgi?id=425275

            Bug ID: 425275
           Summary: Come up with a better way of marking actions as hidden
           Product: Discover
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Flatpak Backend
          Assignee: lei...@leinir.dk
          Reporter: n...@kde.org
                CC: aleix...@kde.org, jgrul...@redhat.com
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to