aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp')
-rw-r--r--SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.cpp14
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");
}