Change message after interrupting indexing from "failed" to "interrupted"

This commit is contained in:
Jean-Francois Dockes 2014-12-18 08:17:20 +01:00
parent 7d54e147a0
commit 53f8e38e88
2 changed files with 13 additions and 3 deletions

View file

@ -752,8 +752,14 @@ void RclMain::periodic100()
if (exited) {
deleteZ(m_idxproc);
if (status) {
QMessageBox::warning(0, "Recoll",
tr("Indexing failed"));
if (m_idxkilled) {
QMessageBox::warning(0, "Recoll",
tr("Indexing interrupted"));
m_idxkilled = false;
} else {
QMessageBox::warning(0, "Recoll",
tr("Indexing failed"));
}
} else {
// On the first run, show missing helpers. We only do this once
if (m_firstIndexing)
@ -825,8 +831,10 @@ void RclMain::toggleIndexing()
// Indexing was in progress, request stop. Let the periodic
// routine check for the results.
int pid = m_idxproc->getChildPid();
if (pid > 0)
if (pid > 0) {
kill(pid, SIGTERM);
m_idxkilled = true;
}
}
break;
case IXST_RUNNINGNOTMINE:

View file

@ -74,6 +74,7 @@ public:
m_toolsTB(0), m_resTB(0),
m_filtFRM(0), m_filtCMB(0), m_filtBGRP(0), m_filtMN(0),
m_idxproc(0),
m_idxkilled(false),
m_catgbutvecidx(0),
m_sortspecnochange(false),
m_indexerState(IXST_RUNNINGNOTMINE),
@ -197,6 +198,7 @@ private:
QFileSystemWatcher m_watcher;
vector<ExecCmd*> m_viewers;
ExecCmd *m_idxproc; // Indexing process
bool m_idxkilled; // Killed my process
map<QString, QAction*> m_stemLangToId;
vector<string> m_catgbutvec;
int m_catgbutvecidx;