Code Completion Problems

1 view
Skip to first unread message

djurod...@gmail.com

unread,
Mar 24, 2008, 4:29:06 AM3/24/08
to HaiQ Development
1) I noticed that code completion doesn't work on pointers. When you
type "->" it doesn't show the completion window...

2) Another problem is when you want to invoke the completion window
with "ctrl+space" the code completion doesn't suggest code completion
for the object in front of it but it acts as if the line is empty.
Example:
You type "listView." and it shows the correct code completion window,
but if you close the completion window and try to invoke it again with
"ctrl+space" the completion window acts as it is on an empty line and
doesn't show the methods of the "listView". It is similar if you try
to invoke the code completion window on part of the word e.g.
"listVi"+"ctrl+space"...

3) Completion window also appears when you write comments (one line
and multiline comments). Also "ctrl+space" invokes the code completion
window.

I am using HaiQ 1.0 beta2 on Windows XP.

When could this be fixed?

jeremy....@gmail.com

unread,
Mar 24, 2008, 5:04:32 AM3/24/08
to ha...@googlegroups.com, djurod...@gmail.com
For first issue, this should work. Can you give a specific example?
I will look into fixing issue #2. Issue #3 will be lower priority.
Thanks for the feedback,
Jeremy

djurod...@gmail.com

unread,
Mar 24, 2008, 7:23:46 AM3/24/08
to HaiQ Development


On Mar 24, 10:04 am, jeremy.magl...@gmail.com wrote:
> For first issue, this should work. Can you give a specific example?
> I will look into fixing issue #2. Issue #3 will be lower priority.
> Thanks for the feedback,
> Jeremy
>

djurod...@gmail.com

unread,
Mar 24, 2008, 7:30:00 AM3/24/08
to HaiQ Development
OK, now that code completion works correctly on my system (jeremy
helped me with some problems on my system)...

1) works

2) it works for e.g. "listView." but it still doesn't work for e.g.
"listVi"+"ctrl+space".

3) also doesn't work

Regards,
Djuro Drljaca

djurod...@gmail.com

unread,
Mar 24, 2008, 8:00:58 AM3/24/08
to HaiQ Development
I think I found where the problem is for 2)

In file "haiqcompletion.cpp" in function
"get_type_for_completion(QString left_file_text)" you check for "::",
"->" and ".", if none of this strings is found than you look in
"global", whick is wrong.

I will try to fix it.

Regards,
Djuro Drljaca

djurod...@gmail.com

unread,
Mar 24, 2008, 9:23:44 AM3/24/08
to HaiQ Development
I tried fixing 2), but it got too complicated for me.

> In file "haiqcompletion.cpp" in function
> "get_type_for_completion(QString left_file_text)" you check for "::",
> "->" and ".", if none of this strings is found than you look in
> "global", which is wrong.

You should check for the "type of completion" left of the last word
and not at the end of line. This is why code completion works only for
"::", "->" and "."


I think I found the solution for 3)
In file "cppcompletion.cpp" on line 317: "if (tags.count()>0) {"
should also check if the current line in the editor is commented.

Regards,
Djuro Drljaca

jeremy....@gmail.com

unread,
Mar 24, 2008, 9:41:38 AM3/24/08
to ha...@googlegroups.com, Djuro Drljaca
Okay, you are right. I'll get around to fixing it.
Thanks, Jeremy

Reply all
Reply to author
Forward
0 new messages