Fix KHMThemeFactory leaks and KHMTheme const-correctness
- Replace allocation using
new KHMTheme
inKHMThemeFactory::doTheme
andKHMThemeFactory::buildTheme
(rename togetTheme
). - Add
const
toKHMTheme
andKHMThemeFactory
member functions not modifying data. - Fix
const
usage in callers ofKHMThemeFactory::getTheme
. - Miscellaneous:
- syntax changes for iteration.
- QString comparison using operator==.
- Move local variable declaration close to first use.
Testing:
- Tested patch with local build: themes are listed and applied successfully.