From 644fce86dea5d0e8375b541e9e859c42a95a1a76 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 8 Feb 2018 11:14:12 +0100 Subject: [PATCH] fixed download menu from Messages --- retroshare-gui/src/gui/msgs/MessageWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/msgs/MessageWidget.cpp b/retroshare-gui/src/gui/msgs/MessageWidget.cpp index 2f00bcded..38319bafc 100644 --- a/retroshare-gui/src/gui/msgs/MessageWidget.cpp +++ b/retroshare-gui/src/gui/msgs/MessageWidget.cpp @@ -323,7 +323,7 @@ void MessageWidget::getcurrentrecommended() fi.fname = it->data().toString().toUtf8().constData(); break ; case COLUMN_FILE_SIZE: - fi.size = it->data().toULongLong() ; + fi.size = it->data(Qt::UserRole).toULongLong() ; break ; case COLUMN_FILE_HASH: fi.hash = RsFileHash(it->data().toString().toStdString()) ; @@ -502,6 +502,7 @@ void MessageWidget::fill(const std::string &msgId) QTreeWidgetItem *item = new QTreeWidgetItem; item->setText(COLUMN_FILE_NAME, QString::fromUtf8(it->fname.c_str())); item->setText(COLUMN_FILE_SIZE, misc::friendlyUnit(it->size)); + item->setData(COLUMN_FILE_SIZE, Qt::UserRole, QVariant(qulonglong(it->size)) ); item->setText(COLUMN_FILE_HASH, QString::fromStdString(it->hash.toStdString())); item->setTextAlignment( COLUMN_FILE_SIZE, Qt::AlignRight );