From 1dfa0c415552b6c3e089abcee5b4cc1f14b65e09 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 9 Apr 2011 15:06:12 +0000 Subject: [PATCH] suspended the addDirectory function, since it s not working properly yet (no hierarchy created, download not working, etc) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4138 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/SearchDialog.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/retroshare-gui/src/gui/SearchDialog.cpp b/retroshare-gui/src/gui/SearchDialog.cpp index ebbae8dfd..f100364dd 100644 --- a/retroshare-gui/src/gui/SearchDialog.cpp +++ b/retroshare-gui/src/gui/SearchDialog.cpp @@ -328,7 +328,10 @@ void SearchDialog::download() { item = itemsForDownload.at(i); // call the download - if (!item->text(SR_HASH_COL).isEmpty() || !item->childCount()) + // + if (item->text(SR_HASH_COL).isEmpty()) // we have a folder + downloadDirectory(item, tr("")); + else { std::cerr << "SearchDialog::download() Calling File Request"; std::cerr << std::endl; @@ -337,10 +340,7 @@ void SearchDialog::download() std::string hash = item->text(SR_HASH_COL).toStdString(); getSourceFriendsForHash(hash,srcIds) ; - if(!rsFiles -> FileRequest((item->text(SR_NAME_COL)).toStdString(), - hash, - (item->text(SR_SIZE_COL)).toULongLong(), - "", RS_FILE_HINTS_NETWORK_WIDE, srcIds)) + if(!rsFiles -> FileRequest((item->text(SR_NAME_COL)).toStdString(), hash, (item->text(SR_SIZE_COL)).toULongLong(), "", RS_FILE_HINTS_NETWORK_WIDE, srcIds)) attemptDownloadLocal = true ; else { @@ -349,8 +349,6 @@ void SearchDialog::download() std::cout << *it << "-" << std::endl ; } } - else // we have a folder - downloadDirectory(item, tr("")); } if (attemptDownloadLocal) QMessageBox::information(0, tr("Download Notice"), tr("Skipping Local Files")); @@ -830,6 +828,8 @@ void SearchDialog::insertDirectory(const std::string &txt, qulonglong searchId, void SearchDialog::insertDirectory(const std::string &txt, qulonglong searchId, const DirDetails &dir) { + return ; // Remove this statement to allow adding directories to the search results. + QString sid_hexa = QString::number(searchId,16) ; QTreeWidgetItem *child = new QTreeWidgetItem(ui.searchResultWidget);