aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-01-30 17:00:24 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-01-30 17:00:24 -0500
commite4767514ed04e6a0bddf3f4a47f5f0b09e65e0ee (patch)
tree86cadc2137831d44fa29fd40a2964f7fb1326de4 /SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h
parent26ddfe11c2b7fac52e5f57dcd9f5223a50b2a9a7 (diff)
parent016003905ca0e8e459e3dc33e786beda8ec92f45 (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/abstractdb2.h')
-rw-r--r--SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h9
1 files changed, 7 insertions, 2 deletions
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 <sqlite.h>
#include <QThread>
#include <QPointer>
@@ -195,7 +196,7 @@ bool AbstractDb2<T>::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<T>::Query::execInternal(const QList<QVariant>& 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<T>::Query::execInternal(const QHash<QString, QVariant>& 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<T>::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;
}