diff options
| author | 2018-07-27 23:51:12 -0400 | |
|---|---|---|
| committer | 2018-07-27 23:51:12 -0400 | |
| commit | feda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 (patch) | |
| tree | 1e50f5f666f419143f510d5ded00fe2006b7bd85 /SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp | |
| parent | d9aa870e5d509cc7309ab82dd102a937ab58613a (diff) | |
New upstream version 3.2.1+dfsg1upstream/3.2.1+dfsg1
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp')
| -rw-r--r-- | SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
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"); } |
