diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-04-02 00:51:58 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-04-02 00:51:58 +0200 |
commit | 427004acc6a80004f69c6ce059667465023269a9 (patch) | |
tree | bfa65471cc6411225016def30813623fdbc63f05 /fetchtopicsaction.cpp | |
parent | 28bb9f9ee55b4899204bb9f860f2cda6f90b4806 (diff) | |
download | tapasboard-427004acc6a80004f69c6ce059667465023269a9.tar.gz tapasboard-427004acc6a80004f69c6ce059667465023269a9.zip |
parse bbcode, show usernames, ....
Diffstat (limited to 'fetchtopicsaction.cpp')
-rw-r--r-- | fetchtopicsaction.cpp | 5 |
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()); |