FIX: renamed qt method

bzr-revno: 2322
This commit is contained in:
Andreas Preikschat 2013-12-30 12:13:40 +01:00
commit 80c6c371df
1 changed files with 4 additions and 2 deletions

View File

@ -133,7 +133,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
"""
self.dictionary = enchant.Dict(action.text())
self.highlighter.spelling_dictionary = self.dictionary
self.highlighter.highlight_block(self.toPlainText())
self.highlighter.highlightBlock(self.toPlainText())
self.highlighter.rehighlight()
def correct_word(self, word):
@ -180,9 +180,11 @@ class Highlighter(QtGui.QSyntaxHighlighter):
super(Highlighter, self).__init__(*args)
self.spelling_dictionary = None
def highlight_block(self, text):
def highlightBlock(self, text):
"""
Highlight misspelt words in a block of text.
Note, this is a Qt hook.
"""
if not self.spelling_dictionary:
return