|
a/src/qtgui/advsearch_w.cpp |
|
b/src/qtgui/advsearch_w.cpp |
|
... |
|
... |
358 |
|
358 |
|
359 |
using namespace Rcl;
|
359 |
using namespace Rcl;
|
360 |
void AdvSearch::runSearch()
|
360 |
void AdvSearch::runSearch()
|
361 |
{
|
361 |
{
|
362 |
string stemLang = prefs.stemlang();
|
362 |
string stemLang = prefs.stemlang();
|
363 |
STD_SHARED_PTR<SearchData> sdata(new SearchData(conjunctCMB->currentIndex() == 0 ?
|
363 |
std::shared_ptr<SearchData> sdata(new SearchData(conjunctCMB->currentIndex() == 0 ?
|
364 |
SCLT_AND : SCLT_OR, stemLang));
|
364 |
SCLT_AND : SCLT_OR, stemLang));
|
365 |
bool hasclause = false;
|
365 |
bool hasclause = false;
|
366 |
|
366 |
|
367 |
for (vector<SearchClauseW*>::iterator it = m_clauseWins.begin();
|
367 |
for (vector<SearchClauseW*>::iterator it = m_clauseWins.begin();
|
368 |
it != m_clauseWins.end(); it++) {
|
368 |
it != m_clauseWins.end(); it++) {
|
|
... |
|
... |
425 |
new Rcl::SearchDataClausePath((const char*)current.toLocal8Bit(),
|
425 |
new Rcl::SearchDataClausePath((const char*)current.toLocal8Bit(),
|
426 |
direxclCB->isChecked());
|
426 |
direxclCB->isChecked());
|
427 |
if (sdata->getTp() == SCLT_AND) {
|
427 |
if (sdata->getTp() == SCLT_AND) {
|
428 |
sdata->addClause(pathclause);
|
428 |
sdata->addClause(pathclause);
|
429 |
} else {
|
429 |
} else {
|
430 |
STD_SHARED_PTR<SearchData>
|
430 |
std::shared_ptr<SearchData>
|
431 |
nsdata(new SearchData(SCLT_AND, stemLang));
|
431 |
nsdata(new SearchData(SCLT_AND, stemLang));
|
432 |
nsdata->addClause(new Rcl::SearchDataClauseSub(sdata));
|
432 |
nsdata->addClause(new Rcl::SearchDataClauseSub(sdata));
|
433 |
nsdata->addClause(pathclause);
|
433 |
nsdata->addClause(pathclause);
|
434 |
sdata = nsdata;
|
434 |
sdata = nsdata;
|
435 |
}
|
435 |
}
|
|
... |
|
... |
460 |
}
|
460 |
}
|
461 |
|
461 |
|
462 |
|
462 |
|
463 |
// Set up fields from existing search data, which must be compatible
|
463 |
// Set up fields from existing search data, which must be compatible
|
464 |
// with what we can do...
|
464 |
// with what we can do...
|
465 |
void AdvSearch::fromSearch(STD_SHARED_PTR<SearchData> sdata)
|
465 |
void AdvSearch::fromSearch(std::shared_ptr<SearchData> sdata)
|
466 |
{
|
466 |
{
|
467 |
if (sdata->m_tp == SCLT_OR)
|
467 |
if (sdata->m_tp == SCLT_OR)
|
468 |
conjunctCMB->setCurrentIndex(1);
|
468 |
conjunctCMB->setCurrentIndex(1);
|
469 |
else
|
469 |
else
|
470 |
conjunctCMB->setCurrentIndex(0);
|
470 |
conjunctCMB->setCurrentIndex(0);
|
|
... |
|
... |
558 |
|
558 |
|
559 |
void AdvSearch::slotHistoryNext()
|
559 |
void AdvSearch::slotHistoryNext()
|
560 |
{
|
560 |
{
|
561 |
if (g_advshistory == 0)
|
561 |
if (g_advshistory == 0)
|
562 |
return;
|
562 |
return;
|
563 |
STD_SHARED_PTR<Rcl::SearchData> sd = g_advshistory->getnewer();
|
563 |
std::shared_ptr<Rcl::SearchData> sd = g_advshistory->getnewer();
|
564 |
if (!sd)
|
564 |
if (!sd)
|
565 |
return;
|
565 |
return;
|
566 |
fromSearch(sd);
|
566 |
fromSearch(sd);
|
567 |
}
|
567 |
}
|
568 |
|
568 |
|
569 |
void AdvSearch::slotHistoryPrev()
|
569 |
void AdvSearch::slotHistoryPrev()
|
570 |
{
|
570 |
{
|
571 |
if (g_advshistory == 0)
|
571 |
if (g_advshistory == 0)
|
572 |
return;
|
572 |
return;
|
573 |
STD_SHARED_PTR<Rcl::SearchData> sd = g_advshistory->getolder();
|
573 |
std::shared_ptr<Rcl::SearchData> sd = g_advshistory->getolder();
|
574 |
if (!sd)
|
574 |
if (!sd)
|
575 |
return;
|
575 |
return;
|
576 |
fromSearch(sd);
|
576 |
fromSearch(sd);
|
577 |
}
|
577 |
}
|
578 |
|
578 |
|