mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 14:10:54 -04:00
added a spinbox to limit the number of search results (too many results may hang the gui)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2432 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d3c6e49ce4
commit
15a28b1d2e
2 changed files with 33 additions and 0 deletions
|
@ -653,6 +653,16 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue