Skip to content

Commit

Permalink
Fix: Do not use deprecated keyword in setup_editor for spyderlib >= 2…
Browse files Browse the repository at this point in the history
….3.0
  • Loading branch information
rproepp committed Sep 3, 2014
1 parent eab009b commit 3f5c74d
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions spykeviewer/ui/plugin_editor_dock.py
Expand Up @@ -111,12 +111,22 @@ def _setup_editor(self):
font = QFont('Some font that does not exist')
font.setStyleHint(font.TypeWriter, font.PreferDefault)
editor = codeeditor.CodeEditor(self)
editor.setup_editor(
linenumbers=True, language='py',
scrollflagarea=False, codecompletion_enter=self.enter_completion,
tab_mode=False, edge_line=False, font=font,
codecompletion_auto=True, go_to_definition=True,
codecompletion_single=True, calltips=True)
try:
editor.setup_editor(
linenumbers=True, language='py',
scrollflagarea=False,
codecompletion_enter=self.enter_completion,
tab_mode=False, edge_line=False, font=font,
codecompletion_auto=True, go_to_definition=True,
codecompletion_single=True, calltips=True)
except TypeError: # codecompletion_single is gone in 2.3.0
editor.setup_editor(
linenumbers=True, language='py',
scrollflagarea=False,
codecompletion_enter=self.enter_completion,
tab_mode=False, edge_line=False, font=font,
codecompletion_auto=True, go_to_definition=True,
calltips=True)
editor.setCursor(Qt.IBeamCursor)
editor.horizontalScrollBar().setCursor(Qt.ArrowCursor)
editor.verticalScrollBar().setCursor(Qt.ArrowCursor)
Expand Down

0 comments on commit 3f5c74d

Please sign in to comment.