[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/calligra/2.7] kexi/migration/mdb/src/keximdb: cleanup debug/warnings (silent)
From: Jaroslaw Staniek <staniek () kde ! org>
Date: 2013-04-30 21:30:10
Message-ID: 20130430213010.B7530A603F () git ! kde ! org
[Download RAW message or body]
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 <QString>
#include <QRegExp>
#include <QFile>
#include <QVariant>
#include <QDateTime>
#include <QList>
-#include <kdebug.h>
+
+#include <KDebug>
+#include <KLocale>
#include <kexiutils/identifier.h>
+
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).toByteArray());
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& tableName)
{
MdbTableDef *tableDef = 0;
- kDebug() << tableName;
+ //kDebug() << tableName;
// Look through each entry in the catalog...
for (unsigned int i = 0; i < m_mdb->num_catalog; i++) {
@@ -153,8 +153,7 @@ bool MDBMigrate::drv_readTableSchema(const QString& originalName,
// Get the column meta-data
MdbTableDef *tableDef = 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& originalName,
// Field name
QString fldName = 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& originalName,
KexiDB::Field *fld =
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_type);
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 = 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 = 0;
@@ -413,7 +410,7 @@ bool MDBMigrate::getPrimaryKey(KexiDB::TableSchema* table, \
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<int> key_col_num(idx->num_keys);
@@ -423,9 +420,8 @@ bool MDBMigrate::getPrimaryKey(KexiDB::TableSchema* table, \
MdbTableDef* tableDef
for (unsigned int i = 0; i < idx->num_keys; i++) {
key_col_num[i] = 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 = getTableDef(table);
if (!tableDef) {
- kDebug() << "couldn't find table "
- << table;
+ kWarning() << "couldn't find table " << table;
return false;
}
size = (qulonglong)(tableDef->num_rows);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic