From feda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 27 Jul 2018 23:51:12 -0400 Subject: New upstream version 3.2.1+dfsg1 --- SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp') diff --git a/SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp b/SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp index 201dc8b..26e2d41 100644 --- a/SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp @@ -5,7 +5,7 @@ SqlHistoryModel::SqlHistoryModel(Db* db, QObject *parent) : QueryModel(db, parent) { - static_char* query = "SELECT dbname, datetime(date, 'unixepoch'), (time_spent / 1000.0)||'s', rows, sql " + static_char* query = "SELECT id, dbname, datetime(date, 'unixepoch', 'localtime'), (time_spent / 1000.0)||'s', rows, sql " "FROM sqleditor_history ORDER BY date DESC"; setQuery(query); @@ -16,6 +16,8 @@ QVariant SqlHistoryModel::data(const QModelIndex& index, int role) const if (role == Qt::TextAlignmentRole && (index.column() == 2 || index.column() == 3)) return (int)(Qt::AlignRight|Qt::AlignVCenter); + QVariant d = QueryModel::data(index, role); + return QueryModel::data(index, role); } @@ -27,14 +29,16 @@ QVariant SqlHistoryModel::headerData(int section, Qt::Orientation orientation, i switch (section) { case 0: - return tr("Database", "sql history header"); + return ""; case 1: - return tr("Execution date", "sql history header"); + return tr("Database", "sql history header"); case 2: - return tr("Time spent", "sql history header"); + return tr("Execution date", "sql history header"); case 3: - return tr("Rows affected", "sql history header"); + return tr("Time spent", "sql history header"); case 4: + return tr("Rows affected", "sql history header"); + case 5: return tr("SQL", "sql history header"); } -- cgit v1.2.3