summaryrefslogtreecommitdiff
path: root/fetchtopicsaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fetchtopicsaction.cpp')
-rw-r--r--fetchtopicsaction.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fetchtopicsaction.cpp b/fetchtopicsaction.cpp
index dd59b4d..31a507a 100644
--- a/fetchtopicsaction.cpp
+++ b/fetchtopicsaction.cpp
@@ -43,8 +43,8 @@ void FetchTopicsAction::handleFinishedCall()
db.transaction();
QSqlQuery query(db);
- query.prepare("INSERT OR REPLACE INTO topics (forum_id, topic_id, topic_title, topic_author_id, topic_author_name, is_subscribed, is_closed, icon_url, last_reply_time, new_post, last_update_time) "
- "VALUES (:forum_id, :topic_id, :topic_title, :topic_author_id, :topic_author_name, :is_subscribed, :is_closed, :icon_url, :last_reply_time, :new_post, :last_update_time)");
+ query.prepare("INSERT OR REPLACE INTO topics (forum_id, topic_id, topic_title, topic_author_id, topic_author_name, is_subscribed, is_closed, icon_url, last_reply_time, reply_number, new_post, last_update_time) "
+ "VALUES (:forum_id, :topic_id, :topic_title, :topic_author_id, :topic_author_name, :is_subscribed, :is_closed, :icon_url, :last_reply_time, :reply_number, :new_post, :last_update_time)");
foreach (const QVariant& topic_v, topics) {
QVariantMap topic = topic_v.toMap();
@@ -69,6 +69,7 @@ void FetchTopicsAction::handleFinishedCall()
query.bindValue(":is_closed", topic["is_closed"].toBool() ? 1 : 0);
query.bindValue(":icon_url", topic["icon_url"].toString());
query.bindValue(":last_reply_time", topic["last_reply_time"].toDateTime());
+ query.bindValue(":reply_number", topic["reply_number"].toInt());
query.bindValue(":new_post", topic["new_post"].toBool() ? 1 : 0);
query.bindValue(":last_update_time", QDateTime::currentDateTime());