mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 04:14:27 -04:00
corrected bug in MessageDialog: friendly size was could not be properly converted into a real file size. We should not use it.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2414 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7cba8b3b6b
commit
92dbbe8f99
1 changed files with 7 additions and 3 deletions
|
@ -473,7 +473,7 @@ void MessagesDialog::getcurrentrecommended()
|
||||||
{
|
{
|
||||||
case 0: f.fname = it->data().toString().toStdString() ;
|
case 0: f.fname = it->data().toString().toStdString() ;
|
||||||
break ;
|
break ;
|
||||||
case 1: f.size = it->data().toString().toInt() ;
|
case 1: f.size = it->data().toULongLong() ;
|
||||||
break ;
|
break ;
|
||||||
case 3: f.hash = it->data().toString().toStdString() ;
|
case 3: f.hash = it->data().toString().toStdString() ;
|
||||||
break ;
|
break ;
|
||||||
|
@ -482,7 +482,11 @@ void MessagesDialog::getcurrentrecommended()
|
||||||
}
|
}
|
||||||
|
|
||||||
for(std::map<int,FileInfo>::const_iterator it(files.begin());it!=files.end();++it)
|
for(std::map<int,FileInfo>::const_iterator it(files.begin());it!=files.end();++it)
|
||||||
|
{
|
||||||
|
const FileInfo& f(it->second) ;
|
||||||
|
std::cout << "Requesting file " << f.fname << ", size=" << f.size << ", hash=" << f.hash << std::endl ;
|
||||||
rsFiles -> FileRequest(it->second.fname,it->second.hash,it->second.size, "", 0, srcIds);
|
rsFiles -> FileRequest(it->second.fname,it->second.hash,it->second.size, "", 0, srcIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -852,7 +856,7 @@ void MessagesDialog::insertMsgTxtAndFiles(QModelIndex Index)
|
||||||
item -> setText(0, QString::fromStdString(it->fname));
|
item -> setText(0, QString::fromStdString(it->fname));
|
||||||
//std::cerr << "Msg FileItem(" << it->fname.length() << ") :" << it->fname << std::endl;
|
//std::cerr << "Msg FileItem(" << it->fname.length() << ") :" << it->fname << std::endl;
|
||||||
|
|
||||||
item -> setText(1, misc::friendlyUnit(it->size)); /* (1) Size */
|
item -> setText(1, QString::number(it->size)); /* (1) Size */
|
||||||
item -> setText(2, QString::number(0)); /* (2) Rank */ // what is this ???
|
item -> setText(2, QString::number(0)); /* (2) Rank */ // what is this ???
|
||||||
item -> setText(3, QString::fromStdString(it->hash));
|
item -> setText(3, QString::fromStdString(it->hash));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue