mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-14 18:34:29 -05:00
put the max result test at a more appropriate place in the code
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2454 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a516d53a5b
commit
9d6173a1ee
@ -653,16 +653,6 @@ void SearchDialog::searchKeywords()
|
||||
|
||||
void SearchDialog::updateFiles(qulonglong search_id,FileDetail file)
|
||||
{
|
||||
static std::map<qulonglong,uint32_t> nb_results ;
|
||||
|
||||
if(nb_results.find(search_id) == nb_results.end())
|
||||
nb_results[search_id] = 0 ;
|
||||
|
||||
if(nb_results[search_id] >= ui._max_results_SB->value())
|
||||
return ;
|
||||
else
|
||||
++nb_results[search_id] ;
|
||||
|
||||
/* which extensions do we use? */
|
||||
std::string txt = ui.lineEdit->text().toStdString();
|
||||
#ifdef DEBUG
|
||||
@ -861,6 +851,17 @@ void SearchDialog::insertFile(const std::string& txt,qulonglong searchId, const
|
||||
// 1.1 - If yes, just increment the result number.
|
||||
// 2.2 - Otherwize, add an entry.
|
||||
//
|
||||
//
|
||||
static std::map<qulonglong,uint32_t> nb_results ;
|
||||
|
||||
if(nb_results.find(searchId) == nb_results.end())
|
||||
nb_results[searchId] = 0 ;
|
||||
|
||||
if(nb_results[searchId] >= ui._max_results_SB->value())
|
||||
return ;
|
||||
else
|
||||
++nb_results[searchId] ;
|
||||
|
||||
|
||||
// 1 - look in result window whether the file already exists.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user