Rename ConfigManager's directory functions
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
The function names in ConfigManager are misleading.
`userSf2Dir` returns the *default directory* for sf2s. `sf2Dir` returns the *user's configured directory*. This is backwards, and the same applies for ladspa and gig. `userVstDir`, on the other hand, returns the configured VST directory (as does `vstDir`. How consistent.).
I propose the following naming scheme:
- `userXDir` should only be used for the directories directly configured by the user, i.e. the ones that `return m_xDir`. Optionally drop `user` here, but IMO it makes it clearer what the function returns,
- Applies to: `userVstDir`, `artworkDir`, `gigDir`, `sf2Dir`, `vstDir`, `ladspaDir`
- defaultXDir should be used for the default, generated directories within the user's working directory, i.e. the ones that `return workingDir() + X_PATH`.
- Applies to: `userProjectsDir`, `userTemplateDir`, `userPresetsDir`, `userSamplesDir`, `userGigDir`, `userSf2Dir`, `userLadspaDir`
- `factoryXDir` should be used for factory locations (included samples/theme/etc).
`defaultArtworkDir` already follows this scheme. `artworkDir` would just need a `user` prefix. `backgroundArtwork` can become something like `userBackgroundArt` in keeping with the `user` prefix.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating ConfigManager and every declaration and call site for the listed directory functions, then compare each function's returned path with the proposed user, default, and factory naming. Rename the functions consistently, update their references, and verify that the project still builds with the corrected directory semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100