Skip to content
Snippets Groups Projects
Commit e967f81f authored by Lyndon Brown's avatar Lyndon Brown Committed by Hugo Beauzée-Luyssen
Browse files

config: lookup cat from subcat

having `set_category()` + `set_subcategory()` pairs of calls to setup the
location in the preferences tree where a plugin node needs to be attached
to, with corresponding pairs of option records in the plugin option sets,
is silly, inefficient and bug prone. all we need is the subcat records
and we can look up the corresponding cat from the data table when it
comes to time to build the tree.

here we take a step forward to address this, adding cat data to the subcat
data table, and a lookup function making use of it.

note, qt and macos tree construction are done a little differently from
each other, so while the change here is entirely sufficient to rid the core
option set of category hints as far as the macos code is concerned, more
work in a subsequent commit will be needed for qt. thus the purge of
`set_category()` must be postponed for a later commit and so for now we
must just ignore those records.

a subcat table entry was added for `SUBCAT_HIDDEN` since for now the qt
code could potentially look this up and we should preserve the existing
behaviour for it for now.
parent b12d45d1
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment