[Qt-creator] Autocompletion problems

Leandro T. C. Melo leandro.melo at nokia.com
Wed Aug 22 10:09:35 CEST 2012


On 08/21/2012 10:42 PM, ext Patryk Małek wrote:
> Hello,
>
> I have been writing some C++ code in Qt Creator and I am really
> disappointed with its code autocomplete. I have been thinking whether it
> can be somehow improved by (ofc developpers) e.g. users that will notice
> a 'bug' - lack of autocomplete.
>
> (Qt Creator 2.5.1
>
> Based on Qt 4.8.2 (64 bit)
>
> Ubuntu 12.04)
>
> For instance: today I have noticed that Creator will not complete the
> code from /<ios> /header e.g.
>
> /std::cout.*setf*( std::*ios::hex*, std::*hex::basefield *);/
>
> Is there an options so that we - users can help ? Where is Creator
> getting code suggestions from ?
>
> I would be glad to help if I only could.

Hi,

Qt Creator has its own parser, what means it doesn't strictly depend on 
the particular toolchain you are using except for predefined macros, 
which might actually lead to different code paths. All completions and
C++ features come from the analysis of the ASTs we generate.

We have known issues with templates and we are trying to fix them. In 
the case you are interested on diving into the code, a good starting 
point for this particular issue would be 
src/plugins/cpptools/cppcompletionassist.cpp.

Cheers,
Leandro






More information about the Qt-creator mailing list