removed restriction about pure negative queries
This commit is contained in:
parent
8279d0f425
commit
3a6b34d24b
@ -361,28 +361,19 @@ void AdvSearch::runSearch()
|
|||||||
{
|
{
|
||||||
RefCntr<SearchData> sdata(new SearchData(conjunctCMB->currentItem() == 0 ?
|
RefCntr<SearchData> sdata(new SearchData(conjunctCMB->currentItem() == 0 ?
|
||||||
SCLT_AND : SCLT_OR));
|
SCLT_AND : SCLT_OR));
|
||||||
bool hasnotnot = false;
|
bool hasclause = false;
|
||||||
bool hasnot = false;
|
|
||||||
|
|
||||||
for (list<SearchClauseW*>::iterator it = m_clauseWins.begin();
|
for (list<SearchClauseW*>::iterator it = m_clauseWins.begin();
|
||||||
it != m_clauseWins.end(); it++) {
|
it != m_clauseWins.end(); it++) {
|
||||||
SearchDataClause *cl;
|
SearchDataClause *cl;
|
||||||
if ((cl = (*it)->getClause())) {
|
if ((cl = (*it)->getClause())) {
|
||||||
switch (cl->getTp()) {
|
|
||||||
case SCLT_EXCL: hasnot = true; break;
|
|
||||||
default: hasnotnot = true; break;
|
|
||||||
}
|
|
||||||
sdata->addClause(cl);
|
sdata->addClause(cl);
|
||||||
|
hasclause = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hasnotnot) {
|
if (!hasclause)
|
||||||
if (!hasnot)
|
return;
|
||||||
return;
|
|
||||||
QMessageBox::warning(0, "Recoll", tr("Cannot execute pure negative "
|
|
||||||
"query. Please enter common terms"
|
|
||||||
" in the 'any words' field"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (restrictFtCB->isOn() && noFiltypsLB->count() > 0) {
|
if (restrictFtCB->isOn() && noFiltypsLB->count() > 0) {
|
||||||
for (unsigned int i = 0; i < yesFiltypsLB->count(); i++) {
|
for (unsigned int i = 0; i < yesFiltypsLB->count(); i++) {
|
||||||
if (restrictCtCB->isOn()) {
|
if (restrictCtCB->isOn()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user