Codelite, Qt and autocomplete

CodeLite installation/troubleshooting forum
cppki
CodeLite Curious
Posts: 2
Joined: Mon Sep 22, 2008 8:57 pm
Contact:

Codelite, Qt and autocomplete

Post by cppki »

I have Qt 4.4.1 and latest version of Codelite. And I want codelite to autocomplete names of members of Qt classes. I have create external tag database for Qt includes, attached this tags and re-tagged the current cpp-file but autocomplete not works. How to force autocomplete to work?
aaulia
CodeLite Enthusiast
Posts: 23
Joined: Wed Aug 20, 2008 10:45 pm
Contact:

Re: Codelite, Qt and autocomplete

Post by aaulia »

Seconded, I use Qt (learning it) frequently the last couple of days, although it's rather minor, but still it would really help a lot.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite, Qt and autocomplete

Post by eranif »

cppki wrote:I have Qt 4.4.1 and latest version of Codelite. And I want codelite to autocomplete names of members of Qt classes. I have create external tag database for Qt includes, attached this tags and re-tagged the current cpp-file but autocomplete not works. How to force autocomplete to work?
Are u on windows / Linux / Mac ? which CL revision?

Make sure that create tag database from the entire QT directory and not only 'include'
when the wizard starts, select the root directory of QT - on Ubuntu, you should set it

Code: Select all

/usr/include/qt4/
Check *all* entries that you are interested. like:

QtXml, QtCore, QtGUi etc.

The tags file should be about 17MB more or less ;)

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite, Qt and autocomplete

Post by eranif »

Ok, incase you fail to create the tags database, here is one that can help you:

http://codelite.org/download/qt-tags.zip

Download this file, unzip it and attach it to CodeLite.
TO attach:

- first close the current external tags datagase Tags -> Close external database
- attach: Tags -> Attach external database

From this point you should have QT Code completion available, this database also include code completion for STL (std::string, std::map etc.)

Since the tags were created on my machine, the following will probably wont work:
- go to implementation / declaration to any of QT's symbols (e.g. QString) since the file paths stored in the database are taken from my machine

Eran
Make sure you have read the HOW TO POST thread
aaulia
CodeLite Enthusiast
Posts: 23
Joined: Wed Aug 20, 2008 10:45 pm
Contact:

Re: Codelite, Qt and autocomplete

Post by aaulia »

Woah nice !!! I get code completition :mrgreen:
I get aroung 80 MB of tag file, maybe since I choose all the directory to be parsed :lol: , anyway I have a question, if I specify common.tags, would it overwrite it or add to it ?
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite, Qt and autocomplete

Post by eranif »

aaulia wrote:Woah nice !!! I get code completition :mrgreen:
I get aroung 80 MB of tag file, maybe since I choose all the directory to be parsed :lol: , anyway I have a question, if I specify common.tags, would it overwrite it or add to it ?
It will get appended.

This is how I create a tags file for both STL & QT & wxWidgets.
I first created QT, then I ran the wizard again selecting the STL root directory and setting the same database name.

It is also mentioned on the wizard dialog (at the bottom).

EDIT: 80MB is a lot. Try to select what you need, otherwise, you may notice some delay code completion. For me STL + wxWidgets + QT is around 30MB

Eran
Make sure you have read the HOW TO POST thread
aaulia
CodeLite Enthusiast
Posts: 23
Joined: Wed Aug 20, 2008 10:45 pm
Contact:

Re: Codelite, Qt and autocomplete

Post by aaulia »

Oh well I already did it, is there a way to remove spesific tags from external tag database ? All I know is how to fix the path, and add to it, but not remove from it. Anyway this make me love CL even more :lol:, man so many things to play with.
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Codelite, Qt and autocomplete

Post by eranif »

aaulia wrote:is there a way to remove spesific tags from external tag database ?
Well, not officially ;)

Since tags database is actually an sqlite database, you can simply use sqlite3 command line tool for this.

(Again, I dont know your OS, so I will assume Linux):
- install sqlite3 exe:

Code: Select all

sudo apt-get install sqlite3
- close CodeLite
- attach to the codelite tags database:

Code: Select all

sqlite3 <tags-file-name>
- delete what you dont want, the fastest will be to drop by file name, like this:
-

Code: Select all

delete from tags where file like '/usr/local/include%%'
this will delete all entries that their file name starts with '/usr/local/include'

HTH,
Eran
Make sure you have read the HOW TO POST thread
aaulia
CodeLite Enthusiast
Posts: 23
Joined: Wed Aug 20, 2008 10:45 pm
Contact:

Re: Codelite, Qt and autocomplete

Post by aaulia »

Hmm ok I'll try thanks. You've been very responsive ;) .

EDIT:
Ok I got 70 MB for Qt and STL, here is what I do and my path
STL : C:\MinGW\include\c++\3.4.5
Qt : C:\Qt\4.4.2\include & C:\Qt\4.4.2\src
I check everything in there.
cppki
CodeLite Curious
Posts: 2
Joined: Mon Sep 22, 2008 8:57 pm
Contact:

Re: Codelite, Qt and autocomplete

Post by cppki »

Thanks to all! I just let wizard to parse include and src directories and now it works.
Post Reply