##// END OF EJS Templates
Formatting
Emilio Graff -
Show More
@@ -115,7 +115,7 b' def get_app_qt4(*args, **kwargs):'
115 app = QtGui.QApplication.instance()
115 app = QtGui.QApplication.instance()
116 if app is None:
116 if app is None:
117 if not args:
117 if not args:
118 args = ([''],)
118 args = ([""],)
119 app = QtGui.QApplication(*args, **kwargs)
119 app = QtGui.QApplication(*args, **kwargs)
120 return app
120 return app
121
121
@@ -128,7 +128,7 b' def is_event_loop_running_qt4(app=None):'
128
128
129 # Old way: check attribute on QApplication singleton
129 # Old way: check attribute on QApplication singleton
130 if app is None:
130 if app is None:
131 app = get_app_qt4([''])
131 app = get_app_qt4([""])
132 if hasattr(app, '_in_event_loop'):
132 if hasattr(app, '_in_event_loop'):
133 return app._in_event_loop
133 return app._in_event_loop
134 else:
134 else:
@@ -138,7 +138,7 b' def is_event_loop_running_qt4(app=None):'
138 def start_event_loop_qt4(app=None):
138 def start_event_loop_qt4(app=None):
139 """Start the qt event loop in a consistent manner."""
139 """Start the qt event loop in a consistent manner."""
140 if app is None:
140 if app is None:
141 app = get_app_qt([''])
141 app = get_app_qt4([""])
142 if not is_event_loop_running_qt4(app):
142 if not is_event_loop_running_qt4(app):
143 app._in_event_loop = True
143 app._in_event_loop = True
144 app.exec_()
144 app.exec_()
General Comments 0
You need to be logged in to leave comments. Login now