simplified comment in GxsIdDetails and hid columns in new ForumModel

This commit is contained in:
csoler 2018-11-26 23:07:05 +01:00
parent b179cb5796
commit 73e285805e
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
4 changed files with 13 additions and 4 deletions

View File

@ -973,7 +973,7 @@ QString nickname ;
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED)
{
comment += QString("<br/>%1:%2 ").arg(QApplication::translate("GxsIdDetails", "Authentication"), QApplication::translate("GxsIdDetails", "Signed&nbsp;by"));
comment += QString("<br/>%1: ").arg(QApplication::translate("GxsIdDetails", "Node"));
if (details.mFlags & RS_IDENTITY_FLAGS_PGP_KNOWN)
{
@ -985,8 +985,8 @@ QString nickname ;
else
comment += QApplication::translate("GxsIdDetails", "unknown Key");
}
else
comment += QString("<br/>%1:&nbsp;%2").arg(QApplication::translate("GxsIdDetails", "Authentication"), QApplication::translate("GxsIdDetails", "anonymous"));
//else
// comment += QString("<br/>%1:&nbsp;%2").arg(QApplication::translate("GxsIdDetails", "Node:"), QApplication::translate("GxsIdDetails", "anonymous"));
if(details.mReputation.mFriendsPositiveVotes || details.mReputation.mFriendsNegativeVotes)
{

View File

@ -1029,6 +1029,7 @@ QModelIndex RsGxsForumModel::getIndexOfMessage(const RsGxsMessageId& mid) const
return QModelIndex();
}
#ifdef TO_REMVOVE
void RsGxsForumModel::test_iterator() const
{
const_iterator it(*this);
@ -1133,6 +1134,7 @@ RsGxsForumModel::const_iterator::operator bool() const
{
return kid >= 0;
}
#endif
static void recursPrintModel(const std::vector<ForumModelPostEntry>& entries,ForumModelIndex index,int depth)
{

View File

@ -82,6 +82,8 @@ public:
QModelIndex root() const{ return createIndex(0,0,(void*)NULL) ;}
QModelIndex getIndexOfMessage(const RsGxsMessageId& mid) const;
#ifdef TO_REMOVE
QModelIndex getNextIndex(const QModelIndex& i,bool unread_only) const;
class const_iterator
@ -101,6 +103,7 @@ public:
const RsGxsForumModel& model;
};
void test_iterator() const;
#endif
// This method will asynchroneously update the data
void setForum(const RsGxsGroupId& forumGroup);

View File

@ -350,7 +350,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
ui->newmessageButton->setText(tr("Reply"));
ui->newthreadButton->setText(tr("New thread"));
connect(ui->threadTreeWidget, SIGNAL(clicked(QModelIndex)), this, SLOT(changedThread(QModelIndex)));
//connect(ui->threadTreeWidget, SIGNAL(clicked(QModelIndex)), this, SLOT(changedThread(QModelIndex)));
connect(ui->threadTreeWidget, SIGNAL(clicked(QModelIndex)), this, SLOT(clickedThread(QModelIndex)));
connect(ui->viewBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changedViewBox()));
@ -409,6 +409,8 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
ttheader->resizeSection (RsGxsForumModel::COLUMN_THREAD_READ, 24*f);
QHeaderView_setSectionResizeModeColumn(ttheader, RsGxsForumModel::COLUMN_THREAD_READ, QHeaderView::Fixed);
ttheader->hideSection (RsGxsForumModel::COLUMN_THREAD_CONTENT);
ttheader->hideSection (RsGxsForumModel::COLUMN_THREAD_MSGID);
ttheader->hideSection (RsGxsForumModel::COLUMN_THREAD_DATA);
ui->progressBar->hide();
ui->progressText->hide();
@ -929,6 +931,8 @@ void GxsForumThreadWidget::clickedThread(QModelIndex index)
mThreadModel->getPostData(index,fmpe);
mThreadModel->setMsgReadStatus(index, IS_MSG_UNREAD(fmpe.mMsgStatus),false);
}
else
changedThread(index);
}
void GxsForumThreadWidget::calculateIconsAndFonts(QTreeWidgetItem *item, bool &hasReadChilddren, bool &hasUnreadChilddren)