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 /fetchpostsaction.cpp | |
parent | 28bb9f9ee55b4899204bb9f860f2cda6f90b4806 (diff) | |
download | tapasboard-427004acc6a80004f69c6ce059667465023269a9.tar.gz tapasboard-427004acc6a80004f69c6ce059667465023269a9.zip |
parse bbcode, show usernames, ....
Diffstat (limited to 'fetchpostsaction.cpp')
-rw-r--r-- | fetchpostsaction.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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)); +} |