|
a/src/qtgui/main.cpp |
|
b/src/qtgui/main.cpp |
|
... |
|
... |
126 |
}
|
126 |
}
|
127 |
rcldb->setAbstractParams(-1, prefs.syntAbsLen, prefs.syntAbsCtx);
|
127 |
rcldb->setAbstractParams(-1, prefs.syntAbsLen, prefs.syntAbsCtx);
|
128 |
return true;
|
128 |
return true;
|
129 |
}
|
129 |
}
|
130 |
|
130 |
|
|
|
131 |
// Retrieve the list currently active stemming languages. We try to
|
|
|
132 |
// get this from the db, as some may have been added from recollindex
|
|
|
133 |
// without changing the config. If this fails, use the config. This is
|
|
|
134 |
// used for setting up choice menus, not updating the configuration.
|
131 |
bool getStemLangs(vector<string>& langs)
|
135 |
bool getStemLangs(vector<string>& vlangs)
|
132 |
{
|
136 |
{
|
|
|
137 |
// Try from db
|
133 |
string reason;
|
138 |
string reason;
|
134 |
if (!maybeOpenDb(reason)) {
|
139 |
if (maybeOpenDb(reason)) {
|
135 |
LOGERR(("getStemLangs: %s\n", reason.c_str()));
|
140 |
vlangs = rcldb->getStemLangs();
|
|
|
141 |
LOGDEB0(("getStemLangs: from index: %s\n",
|
|
|
142 |
stringsToString(vlangs).c_str()));
|
|
|
143 |
return true;
|
|
|
144 |
} else {
|
|
|
145 |
// Cant get the langs from the index. Maybe it just does not
|
|
|
146 |
// exist yet. So get them from the config
|
|
|
147 |
string slangs;
|
|
|
148 |
if (theconfig->getConfParam("indexstemminglanguages", slangs)) {
|
|
|
149 |
stringToStrings(slangs, vlangs);
|
|
|
150 |
return true;
|
|
|
151 |
}
|
136 |
return false;
|
152 |
return false;
|
137 |
}
|
153 |
}
|
138 |
langs = rcldb->getStemLangs();
|
|
|
139 |
return true;
|
|
|
140 |
}
|
154 |
}
|
141 |
|
155 |
|
142 |
static void recollCleanup()
|
156 |
static void recollCleanup()
|
143 |
{
|
157 |
{
|
144 |
if (havereadsettings) {
|
158 |
if (havereadsettings) {
|