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

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/dialogs
From:       Michael Jansen <kde () michael-jansen ! biz>
Date:       2009-02-25 22:00:20
Message-ID: 1235599220.999699.2795.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 931878 by mjansen:

exportConfiguration and importConfiguration should use a KConfigBase*
instead of a KConfig*.

 M  +20 -0     kshortcutseditor.cpp  
 M  +5 -2      kshortcutseditor.h  


--- trunk/KDE/kdelibs/kdeui/dialogs/kshortcutseditor.cpp #931877:931878
@@ -168,6 +168,15 @@
 
 void KShortcutsEditor::importConfiguration( KConfig *config)
 {
+    importConfiguration(static_cast<KConfigBase*>(config));
+}
+
+
+void KShortcutsEditor::importConfiguration( KConfigBase *config)
+{
+    Q_ASSERT(config);
+    if (!config) return;
+
     if (d->actionTypes & KShortcutsEditor::GlobalAction) {
         QString groupName = "Global Shortcuts";
         KConfigGroup group( config, groupName );
@@ -184,8 +193,18 @@
     }
 }
 
+
 void KShortcutsEditor::exportConfiguration( KConfig *config) const
 {
+    exportConfiguration(static_cast<KConfigBase*>(config));
+}
+
+
+void KShortcutsEditor::exportConfiguration( KConfigBase *config) const
+{
+    Q_ASSERT(config);
+    if (!config) return;
+
     if (d->actionTypes & KShortcutsEditor::GlobalAction) {
         QString groupName = "Global Shortcuts";
         KConfigGroup group( config, groupName );
@@ -202,6 +221,7 @@
     }
 }
 
+
 void KShortcutsEditor::writeConfiguration( KConfigGroup *config) const
 {
     foreach (KActionCollection* collection, d->actionCollections)
--- trunk/KDE/kdelibs/kdeui/dialogs/kshortcutseditor.h #931877:931878
@@ -30,6 +30,7 @@
 
 class KActionCollection;
 class KConfig;
+class KConfigBase;
 class KConfigGroup;
 class KGlobalAccel;
 class KShortcut;
@@ -177,7 +178,8 @@
      *
      * @param config Config object
      */
-    void exportConfiguration( KConfig *config) const;
+    KDE_DEPRECATED void exportConfiguration( KConfig *config) const;
+    void exportConfiguration( KConfigBase *config) const;
 
     /**
      * Import the settings from configuration @p config.
@@ -187,7 +189,8 @@
      *
      * @param config Config object
      */
-    void importConfiguration( KConfig *config);
+    KDE_DEPRECATED void importConfiguration( KConfig *config);
+    void importConfiguration( KConfigBase *config);
 
 
 Q_SIGNALS:
[prev in list] [next in list] [prev in thread] [next in thread] 

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