|
a/src/qtgui/rclm_idx.cpp |
|
b/src/qtgui/rclm_idx.cpp |
|
... |
|
... |
84 |
// An indexing process was launched. If its' done, see status.
|
84 |
// An indexing process was launched. If its' done, see status.
|
85 |
int status;
|
85 |
int status;
|
86 |
bool exited = m_idxproc->maybereap(&status);
|
86 |
bool exited = m_idxproc->maybereap(&status);
|
87 |
if (exited) {
|
87 |
if (exited) {
|
88 |
QString reasonmsg;
|
88 |
QString reasonmsg;
|
89 |
if (m_idxreasontmp) {
|
89 |
if (m_idxreasontmp && m_idxreasontmp->ok()) {
|
90 |
string reasons;
|
90 |
string reasons;
|
91 |
file_to_string(m_idxreasontmp->filename(), reasons);
|
91 |
file_to_string(m_idxreasontmp->filename(), reasons);
|
92 |
if (!reasons.empty()) {
|
92 |
if (!reasons.empty()) {
|
93 |
ConfSimple rsn(reasons);
|
93 |
ConfSimple rsn(reasons);
|
94 |
vector<string> sects = rsn.getNames("");
|
94 |
vector<string> sects = rsn.getNames("");
|
|
... |
|
... |
225 |
// This gets called when the "update index" action is activated. It executes
|
225 |
// This gets called when the "update index" action is activated. It executes
|
226 |
// the requested action, and disables the menu entry. This will be
|
226 |
// the requested action, and disables the menu entry. This will be
|
227 |
// re-enabled by the indexing status check
|
227 |
// re-enabled by the indexing status check
|
228 |
void RclMain::toggleIndexing()
|
228 |
void RclMain::toggleIndexing()
|
229 |
{
|
229 |
{
|
230 |
if (!m_idxreasontmp) {
|
230 |
if (!m_idxreasontmp || !m_idxreasontmp->ok()) {
|
231 |
// We just store the pointer and let the tempfile cleaner deal
|
231 |
// We just store the pointer and let the tempfile cleaner deal
|
232 |
// with delete on exiting
|
232 |
// with delete on exiting
|
|
|
233 |
TempFile temp(".txt");
|
233 |
m_idxreasontmp = new TempFileInternal(".txt");
|
234 |
m_idxreasontmp = rememberTempFile(temp);
|
234 |
rememberTempFile(TempFile(m_idxreasontmp));
|
|
|
235 |
}
|
235 |
}
|
236 |
|
236 |
|
237 |
switch (m_indexerState) {
|
237 |
switch (m_indexerState) {
|
238 |
case IXST_RUNNINGMINE:
|
238 |
case IXST_RUNNINGMINE:
|
239 |
if (m_idxproc) {
|
239 |
if (m_idxproc) {
|
|
... |
|
... |
279 |
|
279 |
|
280 |
if (!checkIdxPaths()) {
|
280 |
if (!checkIdxPaths()) {
|
281 |
return;
|
281 |
return;
|
282 |
}
|
282 |
}
|
283 |
vector<string> args{"-c", theconfig->getConfDir()};
|
283 |
vector<string> args{"-c", theconfig->getConfDir()};
|
284 |
if (m_idxreasontmp) {
|
284 |
if (m_idxreasontmp && m_idxreasontmp->ok()) {
|
285 |
args.push_back("-R");
|
285 |
args.push_back("-R");
|
286 |
args.push_back(m_idxreasontmp->filename());
|
286 |
args.push_back(m_idxreasontmp->filename());
|
287 |
}
|
287 |
}
|
288 |
m_idxproc = new ExecCmd;
|
288 |
m_idxproc = new ExecCmd;
|
289 |
m_idxproc->startExec("recollindex", args, false, false);
|
289 |
m_idxproc->startExec("recollindex", args, false, false);
|
|
... |
|
... |
375 |
if (!checkIdxPaths()) {
|
375 |
if (!checkIdxPaths()) {
|
376 |
return;
|
376 |
return;
|
377 |
}
|
377 |
}
|
378 |
|
378 |
|
379 |
vector<string> args{"-c", theconfig->getConfDir(), "-z"};
|
379 |
vector<string> args{"-c", theconfig->getConfDir(), "-z"};
|
380 |
if (m_idxreasontmp) {
|
380 |
if (m_idxreasontmp && m_idxreasontmp->ok()) {
|
381 |
args.push_back("-R");
|
381 |
args.push_back("-R");
|
382 |
args.push_back(m_idxreasontmp->filename());
|
382 |
args.push_back(m_idxreasontmp->filename());
|
383 |
}
|
383 |
}
|
384 |
m_idxproc = new ExecCmd;
|
384 |
m_idxproc = new ExecCmd;
|
385 |
m_idxproc->startExec("recollindex", args, false, false);
|
385 |
m_idxproc->startExec("recollindex", args, false, false);
|
|
... |
|
... |
456 |
}
|
456 |
}
|
457 |
if (!specidx) // ??
|
457 |
if (!specidx) // ??
|
458 |
return;
|
458 |
return;
|
459 |
|
459 |
|
460 |
vector<string> args{"-c", theconfig->getConfDir()};
|
460 |
vector<string> args{"-c", theconfig->getConfDir()};
|
461 |
if (m_idxreasontmp) {
|
461 |
if (m_idxreasontmp && m_idxreasontmp->ok()) {
|
462 |
args.push_back("-R");
|
462 |
args.push_back("-R");
|
463 |
args.push_back(m_idxreasontmp->filename());
|
463 |
args.push_back(m_idxreasontmp->filename());
|
464 |
}
|
464 |
}
|
465 |
|
465 |
|
466 |
string top = specidx->toptarg();
|
466 |
string top = specidx->toptarg();
|
|
... |
|
... |
519 |
}
|
519 |
}
|
520 |
|
520 |
|
521 |
vector<string> paths;
|
521 |
vector<string> paths;
|
522 |
if (Rcl::docsToPaths(docs, paths)) {
|
522 |
if (Rcl::docsToPaths(docs, paths)) {
|
523 |
vector<string> args{"-c", theconfig->getConfDir(), "-e", "-i"};
|
523 |
vector<string> args{"-c", theconfig->getConfDir(), "-e", "-i"};
|
524 |
if (m_idxreasontmp) {
|
524 |
if (m_idxreasontmp && m_idxreasontmp->ok()) {
|
525 |
args.push_back("-R");
|
525 |
args.push_back("-R");
|
526 |
args.push_back(m_idxreasontmp->filename());
|
526 |
args.push_back(m_idxreasontmp->filename());
|
527 |
}
|
527 |
}
|
528 |
args.insert(args.end(), paths.begin(), paths.end());
|
528 |
args.insert(args.end(), paths.begin(), paths.end());
|
529 |
m_idxproc = new ExecCmd;
|
529 |
m_idxproc = new ExecCmd;
|