Fix issues with multiple instances of KMyMoneySettings
ClosedPublic

Authored by habacker on Feb 5 2018, 1:38 PM.

Details

Summary

Calling a static method from class KMyMoneyGlobalSettings inside
kmm_widgets library surprisingly creates an additional KMymoneySettings
instance, which does not reflect the recent state from the setting dialog.
The reason for this behavior is caused by duplicated implementations of
class KMymoneySettings (kmm_config, settings) and embedding the static
library kmm_config into shared libraries (kmm_mymoney, kmm_widgets and
kmm_ofximport). Each embedded copy has it's own instance of class
KMymoneySettings.

The solution for this issue, which is done with this patch, is to remove
the duplicated implementation from the settings library and to make
kmm_config a shared library.

This patch also renames kmm_config to kmm_settings and place it into it
own subdirectory to keep in sync with 5.0 branch.

CCBUG:374123
CCBUG:389631
FIXED-IN:4.8.2

Test Plan

compiled on linux

Diff Detail

Repository
R261 KMyMoney
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
habacker requested review of this revision.Feb 5 2018, 1:38 PM
habacker created this revision.

One question is if it is worth to rename this library ?

habacker updated this revision to Diff 26579.Feb 5 2018, 1:58 PM
habacker retitled this revision from Fix isssues with multiple instances of KMyMoneySettings to Fix issues with multiple instances of KMyMoneySettings.
  • fixed commit message title spelling

Did you take a look at https://phabricator.kde.org/D10161?

I did, but it is not been appliable to 4.8 branch, So I took the idea and refactored this patch accordingly. This patch is required for 4.8 because it fixes about 50 additional issues similar happens with D10310

A smaller patch for 4.8 would be to keep library name kmm_config.

tbaumgart accepted this revision as: tbaumgart.Feb 6 2018, 2:53 PM

Looks OK to me.

This revision is now accepted and ready to land.Feb 6 2018, 2:53 PM
This revision was automatically updated to reflect the committed changes.