Merge pull request #2754 from csoler/v0.6-BugFixing_30

Various bug fixes
This commit is contained in:
csoler 2023-07-19 20:35:11 +02:00 committed by GitHub
commit 5c52509e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 12 deletions

View File

@ -258,7 +258,11 @@ void ElidedLabel::mousePressEvent(QMouseEvent *ev)
return; // eat event
}
QLabel::mousePressEvent(ev);
emit clicked(ev->pos());
if(ev->buttons()==Qt::RightButton)
emit rightClicked(ev->pos());
else
emit clicked(ev->pos());
}
void ElidedLabel::setTextColor(const QColor &color)

View File

@ -77,7 +77,8 @@ protected:
signals:
void elisionChanged(bool elided);
void clicked(QPoint pos);
void rightClicked(QPoint pos);
void clicked(QPoint pos);
private:
bool mElided;

View File

@ -459,14 +459,6 @@ QVariant RsMessageModel::sortRole(const Rs::Msgs::MsgInfoSummary& fmpe,int colum
case COLUMN_THREAD_SPAM: return QVariant((fmpe.msgflags & RS_MSG_SPAM)? 1:0);
case COLUMN_THREAD_TO: {
QString name;
if(GxsIdTreeItemDelegate::computeName(RsGxsId(fmpe.to.toStdString()),name))
return name;
return ""; //Not Found
}
case COLUMN_THREAD_AUTHOR:{
QString name;
@ -474,8 +466,10 @@ QVariant RsMessageModel::sortRole(const Rs::Msgs::MsgInfoSummary& fmpe,int colum
return name;
return ""; //Not Found
}
default:
return displayRole(fmpe,column);
case COLUMN_THREAD_TO: // fallthrough. In this case, the "to" field is not filled because the msg potentially has multiple destinations.
default:
return displayRole(fmpe,column);
}
}