|
a/src/qtgui/rclmain_w.cpp |
|
b/src/qtgui/rclmain_w.cpp |
|
... |
|
... |
755 |
if (!maybeOpenDb(reason, m_idxproc != 0)) {
|
755 |
if (!maybeOpenDb(reason, m_idxproc != 0)) {
|
756 |
QMessageBox::critical(0, "Recoll", QString(reason.c_str()));
|
756 |
QMessageBox::critical(0, "Recoll", QString(reason.c_str()));
|
757 |
return;
|
757 |
return;
|
758 |
}
|
758 |
}
|
759 |
|
759 |
|
760 |
string stemLang = (const char *)prefs.queryStemLang.toAscii();
|
|
|
761 |
if (stemLang == "ALL") {
|
|
|
762 |
theconfig->getConfParam("indexstemminglanguages", stemLang);
|
|
|
763 |
}
|
|
|
764 |
sdata->setStemlang(stemLang);
|
|
|
765 |
|
|
|
766 |
Rcl::Query *query = new Rcl::Query(rcldb);
|
760 |
Rcl::Query *query = new Rcl::Query(rcldb);
|
767 |
query->setCollapseDuplicates(prefs.collapseDuplicates);
|
761 |
query->setCollapseDuplicates(prefs.collapseDuplicates);
|
768 |
|
762 |
|
769 |
curPreview = 0;
|
763 |
curPreview = 0;
|
770 |
DocSequenceDb *src =
|
764 |
DocSequenceDb *src =
|
|
... |
|
... |
1076 |
}
|
1070 |
}
|
1077 |
|
1071 |
|
1078 |
// Get list of all mime types in index. For this, we use a
|
1072 |
// Get list of all mime types in index. For this, we use a
|
1079 |
// wildcard field search on mtype
|
1073 |
// wildcard field search on mtype
|
1080 |
Rcl::TermMatchResult matches;
|
1074 |
Rcl::TermMatchResult matches;
|
1081 |
string prefix;
|
|
|
1082 |
if (!rcldb->termMatch(Rcl::Db::ET_WILD, "", "*", matches, -1, "mtype",
|
1075 |
if (!rcldb->termMatch(Rcl::Db::ET_WILD, "", "*", matches, -1, "mtype")) {
|
1083 |
&prefix)) {
|
|
|
1084 |
QMessageBox::warning(0, tr("Error"),
|
1076 |
QMessageBox::warning(0, tr("Error"),
|
1085 |
tr("Index query error"),
|
1077 |
tr("Index query error"),
|
1086 |
QMessageBox::Ok,
|
1078 |
QMessageBox::Ok,
|
1087 |
QMessageBox::NoButton);
|
1079 |
QMessageBox::NoButton);
|
1088 |
return;
|
1080 |
return;
|
|
... |
|
... |
1091 |
// Build the set of mtypes, stripping the prefix
|
1083 |
// Build the set of mtypes, stripping the prefix
|
1092 |
set<string> mtypesfromdb;
|
1084 |
set<string> mtypesfromdb;
|
1093 |
for (vector<Rcl::TermMatchEntry>::const_iterator it =
|
1085 |
for (vector<Rcl::TermMatchEntry>::const_iterator it =
|
1094 |
matches.entries.begin();
|
1086 |
matches.entries.begin();
|
1095 |
it != matches.entries.end(); it++) {
|
1087 |
it != matches.entries.end(); it++) {
|
1096 |
mtypesfromdb.insert(it->term.substr(prefix.size()));
|
1088 |
mtypesfromdb.insert(it->term.substr(matches.prefix.size()));
|
1097 |
}
|
1089 |
}
|
1098 |
|
1090 |
|
1099 |
// All types listed in mimeconf:
|
1091 |
// All types listed in mimeconf:
|
1100 |
vector<string> mtypesfromconfig = theconfig->getAllMimeTypes();
|
1092 |
vector<string> mtypesfromconfig = theconfig->getAllMimeTypes();
|
1101 |
|
1093 |
|
|
... |
|
... |
1777 |
QMessageBox::critical(0, "Recoll", QString(reason.c_str()));
|
1769 |
QMessageBox::critical(0, "Recoll", QString(reason.c_str()));
|
1778 |
return;
|
1770 |
return;
|
1779 |
}
|
1771 |
}
|
1780 |
// Construct a bogus SearchData structure
|
1772 |
// Construct a bogus SearchData structure
|
1781 |
RefCntr<Rcl::SearchData>searchdata =
|
1773 |
RefCntr<Rcl::SearchData>searchdata =
|
1782 |
RefCntr<Rcl::SearchData>(new Rcl::SearchData(Rcl::SCLT_AND));
|
1774 |
RefCntr<Rcl::SearchData>(new Rcl::SearchData(Rcl::SCLT_AND, cstr_null));
|
1783 |
searchdata->setDescription((const char *)tr("History data").toUtf8());
|
1775 |
searchdata->setDescription((const char *)tr("History data").toUtf8());
|
1784 |
|
1776 |
|
1785 |
|
1777 |
|
1786 |
// If you change the title, also change it in eraseDocHistory()
|
1778 |
// If you change the title, also change it in eraseDocHistory()
|
1787 |
DocSequenceHistory *src =
|
1779 |
DocSequenceHistory *src =
|