mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-09 03:18:41 -05:00
added edit mode
This commit is contained in:
parent
75cf9d6c86
commit
7cec536904
@ -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…
x
Reference in New Issue
Block a user