Skip to content

Fix KHMThemeFactory leaks and KHMTheme const-correctness

  • Replace allocation using new KHMTheme in KHMThemeFactory::doTheme and KHMThemeFactory::buildTheme (rename to getTheme).
  • Add const to KHMTheme and KHMThemeFactory member functions not modifying data.
  • Fix const usage in callers of KHMThemeFactory::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.

Merge request reports