[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 95696] Cursor navigation should not trigger code completion window
From:       kdevelop-bugs-admin () barney ! cs ! uni-potsdam ! de
Date:       2004-12-22 23:45:07
Message-ID: 20041222234507.14933.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
        
http://bugs.kde.org/show_bug.cgi?id=95696        
jens.dagerbo swipnet se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From jens.dagerbo swipnet se  2004-12-23 00:45 -------
CVS commit by dagerbo: 

Make PHP code completion react to textChanged() instead of cursorPositionChanged(),
this to avoid trapping the cursor keys when simply navigating the code. 
Also added CTRL+SPACE shortcut to manually call up the completion dialog.

BUG: 95696


  M +4 -1      kdevphpsupport.rc   1.7
  M +2 -2      phpcodecompletion.cpp   1.31
  M +3 -1      phpcodecompletion.h   1.12
  M +3 -0      phpsupportpart.cpp   1.63


--- kdevelop/languages/php/kdevphpsupport.rc  #1.6:1.7
 @ -1,5 +1,8  @
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="KPHPSupport" version="2">
+<kpartgui name="KPHPSupport" version="3">
 <MenuBar>
+  <Menu name="edit">
+    <Action name="edit_complete_text"/>
+  </Menu>
   <Menu name="build" >
     <Action name="build_execute" />

--- kdevelop/languages/php/phpcodecompletion.cpp  #1.30:1.31
 @ -124,6 +124,6  @ void PHPCodeCompletion::setActiveEditorP
 
   disconnect(part->widget(), 0, this, 0 ); // to make sure that it is't connected twice
-  connect(part->widget(), SIGNAL(cursorPositionChanged()),
-          this, SLOT(cursorPositionChanged()));
+//  connect(part->widget(), SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged()));
+  connect( part, SIGNAL(textChanged()), this, SLOT(cursorPositionChanged()) );
   connect(part->widget(), SIGNAL(argHintHidden()), this, SLOT(argHintHided()));
   connect(part->widget(), SIGNAL(completionAborted()), this, SLOT(completionBoxHided()));

--- kdevelop/languages/php/phpcodecompletion.h  #1.11:1.12
 @ -52,6 +52,8  @ public:
   void setActiveEditorPart(KParts::Part *part);
 
-protected slots:
+public slots:
   void cursorPositionChanged();
+  
+protected slots:  
   void argHintHided();
   void completionBoxHided();

--- kdevelop/languages/php/phpsupportpart.cpp  #1.62:1.63
 @ -116,4 +116,7  @ PHPSupportPart::PHPSupportPart(QObject *
   m_codeCompletion = new  PHPCodeCompletion(configData, core(),codeModel());
 
+  new KAction(i18n("Complete Text"), CTRL+Key_Space, m_codeCompletion, SLOT(cursorPositionChanged()),
+        actionCollection(), "edit_complete_text");
+  
   connect(partController(), SIGNAL(activePartChanged(KParts::Part*)),
           this, SLOT(slotActivePartChanged(KParts::Part *)));


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic