Use statusbar to ask if long-running script should be interrupted.

This commit is contained in:
Florian Bruhin 2014-06-10 16:49:56 +02:00
parent 67f64b5e6a
commit 7315712359

View File

@ -184,3 +184,11 @@ class BrowserPage(QWebPage):
"""
filename, _ = QFileDialog.getOpenFileName(None, None, suggested_file)
return filename
def shouldInterruptJavaScript(self):
"""Override shouldInterruptJavaScript to use the statusbar."""
answer = message.modular_question("Interrupt long-running javascript?",
PromptMode.yesno)
if answer is None:
answer == True
return answer