forked from jeena/FeedTheMonkey
first working showing post
This commit is contained in:
parent
0405a8ba39
commit
cc59671ff4
6 changed files with 22 additions and 7 deletions
5
post.cpp
5
post.cpp
|
@ -1,5 +1,6 @@
|
|||
#include "post.h"
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
|
||||
Post::Post(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
@ -22,6 +23,10 @@ Post::Post(QJsonObject post, QObject *parent) : QObject(parent)
|
|||
mExcerpt = post.value("excerpt").toString().trimmed();
|
||||
mStarred = post.value("marked").toBool();
|
||||
mRead = !post.value("unread").toBool();
|
||||
|
||||
QJsonDocument doc(post);
|
||||
QString result(doc.toJson(QJsonDocument::Indented));
|
||||
mJsonString = result;
|
||||
}
|
||||
|
||||
Post::~Post()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue