From 24c5543e7790b90a74f32a0630482966e7e0a939 2010-09-03 21:01:04 From: Brian Granger Date: 2010-09-03 21:01:04 Subject: [PATCH] Fixing bug in guisupport.py --- diff --git a/IPython/lib/guisupport.py b/IPython/lib/guisupport.py index 9a8e3df..8356c60 100644 --- a/IPython/lib/guisupport.py +++ b/IPython/lib/guisupport.py @@ -110,13 +110,15 @@ def get_app_qt4(*args, **kwargs): from PyQt4 import QtGui app = QtGui.QApplication.instance() if app is None: + if not args: + args = ([''],) app = QtGui.QApplication(*args, **kwargs) return app def is_event_loop_running_qt4(app=None): """Is the qt4 event loop running.""" if app is None: - app = get_app_qt4() + app = get_app_qt4(['']) if hasattr(app, '_in_event_loop'): return app._in_event_loop else: @@ -126,7 +128,7 @@ def is_event_loop_running_qt4(app=None): def start_event_loop_qt4(app=None): """Start the qt4 event loop in a consistent manner.""" if app is None: - app = get_app_qt4() + app = get_app_qt4(['']) if not is_event_loop_running_qt4(app): app._in_event_loop = True app.exec_()