Commit a567f6e6 authored by Steve Borho's avatar Steve Borho
Browse files

grep: be less aggressive if timeout fails

Orphaning the running thread does "Bad Things" (tm) so it's best to leave
the dialog in a state that knows the thread is still running.  Perhaps a second
KeyboardInterrupt will kick it out of its endless loop.
parent d1aeddf06d94
......@@ -194,10 +194,8 @@ class SearchWidget(QWidget):
def stopClicked(self):
if self.thread and self.thread.isRunning():
self.thread.cancel()
if not self.thread.wait( 2000 ):
# thread is stuck.. oh noes
if self.thread.wait( 2000 ):
self.thread = None
self.searchfinished()
def keyPressEvent(self, event):
if event.key() == Qt.Key_Escape:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment