mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-30 20:36:36 -05:00
fixed a few bugs in msg model and cleaned up dead code
This commit is contained in:
parent
258c544a75
commit
3419b44ec1
4 changed files with 72 additions and 627 deletions
|
|
@ -406,35 +406,17 @@ QVariant RsMessageModel::sizeHintRole(int col) const
|
|||
|
||||
QVariant RsMessageModel::authorRole(const Rs::Msgs::MsgInfoSummary& fmpe,int column) const
|
||||
{
|
||||
// if(column == COLUMN_THREAD_DATA)
|
||||
// return QVariant(QString::fromStdString(fmpe.mAuthorId.toStdString()));
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
// QVariant RsMessageModel::unreadRole(const Rs::Msgs::MsgInfoSummary& fmpe,int column) const
|
||||
// {
|
||||
// if(column == COLUMN_THREAD_UNREAD)
|
||||
// return QVariant();
|
||||
// lconst Rs::Msgs::MsgInfoSummary& fmpe,int column) const
|
||||
//
|
||||
// }
|
||||
|
||||
QVariant RsMessageModel::sortRole(const Rs::Msgs::MsgInfoSummary& fmpe,int column) const
|
||||
{
|
||||
switch(column)
|
||||
{
|
||||
case COLUMN_THREAD_DATE: return QVariant(QString::number(fmpe.ts)); // we should probably have leading zeroes here
|
||||
case COLUMN_THREAD_DATE: return QVariant(QString::number(fmpe.ts)); // we should probably have leading zeroes here
|
||||
|
||||
case COLUMN_THREAD_READ: return QVariant((bool)IS_MESSAGE_UNREAD(fmpe.msgflags));
|
||||
|
||||
case COLUMN_THREAD_READ: return QVariant((bool)IS_MESSAGE_UNREAD(fmpe.msgflags));
|
||||
// case COLUMN_THREAD_AUTHOR:
|
||||
// {
|
||||
// QString str,comment ;
|
||||
// QList<QIcon> icons;
|
||||
// GxsIdDetails::MakeIdDesc(RsGxsId(fmpe.srcId), false, str, icons, comment,GxsIdDetails::ICON_TYPE_NONE);
|
||||
//
|
||||
// return QVariant(str);
|
||||
// }
|
||||
case COLUMN_THREAD_STAR: return QVariant((fmpe.msgflags & RS_MSG_STAR)? 1:0);
|
||||
|
||||
default:
|
||||
|
|
@ -449,6 +431,7 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
|||
case COLUMN_THREAD_SUBJECT: return QVariant(QString::fromUtf8(fmpe.title.c_str()));
|
||||
case COLUMN_THREAD_ATTACHMENT:return QVariant(QString::number(fmpe.count));
|
||||
|
||||
case COLUMN_THREAD_STAR:
|
||||
case COLUMN_THREAD_READ:return QVariant();
|
||||
case COLUMN_THREAD_DATE:{
|
||||
QDateTime qtime;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue