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

List:       kde-commits
Subject:    kdenonbeta/keximdb/src/keximdb
From:       Martin Ellis <martin.ellis () kdemail ! net>
Date:       2005-06-11 19:50:54
Message-ID: 1118519454.034986.9181.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 424402 by martin:

Use the newly installed string2Identifier for table
and column names.

CCMAIL: info@peter-thomassen.de



 M  +3 -11     mdbmigrate.cpp  


--- trunk/kdenonbeta/keximdb/src/keximdb/mdbmigrate.cpp #424401:424402
@@ -34,8 +34,7 @@
 #include <qvaluelist.h>
 #include <kdebug.h>
 
-#include <string.h>
-
+#include <kexiutils/identifier.h>
 using namespace KexiMigration;
 
 /* This is the implementation for the MDB file import routines. */
@@ -127,11 +126,7 @@
 /*! Get the types and properties for each column. */
 bool MDBMigrate::drv_readTableSchema(const QString table)
 {
-//! @todo add option for this?
-//! @todo move Kexi::string2Identifier to kexidb (it's in kexicore now)
-//  const QString tableID( Kexi::string2Identifier(table).lower() );
-  // Er, Kexi can't read in the db table unless we .lower()
-  const QString tableID(table.lower());
+  const QString tableID( KexiUtils::string2Identifier(table) );
   m_table = new KexiDB::TableSchema(tableID);
   m_table->setCaption(table);
 
@@ -157,10 +152,7 @@
     kdDebug() << "MDBMigrate::drv_readTableSchema: got column "
         << fldName << "\"" << col->name << endl;
 
-//! @todo Use const QString fldID( Kexi::string2Identifier(fldName).lower() );
-//  Needs string2Identifier to be installed in KexiDB devel files.
-//  For now, at least change spaces to '_'
-    QString fldID(fldName.lower().replace(" ", "_"));
+    QString fldID( KexiUtils::string2Identifier(fldName) );
 
     // Field type
     KexiDB::Field *fld = 
[prev in list] [next in list] [prev in thread] [next in thread] 

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