[BUG] changes saved with KConfig are not know by KConfigGroup

Willy De la Court Willy.DelaCourt at pandora.be
Wed Feb 12 17:07:59 GMT 2003


Hi All,

when a configuration change is saved with KConfig class
eg in component chooser changing the TerminalApplication
---------------------------------
	KConfig *config = new KConfig("kdeglobals");
	config->setGroup("General");
	
config->writeEntry("TerminalApplication",terminalCB->isChecked()?"konsole":terminalLE->text(), 
true, true);
	config->sync();
---------------------------------
the changes are saved correctly
but those changes are not seen KGlobal::config()
in the same session
---------------------------------
	KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
	QString preferredTerminal = 
confGroup.readEntry(QString::fromLatin1("TerminalApplication"), 
QString::fromLatin1("konsole"));
	preferredTerminal += QString::fromLatin1(" -e ");
---------------------------------

any sollution to this problem or should the source of all programs that use 
kdeglobals be changed to use KConfigGroup with KGlobal::config()

-- 
Simple things make people happy.
Willy De la Court





More information about the kde-core-devel mailing list