Commit 0f9b4f8b authored by Łukasz Wojniłowicz's avatar Łukasz Wojniłowicz
Browse files

Specify the config file before construction time

It seems that KMyMoneySettings aren't as shared as I thought. It seems
that call to KMyMoneySettings in every translational unit uses different
instance.
Remaining at old code would require to create instance of config file in
every translational unit in which KMyMoneySettings is used and not only
in main function. That misses the point, so config filename is hardcoded
as before in kcfg file.

BUG:388640
FIXED-IN:5.0
parent 6d07feae
......@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
<kcfgfile arg="true"/>
<kcfgfile name="kmymoney/kmymoneyrc"/>
<group name="General Options">
<entry name="AlwaysShowNrField" type="Bool">
<label>Always show a No. field in transaction form</label>
......
......@@ -39,8 +39,6 @@
#include <KLocalizedString>
#include <KMessageBox>
#include <Kdelibs4ConfigMigrator>
#include <KConfig>
#include <KSharedConfig>
// ----------------------------------------------------------------------------
// Project Includes
......@@ -364,5 +362,4 @@ static void migrateConfigFiles()
}
}
KConfig::setMainConfigName(sMainConfigSubdirectory + sMainConfigName); // otherwise it would be ~/.config/kmymoneyrc and not ~/.config/kmymoney/kmymoneyrc
KMyMoneySettings::instance(KSharedConfig::openConfig().data()->name()); // kcfg settings file should be kmymoneyrc, so define it here in one place instead in kmymoney.kcfg
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment