Fixed another issue with a multi-connected signal. 5_2_x

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 07 Apr 2012 16:39:36 +0200
branch
5_2_x
changeset 1769
02e7e55b47f5
parent 1766
7f4af8146a24
child 1774
fda2bb18c3ae

Fixed another issue with a multi-connected signal.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
diff -r 7f4af8146a24 -r 02e7e55b47f5 QScintilla/Editor.py
--- 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