|
a/src/qtgui/advsearch_w.cpp |
|
b/src/qtgui/advsearch_w.cpp |
|
... |
|
... |
359 |
using namespace Rcl;
|
359 |
using namespace Rcl;
|
360 |
void AdvSearch::runSearch()
|
360 |
void AdvSearch::runSearch()
|
361 |
{
|
361 |
{
|
362 |
RefCntr<SearchData> sdata(new SearchData(conjunctCMB->currentItem() == 0 ?
|
362 |
RefCntr<SearchData> sdata(new SearchData(conjunctCMB->currentItem() == 0 ?
|
363 |
SCLT_AND : SCLT_OR));
|
363 |
SCLT_AND : SCLT_OR));
|
364 |
bool hasnotnot = false;
|
|
|
365 |
bool hasnot = false;
|
364 |
bool hasclause = false;
|
366 |
|
365 |
|
367 |
for (list<SearchClauseW*>::iterator it = m_clauseWins.begin();
|
366 |
for (list<SearchClauseW*>::iterator it = m_clauseWins.begin();
|
368 |
it != m_clauseWins.end(); it++) {
|
367 |
it != m_clauseWins.end(); it++) {
|
369 |
SearchDataClause *cl;
|
368 |
SearchDataClause *cl;
|
370 |
if ((cl = (*it)->getClause())) {
|
369 |
if ((cl = (*it)->getClause())) {
|
371 |
switch (cl->getTp()) {
|
|
|
372 |
case SCLT_EXCL: hasnot = true; break;
|
|
|
373 |
default: hasnotnot = true; break;
|
|
|
374 |
}
|
|
|
375 |
sdata->addClause(cl);
|
370 |
sdata->addClause(cl);
|
|
|
371 |
hasclause = true;
|
376 |
}
|
372 |
}
|
377 |
}
|
373 |
}
|
378 |
if (!hasnotnot) {
|
374 |
if (!hasclause)
|
379 |
if (!hasnot)
|
|
|
380 |
return;
|
375 |
return;
|
381 |
QMessageBox::warning(0, "Recoll", tr("Cannot execute pure negative "
|
376 |
|
382 |
"query. Please enter common terms"
|
|
|
383 |
" in the 'any words' field"));
|
|
|
384 |
return;
|
|
|
385 |
}
|
|
|
386 |
if (restrictFtCB->isOn() && noFiltypsLB->count() > 0) {
|
377 |
if (restrictFtCB->isOn() && noFiltypsLB->count() > 0) {
|
387 |
for (unsigned int i = 0; i < yesFiltypsLB->count(); i++) {
|
378 |
for (unsigned int i = 0; i < yesFiltypsLB->count(); i++) {
|
388 |
if (restrictCtCB->isOn()) {
|
379 |
if (restrictCtCB->isOn()) {
|
389 |
QString qcat = yesFiltypsLB->item(i)->text();
|
380 |
QString qcat = yesFiltypsLB->item(i)->text();
|
390 |
map<QString,QString>::const_iterator qit;
|
381 |
map<QString,QString>::const_iterator qit;
|