diff options
| author | 2015-01-30 17:00:24 -0500 | |
|---|---|---|
| committer | 2015-01-30 17:00:24 -0500 | |
| commit | e4767514ed04e6a0bddf3f4a47f5f0b09e65e0ee (patch) | |
| tree | 86cadc2137831d44fa29fd40a2964f7fb1326de4 /SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h | |
| parent | 26ddfe11c2b7fac52e5f57dcd9f5223a50b2a9a7 (diff) | |
| parent | 016003905ca0e8e459e3dc33e786beda8ec92f45 (diff) | |
Merge tag 'upstream/3.0.2'
Upstream version 3.0.2
# gpg: Signature made Fri 30 Jan 2015 05:00:11 PM EST using RSA key ID EBE9BD91
# gpg: Good signature from "Unit 193 <unit193@gmail.com>"
# gpg: aka "Unit 193 <unit193@ninthfloor.org>"
# gpg: aka "Unit 193 <unit193@ubuntu.com>"
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; } |
