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, .... --- fetchpostsaction.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'fetchpostsaction.cpp') diff --git a/fetchpostsaction.cpp b/fetchpostsaction.cpp index 16802fa..426f766 100644 --- a/fetchpostsaction.cpp +++ b/fetchpostsaction.cpp @@ -63,7 +63,7 @@ void FetchPostsAction::handleFinishedCall() query.bindValue(":topic_id", topic_id); query.bindValue(":post_id", post_id); query.bindValue(":post_title", unencodePostText(post["post_title"])); - query.bindValue(":post_content", unencodePostText(post["post_content"])); + query.bindValue(":post_content", unencodePostContent(post["post_content"])); query.bindValue(":post_author_id", post["post_author_id"].toInt()); query.bindValue(":post_author_name", unencodePostText(post["post_author_name"])); query.bindValue(":can_edit", post["can_edit"].toBool() ? 1 : 0); @@ -96,3 +96,8 @@ QString FetchPostsAction::unencodePostText(const QVariant &v) QByteArray ba = v.toByteArray(); return QString::fromUtf8(ba.constData(), ba.length()); } + +QString FetchPostsAction::unencodePostContent(const QVariant &v) +{ + return _board->bbcodeToRichText(unencodePostText(v)); +} -- cgit v1.2.3