PDA

View Full Version : QDevelop and CTags -> Not working



philwinder
9th April 2008, 14:30
Hi all,
I have just installed qt 4.3.4 with QDevelop 0.25.2
Everything is working fine, building, no bugs etc. But I cant get ctags working. I have tried installing both the recommended version of ctags and the most up to date version. I have successfully tested that ctags is working via the external tools dialogue and refreshed my code to get a valid class listing.
But, whenever I do "anyThing->" or "anyThing." nothing works.

Any ideas on what I am doing wrong?

Cheers,

Phil

struktured
23rd April 2008, 01:36
I have the same problem. Same versions with gentoo / 64 bit system. I first had an error due to "--language-force=c++". I took that string out of the qdevelop code, rebuilt and got this instead:

/usr/bin/ctags: unrecognized option `--fields=afiKmsSzn'

Maybe I should just keep hacking away until ctag stops complaining...

fullmetalcoder
23rd April 2008, 09:20
First of all check that you are using exuberant ctags (http://ctags.sf.net) and not another version that some linux systems ship. Indeed such a version does not support the same command line option as the "standard" ctags that QDevelop expect to find (yeah, this is the downside of relying on external programs...). Then indicate the full path to the correct ctags executable (or use the "which ctags" command to check that the correct one is accessible thanks to proper PATH settings).

If this does not solve your problem you got a couple options left :
waiting for a fix (may be very long)
fixing it yourself (may be very hard)
forgetting about the wonders of code completion (may be very annoying)
switching to another IDE whose completion works better ;) (not necessarily mine though... CodeLite completion works well and I've heard that Code::Blocks does a decent job as well but these don't use Qt and they do not support it as well as a "Qt-targeted" one)

philwinder
23rd April 2008, 09:48
Thaks for the replies,
struktured: Ive never had errors like that, ctags "just didnt work" no errors, no warnings, nothing.
fullmetalcoder: Yeah ive got the right version, and QDevelop does indeed know where to find it.

I have had some updates though, for some reason is HAS started working for my own code (i.e. any classes that I write). I dont know why, when or how, but sometimes I come back to the code and it starts autocompleting. It still does not work with any QT classes though.

So, I think I might try that IDE youve been advertising ;) since Ive never tried it before.

Thanks,
Phil Winder

fullmetalcoder
23rd April 2008, 12:47
I have had some updates though, for some reason is HAS started working for my own code (i.e. any classes that I write). I dont know why, when or how, but sometimes I come back to the code and it starts autocompleting. It still does not work with any QT classes though.
It's been a while since I last gave a try to QDevelop so I may be very wrong but maybe you need to explicitely generate the Qt completion database somehow (look in the menus and settings) before it can successfully complete Qt types/methods/...

evgenM
23rd April 2008, 13:32
ctags not work if project path contains whitespace, like "C:\Program Files\..."

philwinder
23rd April 2008, 13:35
Yeah, theres an option in the tools menu called "Rebuild Qt classes Database", but you click that, it finishes way too fast. Like its pointing to the wrong Qt include folder. I did have a quick look, but reading somebody else's code, even if its well commented, is hard work.

Just a comment on Edyuk: The open project doesnt seem to be working very well. It doesnt open the pro files created in Qdevelop (it doesnt do anything fancy) and when I create a new pro file in edyuk (How is it pronounced by the way??? :) ), I cannot reopen that file. Using 1.0.0-rc1.

The the on-demand style changing is a cute touch though :p

Cheers,
Phil Winder

philwinder
23rd April 2008, 13:50
evgenM: Thanks for the tip, I shall have to remember that in the future.
But, it works fine for me even with spaces for my own classes, but still not (either way) for qt's functions.

fullmetalcoder
23rd April 2008, 15:05
Just a comment on Edyuk: The open project doesnt seem to be working very well. It doesnt open the pro files created in Qdevelop (it doesnt do anything fancy) and when I create a new pro file in edyuk (How is it pronounced by the way??? :) ), I cannot reopen that file. Using 1.0.0-rc1.

How did you try to open a project? Using File|Open or Project|Open ? (it does make a great deal of a difference since both are enabled to satisfy every users
How does your sample project look like?
I don't understand the reopening issue
These issues may also have been fixed since last release (I'd better release that rc2 soon I guess)
Let's not hijack this thread and move the discussion to a more appropriate place (e.g. Edyuk thread in this forum, or Edyuk mailing list or whatever mean given in the readme file, ...)

philwinder
23rd April 2008, 15:16
Ok,
thread started at http://www.qtcentre.org/forum/f-qt-software-16/t-re-opening-project-file-issue-in-edyuk-13210.html

Phil Winder

struktured
24th April 2008, 22:51
The exuberant tag issue resolved my problem. Now we just need to beef up this code completion to make it disgustingly awesome!

philwinder
6th May 2008, 19:43
My problems have been resolved as of QDevelop r319.
Get it (Or any newer version that may appear) via that svn: http://qdevelop.googlecode.com/svn/trunk/

Phil

GreyGeek
9th May 2008, 17:50
The exuberant tag issue resolved my problem. Now we just need to beef up this code completion to make it disgustingly awesome!

Code completion in VS2003 C++ is "beefed up" too much. It often displays many methods and properties in a dropdown that are NOT part of the class being used. It is only when you attempt to compile you get a "not a member of this class" msg.

I also code in Linux using Kate, which also has code completion, except that it uses as its reference the previous code you've written, so you never get a property or method that's not part of the class you are using, nor will display what you haven't used before. But, over all, I find it just as efficient as the VS code completion.

elcuco
9th May 2008, 22:40
kate has no code completion, it has word completion. I does not recognize the syntax of the language you are writing it.