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:
csoler 2010-02-24 14:25:23 +00:00
parent 7cba8b3b6b
commit 92dbbe8f99

View File

@ -473,7 +473,7 @@ void MessagesDialog::getcurrentrecommended()
{
case 0: f.fname = it->data().toString().toStdString() ;
break ;
case 1: f.size = it->data().toString().toInt() ;
case 1: f.size = it->data().toULongLong() ;
break ;
case 3: f.hash = it->data().toString().toStdString() ;
break ;
@ -482,7 +482,11 @@ void MessagesDialog::getcurrentrecommended()
}
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);
}
}
#if 0
@ -852,7 +856,7 @@ void MessagesDialog::insertMsgTxtAndFiles(QModelIndex Index)
item -> setText(0, QString::fromStdString(it->fname));
//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(3, QString::fromStdString(it->hash));
@ -1327,4 +1331,4 @@ void MessagesDialog::toggleclearButton()
ui.clearButton->show();
}
}
}