GUI: Got rid of the warning message when killing indexer not started from the GUI
This commit is contained in:
parent
67e158b7f4
commit
19ffb9b557
@ -280,33 +280,24 @@ void RclMain::toggleIndexing()
|
|||||||
break;
|
break;
|
||||||
case IXST_RUNNINGNOTMINE:
|
case IXST_RUNNINGNOTMINE:
|
||||||
{
|
{
|
||||||
int rep =
|
|
||||||
QMessageBox::information(
|
|
||||||
0, tr("Warning"),
|
|
||||||
tr("The current indexing process is a monitor or was not started from this "
|
|
||||||
"interface. Click Ok to kill it anyway, or Cancel to leave it alone"),
|
|
||||||
QMessageBox::Ok, QMessageBox::Cancel, QMessageBox::NoButton);
|
|
||||||
if (rep == QMessageBox::Ok) {
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// No simple way to signal the process. Use the stop file
|
// No simple way to signal the process. Use the stop file
|
||||||
std::fstream ost;
|
std::fstream ost;
|
||||||
if (!path_streamopen(theconfig->getIdxStopFile(), std::fstream::out, ost)) {
|
if (!path_streamopen(theconfig->getIdxStopFile(), std::fstream::out, ost)) {
|
||||||
LOGSYSERR("toggleIndexing", "path_streamopen", theconfig->getIdxStopFile());
|
LOGSYSERR("toggleIndexing", "path_streamopen", theconfig->getIdxStopFile());
|
||||||
}
|
|
||||||
#else
|
|
||||||
Pidfile pidfile(theconfig->getPidfile());
|
|
||||||
pid_t pid = pidfile.open();
|
|
||||||
if (pid > 0)
|
|
||||||
kill(pid, SIGTERM);
|
|
||||||
#endif // !_WIN32
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
Pidfile pidfile(theconfig->getPidfile());
|
||||||
|
pid_t pid = pidfile.open();
|
||||||
|
if (pid > 0)
|
||||||
|
kill(pid, SIGTERM);
|
||||||
|
#endif // !_WIN32
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IXST_NOTRUNNING:
|
case IXST_NOTRUNNING:
|
||||||
{
|
{
|
||||||
// Could also mean that no helpers are missing, but then we
|
// Could also mean that no helpers are missing, but then we won't try to show a message
|
||||||
// won't try to show a message anyway (which is what
|
// anyway (which is what firstIndexing is used for)
|
||||||
// firstIndexing is used for)
|
|
||||||
string mhd;
|
string mhd;
|
||||||
m_firstIndexing = !theconfig->getMissingHelperDesc(mhd);
|
m_firstIndexing = !theconfig->getMissingHelperDesc(mhd);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user