mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 19:12:28 -04:00
added regexp search to turtle router
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1564 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bb7e3684f0
commit
3c09b4f2d2
19 changed files with 846 additions and 220 deletions
|
@ -412,11 +412,23 @@ void SearchDialog::advancedSearch(Expression* expression)
|
|||
|
||||
/* call to core */
|
||||
std::list<FileDetail> results;
|
||||
rsFiles -> SearchBoolExp(expression, results);
|
||||
qulonglong searchId = rand() ; // for now, because we need to call the turtle search to get a proper id.
|
||||
|
||||
/* abstraction to allow reusee of tree rendering code */
|
||||
resultsToTree((advSearchDialog->getSearchAsString()).toStdString(),searchId, results);
|
||||
// send a turtle search request
|
||||
LinearizedExpression e ;
|
||||
expression->linearize(e) ;
|
||||
|
||||
TurtleRequestId req_id = rsTurtle->turtleSearch(e) ;
|
||||
|
||||
rsFiles -> SearchBoolExp(expression, results, DIR_FLAGS_REMOTE | DIR_FLAGS_NETWORK_WIDE | DIR_FLAGS_BROWSABLE);
|
||||
|
||||
/* abstraction to allow reusee of tree rendering code */
|
||||
resultsToTree((advSearchDialog->getSearchAsString()).toStdString(),req_id, results);
|
||||
|
||||
// debug stuff
|
||||
Expression *expression2 = LinearizedExpression::toExpr(e) ;
|
||||
results.clear() ;
|
||||
rsFiles -> SearchBoolExp(expression2, results, DIR_FLAGS_REMOTE | DIR_FLAGS_NETWORK_WIDE | DIR_FLAGS_BROWSABLE);
|
||||
resultsToTree((advSearchDialog->getSearchAsString()).toStdString(),req_id+1, results);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue