From 427004acc6a80004f69c6ce059667465023269a9 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Tue, 2 Apr 2013 00:51:58 +0200 Subject: parse bbcode, show usernames, .... --- fetchtopicsaction.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fetchtopicsaction.cpp') 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()); -- cgit v1.2.3