Author Topic: Help context tagging Qt framework  (Read 3854 times)

flethuseo

  • Senior Community Member
  • Posts: 172
  • Hero Points: 2
Help context tagging Qt framework
« on: September 08, 2011, 01:13:17 pm »
I am trying to get Slickedit working with the Qt framework so that I can navigate the codebase easily and because of the other features it provides. To context tag the library I go to Tools > Tag Files, then I right click on C/C++ to add tag file. I name it Qt.vtg and then select the following trees:

Code: [Select]
   
C:\Qt\2010.05\qt\src
C:\Qt\2010.05\qt\include
I get context tagging for some things, but I can't get context tagging for some scenarios where I normally get it:

When I try to get the parameters for a second pointer, it shows nothing:

Code: [Select]
oldAddress = ui->addressText->When I try to complete specific headers it also gives no help

Code: [Select]
#include <QtCore/ >
I don't know if I there are additional steps for context tagging QT. I am attaching the example project I am trying to use context tagging on.

Ted

lwb78750

  • Community Member
  • Posts: 53
  • Hero Points: 1
  • Senior Software Engineer, C++, Qt, C, etc...
Re: Help context tagging Qt framework
« Reply #1 on: September 08, 2011, 08:23:32 pm »
Ted,  I used the Linux version of Qt and SE for four years and I did exactly what you are suggesting, except I added the Qt files to my project, and wa-la the tags were all there!  Let me know if you want more info on this.

flethuseo

  • Senior Community Member
  • Posts: 172
  • Hero Points: 2
Re: Help context tagging Qt framework
« Reply #2 on: September 09, 2011, 11:36:06 pm »
So you moved that huge directory of qt's libraries and source code to your workspace directory? That's kind of crazy X\, or do you mean you moved the tags to the Workspace Tag File if that is possible? or is the vtg file in your workspace directory, because that is what I do as well.

I am also using Qt Creator, but it has a different way of building the project where it puts the makefile and objects in on directory, and the source code and ui files in another. I wonder if that is affecting it?


Graeme

  • Senior Community Member
  • Posts: 1978
  • Hero Points: 226
Re: Help context tagging Qt framework
« Reply #3 on: September 10, 2011, 02:51:17 am »
The #include problem is probably because you need to set up some paths to the library in your project.

When you say tagging doesn't work for some scenarios that normally do work, do you mean that the "double pointer" thing normally works ...  but in an entirely different context?  If you complete the identifier manually and use ctrl-dot, do you get taken to the correct identifier?  If you look up the symbol you typed in the find symbol toolwindow, is it there?  Maybe there's some QT macro you're missing from the pre-processing list.  I don't have QT so can't try your example but maybe you can boil it down to a small self-contained example that shows the problem.

Also, you could consider an auto-updated tag file
http://community.slickedit.com/index.php/topic,6328.msg26438.html#msg26438

Graeme

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 706
  • Hero Points: 45
Re: Help context tagging Qt framework
« Reply #4 on: September 10, 2011, 06:04:39 pm »
I was able to get this to work with no problems.
* SlickEdit 16.0.2 Windows x64
* Qt 4.7.2, tagged include/ and src/

What I did:
* ran 'qmake -makefile' to create an nmake Makefile, Makefile.Debug, Makefile.Release on Windows
* cleaned up the file list under Project>Project Properties, Files by adding files that were missing and removing files that did not exist

After doing all of the above, Context Tagging and tag navigation (Ctrl+Dot, etc.) worked great.

--rodney++

flethuseo

  • Senior Community Member
  • Posts: 172
  • Hero Points: 2
Re: Help context tagging Qt framework
« Reply #5 on: September 11, 2011, 05:58:51 pm »
Hi,

I just realized that the problem I am having is not just with Qt, but with actually all C++ header files such as <iostream> <cstdlib> etc.... I don't know what I am missing but I don't get completion or navigation for those files. For example, in the following code I am able to get completion and navigation for ipexport.h; but I do not get either for "iostream":

Code: [Select]
#include <ipexport.h>
#include <iostream>

int main (int argc, char *argv[])
{
return 0;
}

In the symbols list I can find the member iostream


So I don't understand why I am no getting completion or navigation for C++ style headers. Anyway what else can I check?

Quote
The #include problem is probably because you need to set up some paths to the library in your project.
how do I do that?

Quote
if you complete the identifier manually and use ctrl-dot, do you get taken to the correct identifier?
no.. not for iostream or iostream.h, only for some like ipexport.h

Quote
If you look up the symbol you typed in the find symbol toolwindow, is it there?
Yes.

Ted.

« Last Edit: September 11, 2011, 07:07:33 pm by flethuseo »

lwb78750

  • Community Member
  • Posts: 53
  • Hero Points: 1
  • Senior Software Engineer, C++, Qt, C, etc...
Re: Help context tagging Qt framework
« Reply #6 on: September 11, 2011, 08:41:30 pm »
Ted, you don't have to move any files or directories, just use the SE "project properties" to include those Qt dirs that you want tagged.  It worked great for me.

hs2

  • Senior Community Member
  • Posts: 2727
  • Hero Points: 281
Re: Help context tagging Qt framework
« Reply #7 on: September 11, 2011, 09:48:08 pm »
@Ted: Maybe you need to adjust your setup to get the extensionless headers tagged correctly. Please have a look at this thread and/or the docs.
You can also check the result by verifying the tag file(s) containing these files.
Good luck, HS2

flethuseo

  • Senior Community Member
  • Posts: 172
  • Hero Points: 2
Re: Help context tagging Qt framework
« Reply #8 on: September 12, 2011, 11:46:11 am »
- I have tried adding the *.; extension so that it tags extensionless files.
- I have also checked the def_cpp_include_path_re macro variable and it was already set already to
include the c++ directory "inc|include|c\+\+|g\+\+-[234]"

My cygwin include path for c++
"C:\Cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include\c++" has all these
extensionless header files but I still cannot get them on autocomplete. 
However, at least now I got navigation to them. 

some images of what I am seeing:





Is there anything else I am missing, for not getting completion help on those include files? 

Ted



« Last Edit: September 12, 2011, 12:58:11 pm by flethuseo »

flethuseo

  • Senior Community Member
  • Posts: 172
  • Hero Points: 2
Re: Help context tagging Qt framework
« Reply #9 on: September 12, 2011, 04:00:08 pm »
Finally got it to work. So technically it was this 3 or 2 things:

- Adding the *.; extension so that it tags extensionless files. (Though it may not be necessary)
- Checking that the def_cpp_include_path_re macro variable and it was already set already to include the c++ directory "inc|include|c\+\+|g\+\+-[234]"
- Adding the path "C:\Cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include\c++" that contains the extensionless files to the projects directories

Thanks for your help,

Ted