| Summary: | Cursor navigation should not trigger code completion window | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Fabio Gomes de Souza <fabio> |
| Component: | general | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 3.0.4 | ||
| Target Milestone: | --- | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Fabio Gomes de Souza
2004-12-22 22:41:02 UTC
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 *)));
Thank you very much for this quick fix. You rock, dude! Greetings from Brazil! |