using KConfigGroupSave in kmainwindow
Tobias Koenig
tokoe at kde.org
Sun Jan 19 16:29:10 GMT 2003
On Sun, Jan 19, 2003 at 04:25:09PM +0100, Simon Hausmann wrote:
> On Sun, Jan 19, 2003 at 04:12:53PM +0100, Tobias Koenig wrote:
Hi Simon,
> > if (!configGroup.isEmpty())
> > - config->setGroup(configGroup);
> > + KConfigGroupSaver(config, configGroup);
> >
> > restoreWindowSize(config);
>
> I doubt this patch works as expected because the KGS is first
> constructed and then destructed right after that, with the relevant
> code not being executed inbetween.
Arghh... I should stop hacking and get some sleep :|
Is the attached patch ok?
Ciao,
Tobias
--
In a world without walls and fences who
needs Windows and Gates???
-------------- next part --------------
Index: kmainwindow.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kmainwindow.cpp,v
retrieving revision 1.89
diff -u -b -p -r1.89 kmainwindow.cpp
--- kmainwindow.cpp 13 Dec 2002 14:26:43 -0000 1.89
+++ kmainwindow.cpp 19 Jan 2003 16:25:46 -0000
@@ -704,8 +704,7 @@ void KMainWindow::applyMainWindowSetting
QStrList entryList;
int i = 0; // Number of entries in list
- if (!configGroup.isEmpty())
- config->setGroup(configGroup);
+ KConfigGroupSaver( config, !configGroup.isEmpty() ? configGroup : config->group() );
restoreWindowSize(config);
More information about the kde-core-devel
mailing list