A little change to the QScintilla inputMethodEvent() overwriting code.

Sun, 05 Jan 2014 17:13:21 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 05 Jan 2014 17:13:21 +0100
changeset 3176
51feb6174cc2
parent 3175
1a6638ccce9d
child 3178
f25fc1364c88
child 3179
a289fb727168
child 3180
2ed66f1e69fd

A little change to the QScintilla inputMethodEvent() overwriting code.

Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Source/eric5.QScintilla.QsciScintillaCompat.html file | annotate | diff | comparison | revisions
QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Source/eric5.QScintilla.QsciScintillaCompat.html	Sun Jan 05 15:20:02 2014 +0100
+++ b/Documentation/Source/eric5.QScintilla.QsciScintillaCompat.html	Sun Jan 05 17:13:21 2014 +0100
@@ -1023,29 +1023,34 @@
 <h4>QsciScintillaCompat.inputMethodEvent</h4>
 <b>inputMethodEvent</b>(<i>evt</i>)
 <p>
-        Protected method to cope with a glitch in some Qscintilla versions
-        handling input events.
+            Protected method to cope with a glitch in some Qscintilla versions
+            handling input events.
 </p><p>
-        Note: This simply disables the Qscintilla behavior.
+            Note: This simply disables the Qscintilla behavior.
 </p><dl>
 <dt><i>evt</i></dt>
 <dd>
 reference to the input method event object
-            (QInputMethodEvent)
+                (QInputMethodEvent)
 </dd>
 </dl><a NAME="QsciScintillaCompat.inputMethodQuery" ID="QsciScintillaCompat.inputMethodQuery"></a>
 <h4>QsciScintillaCompat.inputMethodQuery</h4>
 <b>inputMethodQuery</b>(<i>query</i>)
 <p>
-        Protected method to cope with a glitch in some Qscintilla versions
-        handling input events.
+            Protected method to cope with a glitch in some Qscintilla versions
+            handling input events.
 </p><p>
-        Note: This simply disables the Qscintilla behavior.
+            Note: This simply disables the Qscintilla behavior.
 </p><dl>
 <dt><i>query</i></dt>
 <dd>
 reference to the input method query object
-            (Qt.InputMethodQuery)
+                (Qt.InputMethodQuery)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+object containing the requested information
 </dd>
 </dl><a NAME="QsciScintillaCompat.lineAt" ID="QsciScintillaCompat.lineAt"></a>
 <h4>QsciScintillaCompat.lineAt</h4>
--- a/QScintilla/QsciScintillaCompat.py	Sun Jan 05 15:20:02 2014 +0100
+++ b/QScintilla/QsciScintillaCompat.py	Sun Jan 05 17:13:21 2014 +0100
@@ -1195,29 +1195,33 @@
         """
         return QsciScintillaBase.event(self, evt)
     
-    def inputMethodEvent(self, evt):
-        """
-        Protected method to cope with a glitch in some Qscintilla versions
-        handling input events.
-        
-        Note: This simply disables the Qscintilla behavior.
+    # TODO: adjust this once we have a working QScintilla version
+    if "inputMethodEvent" in QsciScintillaBase.__dict__ and \
+            QSCINTILLA_VERSION() < 0x020900:
+        def inputMethodEvent(self, evt):
+            """
+            Protected method to cope with a glitch in some Qscintilla versions
+            handling input events.
+            
+            Note: This simply disables the Qscintilla behavior.
+            
+            @param evt reference to the input method event object
+                (QInputMethodEvent)
+            """
+            pass
         
-        @param evt reference to the input method event object
-            (QInputMethodEvent)
-        """
-        pass
-    
-    def inputMethodQuery(self, query):
-        """
-        Protected method to cope with a glitch in some Qscintilla versions
-        handling input events.
-        
-        Note: This simply disables the Qscintilla behavior.
-        
-        @param query reference to the input method query object
-            (Qt.InputMethodQuery)
-        """
-        pass
+        def inputMethodQuery(self, query):
+            """
+            Protected method to cope with a glitch in some Qscintilla versions
+            handling input events.
+            
+            Note: This simply disables the Qscintilla behavior.
+            
+            @param query reference to the input method query object
+                (Qt.InputMethodQuery)
+            @return object containing the requested information
+            """
+            return None
 
     ###########################################################################
     ## interface methods to the mini editor

eric ide

mercurial