mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
added edit mode
This commit is contained in:
parent
75cf9d6c86
commit
7cec536904
1 changed files with 8 additions and 8 deletions
|
@ -275,14 +275,6 @@ QModelIndex RsPostedPostsModel::parent(const QModelIndex& index) const
|
||||||
return QModelIndex(); // there's no hierarchy here. So nothing to do!
|
return QModelIndex(); // there's no hierarchy here. So nothing to do!
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt::ItemFlags RsPostedPostsModel::flags(const QModelIndex& index) const
|
|
||||||
{
|
|
||||||
if (!index.isValid())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return QAbstractItemModel::flags(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
quintptr RsPostedPostsModel::getChildRef(quintptr ref,int index) const
|
quintptr RsPostedPostsModel::getChildRef(quintptr ref,int index) const
|
||||||
{
|
{
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
|
@ -433,6 +425,14 @@ bool operator<(const RsPostedPost& p1,const RsPostedPost& p2)
|
||||||
return p1.mMeta.mPublishTs > p2.mMeta.mPublishTs;
|
return p1.mMeta.mPublishTs > p2.mMeta.mPublishTs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Qt::ItemFlags RsPostedPostsModel::flags(const QModelIndex& index) const
|
||||||
|
{
|
||||||
|
if (!index.isValid())
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return QAbstractItemModel::flags(index) | Qt::ItemIsEditable;
|
||||||
|
}
|
||||||
|
|
||||||
void RsPostedPostsModel::setPosts(const RsPostedGroup& group, std::vector<RsPostedPost>& posts)
|
void RsPostedPostsModel::setPosts(const RsPostedGroup& group, std::vector<RsPostedPost>& posts)
|
||||||
{
|
{
|
||||||
preMods();
|
preMods();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue