From bbb25934618651b5ab7dd3f4613026038854b58e Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 29 Apr 2011 17:46:15 +0200 Subject: [PATCH] GUI: print error dialog when indexing cant start because of other indexer active (ie: the monitor) --- src/qtgui/idxthread.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qtgui/idxthread.cpp b/src/qtgui/idxthread.cpp index 8d20cb0c..80b8684a 100644 --- a/src/qtgui/idxthread.cpp +++ b/src/qtgui/idxthread.cpp @@ -88,6 +88,11 @@ void IdxThread::run() Pidfile pidfile(myconf->getPidfile()); if (pidfile.open() != 0) { + // Have to sleep a little here else the main thread + // won't see the status change because it only tests + // after seeing IDXTS_NULL at least once. Better + // interlock needed... + sleep(2); indexingstatus = IDXTS_ERROR; indexingReason = "Indexing failed: other process active? " + pidfile.getreason();