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

            Bug ID: 391465
           Summary: number of columns show by default is hardcoded
           Product: muon
           Version: 5.6
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: muon
          Assignee: echidna...@kubuntu.org
          Reporter: silh...@gmail.com
                CC: silh...@gmail.com
  Target Milestone: ---

When new columns have been added (Installed-Size, Version, Available-Version),
they have been hidden by default in order to keep the UI the same as before.
But their order is assumed and their number if hardcoded in
`PackageWidget.cpp`.

> For the record: I think the actual way to write this smartly is to have 
> PackageModel::headerData implement a UserRole that returns an enum value. 
> The enum would be the header types. Then you iter all columns and hide the 
> headers based on their enum value. Which means nothing needs hardcoding and 
> should more columns get added later the switch cases handling would light up 
> in compiler warnings so no one can forget to handle the new headers to either 
> hide or show by default.
> 
> -- https://phabricator.kde.org/D10877

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

Reply via email to