Show More
@@ -81,6 +81,8 b' def create_inputhook_qt4(mgr, app=None):' | |||||
81 | try: |
|
81 | try: | |
82 | allow_CTRL_C() |
|
82 | allow_CTRL_C() | |
83 | app = QtCore.QCoreApplication.instance() |
|
83 | app = QtCore.QCoreApplication.instance() | |
|
84 | if not app: # shouldn't happen, but safer if it happens anyway... | |||
|
85 | return 0 | |||
84 | app.processEvents(QtCore.QEventLoop.AllEvents, 300) |
|
86 | app.processEvents(QtCore.QEventLoop.AllEvents, 300) | |
85 | if not stdin_ready(): |
|
87 | if not stdin_ready(): | |
86 | timer = QtCore.QTimer() |
|
88 | timer = QtCore.QTimer() | |
@@ -99,6 +101,11 b' def create_inputhook_qt4(mgr, app=None):' | |||||
99 | " permanently" |
|
101 | " permanently" | |
100 | "\n and '%gui qt4' to re-enable it later") |
|
102 | "\n and '%gui qt4' to re-enable it later") | |
101 | mgr.clear_inputhook() |
|
103 | mgr.clear_inputhook() | |
|
104 | except: # NO exceptions are allowed to escape from a ctypes callback | |||
|
105 | mgr.clear_inputhook() | |||
|
106 | from traceback import print_exc | |||
|
107 | print_exc() | |||
|
108 | print("Got exception from inputhook_qt4, unregistering.") | |||
102 | return 0 |
|
109 | return 0 | |
103 |
|
110 | |||
104 | def preprompthook_qt4(ishell): |
|
111 | def preprompthook_qt4(ishell): |
General Comments 0
You need to be logged in to leave comments.
Login now