Intellisense/completion in QT Creator v2.8.1

  • Hi,

    I've just updated from v2.6 to v2.8.1 of Qt Creator on Linux and have a problem with intellisense. This used to work fine through several versions of Qt Creator, but now it doesn't work at all for my project.

    This is just a plain C++ project. I'm using custom builds to use Makefiles (i.e. make rather than CMake).

    I've started a new project and for that, intellisense works fine, so I guess it must be something to do with the settings for the legacy project?

    I've seen some discussion on the forums regarding use of precompiled headers, but I'm not using them here. I've also seen some reports of slower indexing in the latest version but I don't think that's the issue (waited 10 minutes or so, but still no completion). This applies to all my code - i.e. it's not just failing for STL for example.

    I'm not really sure where to start with trying to diagnose this, but would be happy to try things out if somebody could get me started in the right direction.

    [I do note that I'm getting an error regarding my version of git not being new enough (now requires 1.7.2, but since I'm on ubuntu 10.04 LTS I've only got 1.7.0) - I can't imagine that this would be related to intellisense though?]

    Thanks if you can help.

  • Having investigated further, I've found that adding all of the relevant include paths to the project's .includes file is all that's needed to get intellisense working again.

    Obvious really - I should have tried it earlier. However this wasn't necessary in version 2.6 and previous, where it seemed to be the case that all include files that were present in the project were parsed for intellisense/completion.

    Is this a new feature of versions since v2.7 that all project paths must be added to the .includes file, regardless of whether the include file is already present in the project?

    Thanks again.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    It sounds rather like a regression, did you check the "bug report system": to see if there is something about it ?

  • Thanks for the reply. I've checked the bug report system (thanks for pointing me at it), but can't see anything that's quite the same.

    However I'm struggling to reproduce the issue with a simple example project. I've created a simple project with a local class in main.cpp and a class in an includes dir. I've also added a separate inactive project containing another class. Completion is working perfectly when using all of the classes from main without any need to add any info to the .includes file...

    The problem that I was having problems with is large-ish (100-200 files) but is otherwise structurally the same as the simple project described above (i.e. some classes in includes directories, some in a separate inactive project). So I'm not sure where to go with this. Certainly not worth posting a bug until I can narrow the problem down. I'll post back if I find anything new or if somebody can suggest anything else to try. Thanks again.

  • Lifetime Qt Champion

    It might be something related to the project size. You could try to start little and then increase the number of files/classes until you trigger the problem

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.