From 030bc46d2679376868353cc0cc310927ac503d93 Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 18 Jul 2023 15:15:21 +0200 Subject: [PATCH 1/2] fixed sorting of TO column in Sent mails --- retroshare-gui/src/gui/msgs/MessageModel.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/retroshare-gui/src/gui/msgs/MessageModel.cpp b/retroshare-gui/src/gui/msgs/MessageModel.cpp index a19087dc0..771fd6874 100644 --- a/retroshare-gui/src/gui/msgs/MessageModel.cpp +++ b/retroshare-gui/src/gui/msgs/MessageModel.cpp @@ -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); } } From 10feb45bce53890e9a66b92cdec1ec219d16e385 Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 18 Jul 2023 20:03:46 +0200 Subject: [PATCH 2/2] fixed Board posts links copy on right-click --- retroshare-gui/src/gui/common/ElidedLabel.cpp | 6 +++++- retroshare-gui/src/gui/common/ElidedLabel.h | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/common/ElidedLabel.cpp b/retroshare-gui/src/gui/common/ElidedLabel.cpp index 31351b08d..bd86be9bd 100644 --- a/retroshare-gui/src/gui/common/ElidedLabel.cpp +++ b/retroshare-gui/src/gui/common/ElidedLabel.cpp @@ -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) diff --git a/retroshare-gui/src/gui/common/ElidedLabel.h b/retroshare-gui/src/gui/common/ElidedLabel.h index 9290a61d1..2faa2f0ef 100644 --- a/retroshare-gui/src/gui/common/ElidedLabel.h +++ b/retroshare-gui/src/gui/common/ElidedLabel.h @@ -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;