- User Since
- May 29 2018, 7:48 PM (97 w, 11 h)
Feb 4 2020
Feb 3 2020
Not sure it's my place to do so, but I'd like to make a small comment.
Instead of passing mode around and all the if statements, wouldn't it be better to have a single decision point in main.cpp, like a factory class?
Use polymorphism and create something like InfoCenter : CommonParent, SystemSettings : CommonParent, each knowing how to initialize their KAboutData, GUI elements, icons etc.?
And in main.cpp do something like CommonParent * commonParent = new InfoCenter() // or new SystemSettings() and use that instead of mode.
Further down the road, if you need to add something to system settings, you could do it in the SystemSettings class maybe and not have to add another if to remove it from the InfoCenter part. Just a thought, not sure if it fits.