From e77c75065a6d2745a8569ae85907e711a66505ee 2011-11-01 19:46:34 From: MinRK Date: 2011-11-01 19:46:34 Subject: [PATCH] disable calltips in PySide < 1.0.7 to prevent segfault PySide bug caused segfault when QApplication.topLevelAt(pos) should return None, has been fixed in 1.0.7. --- diff --git a/IPython/frontend/qt/console/frontend_widget.py b/IPython/frontend/qt/console/frontend_widget.py index df93310..924ce35 100644 --- a/IPython/frontend/qt/console/frontend_widget.py +++ b/IPython/frontend/qt/console/frontend_widget.py @@ -7,6 +7,7 @@ import time # System library imports from pygments.lexers import PythonLexer +from IPython.external import qt from IPython.external.qt import QtCore, QtGui # Local imports @@ -118,6 +119,11 @@ class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin): def __init__(self, *args, **kw): super(FrontendWidget, self).__init__(*args, **kw) + # forcefully disable calltips if PySide is < 1.0.7, because they crash + if qt.QT_API == qt.QT_API_PYSIDE: + import PySide + if PySide.__version_info__ < (1,0,7): + self.enable_calltips = False # FrontendWidget protected variables. self._bracket_matcher = BracketMatcher(self._control)