ngraham added a comment.
In D26895#605255 <https://phabricator.kde.org/D26895#605255>, @ovichiro wrote: > 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. Sounds sensible. Would you like to submit a patch? REPOSITORY R124 System Settings REVISION DETAIL https://phabricator.kde.org/D26895 To: mart, #plasma, davidedmundson Cc: ngraham, ovichiro, meven, davidedmundson, broulik, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart