OSDN Git Service

Show the argument hints only when the cursor is at the right of an open brace.
authorRoberto Raggi <roberto.raggi@nokia.com>
Tue, 30 Nov 2010 15:35:40 +0000 (16:35 +0100)
committerRoberto Raggi <roberto.raggi@nokia.com>
Tue, 30 Nov 2010 15:35:40 +0000 (16:35 +0100)
src/plugins/glsleditor/glslcodecompletion.cpp

index 3c3684a..7803992 100644 (file)
@@ -604,7 +604,7 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
     QStringList members;
     QStringList specialMembers;
 
-    if (ch == QLatin1Char('.') || ch == QLatin1Char('(')) {
+    if (ch == QLatin1Char('.') || (ch == QLatin1Char('(') && pos == editor->position() - 1)) {
         const bool memberCompletion = (ch == QLatin1Char('.'));
         QTextCursor tc(edit->document());
         tc.setPosition(pos);