Avanced search in "Any Clause" mode: directory filter would not filter but add an ORed clause! Fixes issue #269
This commit is contained in:
parent
0183b8cbb8
commit
3c9248d28a
2 changed files with 18 additions and 3 deletions
|
@ -424,9 +424,20 @@ void AdvSearch::runSearch()
|
||||||
|
|
||||||
if (!subtreeCMB->currentText().isEmpty()) {
|
if (!subtreeCMB->currentText().isEmpty()) {
|
||||||
QString current = subtreeCMB->currentText();
|
QString current = subtreeCMB->currentText();
|
||||||
sdata->addClause(new Rcl::SearchDataClausePath(
|
|
||||||
(const char*)current.toLocal8Bit(),
|
Rcl::SearchDataClausePath *pathclause =
|
||||||
direxclCB->isChecked()));
|
new Rcl::SearchDataClausePath((const char*)current.toLocal8Bit(),
|
||||||
|
direxclCB->isChecked());
|
||||||
|
if (sdata->getTp() == SCLT_AND) {
|
||||||
|
sdata->addClause(pathclause);
|
||||||
|
} else {
|
||||||
|
STD_SHARED_PTR<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
|
// Keep history clean and sorted. Maybe there would be a
|
||||||
// simpler way to do this
|
// simpler way to do this
|
||||||
list<QString> entries;
|
list<QString> entries;
|
||||||
|
|
|
@ -150,6 +150,10 @@ public:
|
||||||
m_tp = tp;
|
m_tp = tp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SClType getTp() {
|
||||||
|
return m_tp;
|
||||||
|
}
|
||||||
|
|
||||||
void setMaxExpand(int max)
|
void setMaxExpand(int max)
|
||||||
{
|
{
|
||||||
m_softmaxexpand = max;
|
m_softmaxexpand = max;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue