Fixed another issue with a multi-connected signal.

Sat, 07 Apr 2012 16:39:36 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 07 Apr 2012 16:39:36 +0200
changeset 1768
8a04ce23e083
parent 1767
bfc7ba3b3663
child 1770
c17e67e69ef5

Fixed another issue with a multi-connected signal.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/QScintilla/Editor.py	Fri Apr 06 17:02:01 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
@@ -5986,7 +5986,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:
@@ -6010,6 +6013,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