mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 11:54:22 -04:00
Added new method to GxsFeedItem to set content with QVariant.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7477 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3458cdc8fc
commit
e588b25b67
6 changed files with 36 additions and 3 deletions
|
@ -73,7 +73,17 @@ GxsChannelPostItem::GxsChannelPostItem(FeedHolder *parent, uint32_t feedId, cons
|
|||
loadPost(post);
|
||||
}
|
||||
|
||||
bool GxsChannelPostItem::setPost(const RsGxsChannelPost &post)
|
||||
void GxsChannelPostItem::setContent(const QVariant &content)
|
||||
{
|
||||
if (!content.canConvert<RsGxsChannelPost>()) {
|
||||
return;
|
||||
}
|
||||
|
||||
RsGxsChannelPost post = content.value<RsGxsChannelPost>();
|
||||
setContent(post);
|
||||
}
|
||||
|
||||
bool GxsChannelPostItem::setContent(const RsGxsChannelPost &post)
|
||||
{
|
||||
if (groupId() != post.mMeta.mGroupId || messageId() != post.mMeta.mMsgId) {
|
||||
std::cerr << "GxsChannelPostItem::setPost() - Wrong id, cannot set post";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue