summaryrefslogtreecommitdiff
path: root/fetchtopicsaction.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-04-02 00:51:58 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-04-02 00:51:58 +0200
commit427004acc6a80004f69c6ce059667465023269a9 (patch)
treebfa65471cc6411225016def30813623fdbc63f05 /fetchtopicsaction.cpp
parent28bb9f9ee55b4899204bb9f860f2cda6f90b4806 (diff)
downloadtapasboard-427004acc6a80004f69c6ce059667465023269a9.tar.gz
tapasboard-427004acc6a80004f69c6ce059667465023269a9.zip
parse bbcode, show usernames, ....
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());