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

List:       kde-commits
Subject:    extragear/graphics/digikam/libs/widgets/common
From:       Holger Foerster <hamsi2k () freenet ! de>
Date:       2010-06-30 18:11:28
Message-ID: 20100630181128.D5AD6AC8E1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1144753 by foerster:

Databasewidget : Use the index and then the associated value of the database type \
combobox instead of the text. This caused a bug, where the user was not able to \
switch to SQLite mode.

 M  +9 -3      databasewidget.cpp  
 M  +2 -1      databasewidget.h  


--- trunk/extragear/graphics/digikam/libs/widgets/common/databasewidget.cpp \
#1144752:1144753 @@ -174,10 +174,10 @@
     connect(databasePathEdit, SIGNAL(textChanged(const QString&)),
             this, SLOT(slotDatabasePathEdited(const QString&)));
 
-    connect(databaseType, SIGNAL(currentIndexChanged(const QString&)),
-            this, SLOT(setDatabaseInputFields(const QString&)));
+    connect(databaseType, SIGNAL(currentIndexChanged(int)),
+            this, SLOT(handleDBTypeIndexChanged(int)));
 
-    connect(internalServer, SIGNAL(stateChanged(int)),
+    connect(internalServer, SIGNAL(stateChanged(int index)),
             this, SLOT(slotHandleInternalServerCheckbox(int)));
 
     connect(checkDatabaseConnectionButton, SIGNAL(clicked()),
@@ -223,6 +223,12 @@
     checkDBPath();
 }
 
+void DatabaseWidget::slotHandleDBTypeIndexChanged(int index)
+{
+	const QString& dbType = databaseType->itemData(index).toString();
+	setDatabaseInputFields(dbType);
+}
+
 void DatabaseWidget::setDatabaseInputFields(const QString& currentIndexStr)
 {
     if (currentIndexStr == QString(DatabaseParameters::SQLiteDatabaseType()))
--- trunk/extragear/graphics/digikam/libs/widgets/common/databasewidget.h \
#1144752:1144753 @@ -81,12 +81,13 @@
     DatabaseParameters getDatabaseParameters();
 
     QString currentDatabaseType() const;
+    void setDatabaseInputFields(const QString&);
 
 public Q_SLOTS:
 
     void slotChangeDatabasePath(const KUrl&);
     void slotDatabasePathEdited(const QString&);
-    void setDatabaseInputFields(const QString&);
+    void slotHandleDBTypeIndexChanged(int index);
     void slotHandleInternalServerCheckbox(int enableFields);
     void checkDatabaseConnection();
 


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

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