[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    [Patch] KMainWindow::saveMainWindowSettings not saving toolbar in
From:       Eduardo Robles Elvira <edulix () gmail ! com>
Date:       2008-04-07 22:28:21
Message-ID: 200804080028.32381.edulix () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


Hello!

I've found a quite trivial to fix bug in KMainWindow. The problem is that even 
thought saveMainWindowSettings() takes a KConfigGroup as an argument, it 
saves the toolbar settings in new top-level config groups instead of saving 
them in subgroups of the given config group. The patch is attached and it's 
quite trivial (I changed just two lines).

Should I commit? (I assume it should also be backported to 4.0 tree too)

Greetings,
         Eduardo Robles Elvira.
-- 
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man." (George Bernard Shaw)

["mainwindow.patch" (text/x-diff)]

Index: widgets/kmainwindow.cpp
===================================================================
--- widgets/kmainwindow.cpp	(revisiĆ³n: 794450)
+++ widgets/kmainwindow.cpp	(copia de trabajo)
@@ -640,7 +640,7 @@
         group = (toolbar->objectName().isEmpty() ? QString::number(n) : QString(" \
")+toolbar->objectName());  group.prepend(" Toolbar");
         group.prepend(configGroup);
-        KConfigGroup groupGrp(cg.config(), group);
+        KConfigGroup groupGrp(&cg, group);
         toolbar->saveSettings(groupGrp);
         n++;
     }
@@ -735,7 +735,7 @@
            group.prepend(" Toolbar");
            group.prepend(configGroup);
         }
-        KConfigGroup configGroup(cg.config(), group);
+        KConfigGroup configGroup(&cg, group);
         toolbar->applySettings(configGroup, force);
         n++;
     }


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic