Commit df676d49 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

Avanced search in "Any Clause" mode: directory filter would not filter but add an ORed clause!

--HG--
branch : RECOLL_1_21_MAINT
parent a609f16b
......@@ -424,9 +424,19 @@ void AdvSearch::runSearch()
if (!subtreeCMB->currentText().isEmpty()) {
QString current = subtreeCMB->currentText();
sdata->addClause(new Rcl::SearchDataClausePath(
(const char*)current.toLocal8Bit(),
direxclCB->isChecked()));
Rcl::SearchDataClausePath *pathclause =
new Rcl::SearchDataClausePath((const char*)current.toLocal8Bit(),
direxclCB->isChecked());
if (sdata->getTp() == SCLT_AND) {
sdata->addClause(pathclause);
} else {
RefCntr<SearchData> nsdata(new SearchData(SCLT_AND, stemLang));
nsdata->addClause(new Rcl::SearchDataClauseSub(sdata));
nsdata->addClause(pathclause);
sdata = nsdata;
}
// Keep history clean and sorted. Maybe there would be a
// simpler way to do this
list<QString> entries;
......@@ -447,6 +457,7 @@ void AdvSearch::runSearch()
for (int index = 0; index < subtreeCMB->count(); index++)
prefs.asearchSubdirHist.push_back(subtreeCMB->itemText(index));
}
saveCnf();
g_advshistory && g_advshistory->push(sdata);
emit startSearch(sdata, false);
......
......@@ -152,7 +152,9 @@ public:
{
m_tp = tp;
}
SClType getTp() {
return m_tp;
}
void setMaxExpand(int max)
{
m_softmaxexpand = max;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment