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

List:       kde-commits
Subject:    kdelibs/kdecore
From:       Benjamin Meyer <benjamin () csh ! rit ! edu>
Date:       2003-02-26 18:31:57
[Download RAW message or body]

CVS commit by bmeyer: 

Re aranged the constructor and added a new construcotr


  M +21 -14    kautoconfig.cpp   1.5
  M +4 -2      kautoconfig.h   1.5


--- kdelibs/kdecore/kautoconfig.cpp  #1.4:1.5
@@ -35,9 +35,10 @@ public:
   // Widgets to not get properties on (QLabel etc)
   QAsciiDict<int> ignoreTheseWidgets;
-};
 
-KAutoConfig::KAutoConfig(QObject *parent, const char *name,
-                         KConfig *kconfig) :
-                         QObject(parent, name), config(kconfig) {
+  void init(){
+    ignoreTheseWidgets.insert("QLabel", new int(1));             
+    ignoreTheseWidgets.insert("QFrame", new int(2));
+    ignoreTheseWidgets.insert("QGroupBox", new int(3));
+    ignoreTheseWidgets.setAutoDelete(true);
   
   static bool defaultKDEPropertyMapInstalled = false;
@@ -46,11 +47,17 @@ KAutoConfig::KAutoConfig(QObject *parent
     defaultKDEPropertyMapInstalled = true;
   }
+  }
+};
   
+KAutoConfig::KAutoConfig(KConfig *kconfig, QObject *parent, const char *name) :
+                         QObject(parent, name), config(kconfig) {
   d = new KAutoConfigPrivate();
+  d->init();  
+};
   
-  d->ignoreTheseWidgets.insert("QLabel", new int(1));            
-  d->ignoreTheseWidgets.insert("QFrame", new int(2));
-  d->ignoreTheseWidgets.insert("QGroupBox", new int(3));
-  d->ignoreTheseWidgets.setAutoDelete(true);
+KAutoConfig::KAutoConfig(QObject *parent, const char *name) :
+                         QObject(parent, name), config(KGlobal::config()) {
+  d = new KAutoConfigPrivate();
+  d->init();
 };
 

--- kdelibs/kdecore/kautoconfig.h  #1.4:1.5
@@ -96,6 +96,8 @@ public:
    *        where a dialog only has widgets that arn't of the default type.
    */ 
-  KAutoConfig(QObject *parent=0, const char *name=0,
-              KConfig *kconfig = KGlobal::config());    
+  KAutoConfig(KConfig *kconfig = KGlobal::config(),
+                 QObject *parent=0, const char *name=0);        
+  
+  KAutoConfig(QObject *parent=0, const char *name=0);
   
   /**


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

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