mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 03:49:29 -04:00
Optimized some small things in TransferDialog and SearchDialog.
Changed the parameter of the constructor of ftFileCreator and ftFileProvider and some methods of ftTransferModule from "std::string" to "const std::string&" git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4045 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
61b57ede65
commit
db19db7e60
8 changed files with 40 additions and 33 deletions
|
@ -334,16 +334,17 @@ void SearchDialog::download()
|
|||
std::cerr << std::endl;
|
||||
std::list<std::string> srcIds;
|
||||
|
||||
getSourceFriendsForHash((item->text(SR_HASH_COL)).toStdString(),srcIds) ;
|
||||
std::string hash = item->text(SR_HASH_COL).toStdString();
|
||||
getSourceFriendsForHash(hash,srcIds) ;
|
||||
|
||||
if(!rsFiles -> FileRequest((item->text(SR_NAME_COL)).toStdString(),
|
||||
(item->text(SR_HASH_COL)).toStdString(),
|
||||
hash,
|
||||
(item->text(SR_SIZE_COL)).toULongLong(),
|
||||
"", RS_FILE_HINTS_NETWORK_WIDE, srcIds))
|
||||
attemptDownloadLocal = true ;
|
||||
else
|
||||
{
|
||||
std::cout << "isuing file request from search dialog: -" << (item->text(SR_NAME_COL)).toStdString() << "-" << (item->text(SR_HASH_COL)).toStdString() << "-" << (item->text(SR_SIZE_COL)).toULongLong() << "-ids=" ;
|
||||
std::cout << "isuing file request from search dialog: -" << (item->text(SR_NAME_COL)).toStdString() << "-" << hash << "-" << (item->text(SR_SIZE_COL)).toULongLong() << "-ids=" ;
|
||||
for(std::list<std::string>::const_iterator it(srcIds.begin());it!=srcIds.end();++it)
|
||||
std::cout << *it << "-" << std::endl ;
|
||||
}
|
||||
|
@ -365,17 +366,19 @@ void SearchDialog::downloadDirectory(const QTreeWidgetItem *item, const QString
|
|||
+ "/" + base + "/";
|
||||
QString cleanPath = QDir::cleanPath(path);
|
||||
|
||||
getSourceFriendsForHash((item->text(SR_HASH_COL)).toStdString(),srcIds) ;
|
||||
std::string hash = item->text(SR_HASH_COL).toStdString();
|
||||
|
||||
getSourceFriendsForHash(hash,srcIds) ;
|
||||
|
||||
rsFiles->FileRequest(item->text(SR_NAME_COL).toStdString(),
|
||||
item->text(SR_HASH_COL).toStdString(),
|
||||
hash,
|
||||
item->text(SR_SIZE_COL).toULongLong(),
|
||||
cleanPath.toStdString(),RS_FILE_HINTS_NETWORK_WIDE, srcIds);
|
||||
|
||||
std::cout << "SearchDialog::downloadDirectory(): "\
|
||||
"issuing file request from search dialog: -"
|
||||
<< (item->text(SR_NAME_COL)).toStdString()
|
||||
<< "-" << (item->text(SR_HASH_COL)).toStdString()
|
||||
<< "-" << hash
|
||||
<< "-" << (item->text(SR_SIZE_COL)).toULongLong()
|
||||
<< "-ids=" ;
|
||||
for(std::list<std::string>::const_iterator it(srcIds.begin());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue