diff options
| author | 2015-01-30 17:00:07 -0500 | |
|---|---|---|
| committer | 2015-01-30 17:00:07 -0500 | |
| commit | 016003905ca0e8e459e3dc33e786beda8ec92f45 (patch) | |
| tree | 34aba2d2e0d66fbf2c3821ee8358f56e40c4c95e /SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h | |
| parent | 724c012ada23ef480c61fe99e3c9784b91aeb1ca (diff) | |
Imported Upstream version 3.0.2upstream/3.0.2
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h')
| -rw-r--r-- | SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h index 89c3d96..7a84ec2 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h +++ b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h @@ -8,6 +8,7 @@ #include "services/collationmanager.h" #include "sqlitestudio.h" #include "db/sqlerrorcodes.h" +#include "log.h" #include <QThread> #include <QPointer> #include <QDebug> @@ -352,7 +353,7 @@ bool AbstractDb3<T>::openInternal() if (handle) T::close(handle); - dbErrorMessage = tr("Could not open database: %1").arg(extractLastError()); + dbErrorMessage = QObject::tr("Could not open database: %1").arg(extractLastError()); dbErrorCode = res; return false; } @@ -372,7 +373,7 @@ bool AbstractDb3<T>::closeInternal() int res = T::close(dbHandle); if (res != T::OK) { - dbErrorMessage = tr("Could not close database: %1").arg(extractLastError()); + dbErrorMessage = QObject::tr("Could not close database: %1").arg(extractLastError()); dbErrorCode = res; qWarning() << "Error closing database. That's weird:" << dbErrorMessage; return false; @@ -854,6 +855,8 @@ bool AbstractDb3<T>::Query::execInternal(const QList<QVariant>& args) return false; ReadWriteLocker locker(&(db->dbOperLock), query, Dialect::Sqlite3, flags.testFlag(Db::Flag::NO_LOCK)); + logSql(db.data(), query, args, flags); + QueryWithParamCount queryWithParams = getQueryWithParamCount(query, Dialect::Sqlite3); int res; @@ -890,6 +893,7 @@ bool AbstractDb3<T>::Query::execInternal(const QHash<QString, QVariant>& args) return false; ReadWriteLocker locker(&(db->dbOperLock), query, Dialect::Sqlite3, flags.testFlag(Db::Flag::NO_LOCK)); + logSql(db.data(), query, args, flags); QueryWithParamNames queryWithParams = getQueryWithParamNames(query, Dialect::Sqlite3); @@ -1075,7 +1079,7 @@ int AbstractDb3<T>::Query::fetchNext() if (!rowAvailable || !stmt) { - setError(T::MISUSE, tr("Result set expired or no row available.")); + setError(T::MISUSE, QObject::tr("Result set expired or no row available.")); return T::MISUSE; } |
