QScintilla/Editor.py

branch
5_2_x
changeset 1769
02e7e55b47f5
parent 1759
06d8e237479b
child 1808
8e4ee8def45a
--- a/QScintilla/Editor.py	Fri Apr 06 17:01:11 2012 +0200
+++ b/QScintilla/Editor.py	Sat Apr 07 16:39:36 2012 +0200
@@ -11,7 +11,7 @@
 import difflib
 
 from PyQt4.QtCore import QDir, QTimer, QModelIndex, QFileInfo, pyqtSignal, \
-    QCryptographicHash, QEvent, QDateTime, QRegExp, Qt
+    pyqtSlot, QCryptographicHash, QEvent, QDateTime, QRegExp, Qt
 from PyQt4.QtGui import QCursor, QPrinter, QPrintDialog, QLineEdit, QActionGroup, \
     QDialog, QAbstractPrintDialog, QInputDialog, QApplication, QMenu, QPalette, QFont
 from PyQt4.Qsci import QsciScintilla, QsciMacro, QsciStyledText
@@ -5982,7 +5982,10 @@
         Public method to set the automatic spell checking.
         """
         if Preferences.getEditor("AutoSpellCheckingEnabled"):
-            self.SCN_CHARADDED.connect(self.__spellCharAdded)
+            try:
+                self.SCN_CHARADDED.connect(self.__spellCharAdded, Qt.UniqueConnection)
+            except TypeError:
+                pass
             self.spell.checkDocumentIncrementally()
         else:
             try:
@@ -6006,6 +6009,7 @@
                        self.lexer_.isStringStyle(style)
         return True
     
+    @pyqtSlot(int)
     def __spellCharAdded(self, charNumber):
         """
         Public slot called to handle the user entering a character.

eric ide

mercurial