Git commit 846afa7cc29c7d5a5872b54e5f56d4983e6ec21d by Jaroslaw Staniek. Committed on 30/04/2013 at 23:23. Pushed by staniek into branch 'calligra/2.7'. cleanup debug/warnings GIT_SILENT M +17 -22 kexi/migration/mdb/src/keximdb/mdbmigrate.cpp http://commits.kde.org/calligra/846afa7cc29c7d5a5872b54e5f56d4983e6ec21d diff --git a/kexi/migration/mdb/src/keximdb/mdbmigrate.cpp b/kexi/migration= /mdb/src/keximdb/mdbmigrate.cpp index 343f11b..a32919a 100644 --- a/kexi/migration/mdb/src/keximdb/mdbmigrate.cpp +++ b/kexi/migration/mdb/src/keximdb/mdbmigrate.cpp @@ -20,15 +20,17 @@ = #include "mdbmigrate.h" = -#include #include #include #include #include #include -#include + +#include +#include = #include + using namespace KexiMigration; = /* This is the implementation for the MDB file import routines. */ @@ -96,7 +98,7 @@ bool MDBMigrate::drv_connect() delete [] filename; = if (!m_mdb) { - kDebug() << "mdb_open failed."; + kWarning() << "mdb_open failed."; return false; } = @@ -105,9 +107,7 @@ bool MDBMigrate::drv_connect() const QByteArray encoding(propertyValue(nonUnicodePropId).toByteAr= ray()); = mdb_set_encoding(m_mdb, encoding.constData()); - kDebug() << "non-unicode encoding set to \"" - << encoding - << '\"'; + kDebug() << "non-unicode encoding set to" << encoding; } = // Supports setting source encoding @@ -126,7 +126,7 @@ MdbTableDef* MDBMigrate::getTableDef(const QString& tab= leName) { MdbTableDef *tableDef =3D 0; = - kDebug() << tableName; + //kDebug() << tableName; = // Look through each entry in the catalog... for (unsigned int i =3D 0; i < m_mdb->num_catalog; i++) { @@ -153,8 +153,7 @@ bool MDBMigrate::drv_readTableSchema(const QString& ori= ginalName, // Get the column meta-data MdbTableDef *tableDef =3D getTableDef(originalName); if (!tableDef) { - kDebug() << "couldn't find table " - << originalName; + kWarning() << "couldn't find table" << originalName; return false; } mdb_read_columns(tableDef); @@ -168,8 +167,7 @@ bool MDBMigrate::drv_readTableSchema(const QString& ori= ginalName, = // Field name QString fldName =3D QString::fromUtf8(col->name); - kDebug() << "got column " - << fldName << '\"' << col->name; + kDebug() << "got column" << fldName << col->name; = QString fldID(KexiUtils::string2Identifier(fldName)); = @@ -177,8 +175,7 @@ bool MDBMigrate::drv_readTableSchema(const QString& ori= ginalName, KexiDB::Field *fld =3D new KexiDB::Field(fldID, type(col->col_type)); = - kDebug() << "size " - << col->col_size << " type " << type(col->col_type); + kDebug() << "size" << col->col_size << "type" << type(col->col_typ= e); fld->setCaption(fldName); tableSchema.addField(fld); } @@ -195,7 +192,7 @@ bool MDBMigrate::drv_tableNames(QStringList& tableNames) { // Try to read the catalog of database objects if (!mdb_read_catalog(m_mdb, MDB_ANY)) { - kDebug() << "couldn't read catalog"; + kWarning() << "couldn't read catalog"; return false; } = @@ -252,7 +249,7 @@ bool MDBMigrate::drv_copyTable(const QString& srcTable, { MdbTableDef *tableDef =3D getTableDef(srcTable); if (!tableDef) { - kDebug() << srcTable; + kWarning() << srcTable; return false; } = @@ -279,7 +276,7 @@ bool MDBMigrate::drv_copyTable(const QString& srcTable, = //! Copy each row into vals mdb_rewind_table(tableDef); - kDebug() << "Fetching " << tableDef->num_rows << " records"; + kDebug() << "Fetching" << tableDef->num_rows << "records"; = #ifdef KEXI_MIGRATION_MAX_ROWS_TO_IMPORT qulonglong rows =3D 0; @@ -413,7 +410,7 @@ bool MDBMigrate::getPrimaryKey(KexiDB::TableSchema* tab= le, MdbTableDef* tableDef = //! @todo: MDB index order (asc, desc) = - kDebug() << "num_keys " << idx->num_keys; + kDebug() << "num_keys" << idx->num_keys; = //! Create the KexiDB IndexSchema ... QVector key_col_num(idx->num_keys); @@ -423,9 +420,8 @@ bool MDBMigrate::getPrimaryKey(KexiDB::TableSchema* tab= le, MdbTableDef* tableDef = for (unsigned int i =3D 0; i < idx->num_keys; i++) { key_col_num[i] =3D idx->key_col_num[i]; - kDebug() << "key " << i + 1 - << " col " << key_col_num[i] - << table->field(idx->key_col_num[i] - 1)->name() + kDebug() << "key" << i + 1 << " col " << key_col_num[i] + << table->field(idx->key_col_num[i] - 1)->name() ; p_idx->addField(table->field(idx->key_col_num[i] - 1)); } @@ -452,8 +448,7 @@ bool MDBMigrate::drv_getTableSize(const QString& table,= qulonglong& size) // Get the column meta-data, which contains the table size MdbTableDef *tableDef =3D getTableDef(table); if (!tableDef) { - kDebug() << "couldn't find table " - << table; + kWarning() << "couldn't find table " << table; return false; } size =3D (qulonglong)(tableDef->num_rows);