From 016003905ca0e8e459e3dc33e786beda8ec92f45 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 30 Jan 2015 17:00:07 -0500 Subject: Imported Upstream version 3.0.2 --- SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h') diff --git a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h index e35e038..c521bfa 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h +++ b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h @@ -7,6 +7,7 @@ #include "common/unused.h" #include "db/sqlerrorcodes.h" #include "db/sqlerrorresults.h" +#include "log.h" #include #include #include @@ -195,7 +196,7 @@ bool AbstractDb2::openInternal() if (errMsg) { - dbErrorMessage = tr("Could not open database: %1").arg(QString::fromUtf8(errMsg)); + dbErrorMessage = QObject::tr("Could not open database: %1").arg(QString::fromUtf8(errMsg)); sqlite_freemem(errMsg); } return false; @@ -570,6 +571,8 @@ bool AbstractDb2::Query::execInternal(const QList& args) ReadWriteLocker locker(&(db->dbOperLock), query, Dialect::Sqlite2, flags.testFlag(Db::Flag::NO_LOCK)); + logSql(db.data(), query, args, flags); + QueryWithParamCount queryWithParams = getQueryWithParamCount(query, Dialect::Sqlite2); QString singleStr = replaceNamedParams(queryWithParams.first); @@ -604,6 +607,8 @@ bool AbstractDb2::Query::execInternal(const QHash& args) ReadWriteLocker locker(&(db->dbOperLock), query, Dialect::Sqlite2, flags.testFlag(Db::Flag::NO_LOCK)); + logSql(db.data(), query, args, flags); + QueryWithParamNames queryWithParams = getQueryWithParamNames(query, Dialect::Sqlite2); QString singleStr = replaceNamedParams(queryWithParams.first); @@ -788,7 +793,7 @@ int AbstractDb2::Query::fetchNext() if (!rowAvailable || !stmt) { - setError(SQLITE_MISUSE, tr("Result set expired or no row available.")); + setError(SQLITE_MISUSE, QObject::tr("Result set expired or no row available.")); return SQLITE_MISUSE; } -- cgit v1.2.3