[Qt-creator] pimpl autocomplete?

Leandro T. C. Melo ltcmelo at gmail.com
Mon Sep 17 23:39:04 CEST 2012


On Mon, Sep 17, 2012 at 9:52 PM, Linos <info at linos.es> wrote:
> Hi,
>         i am using Qt Creator 2.5.2 with Qt 4.8.2 in Arch Linux with kernel
> 3.5.4-424-bfs x86_64 to edit a project that uses pimpl storing some variables in
> a Private class, something like this (simplified):
>
>
> ------------------------------------------------
> stream.h
>
> #ifndef STREAM_H
> #define STREAM_H
>
> #include <QObject>
>
> class Stream: public QObject
> {
> Q_OBJECT
>
> public:
>     Stream( QObject * parent = 0 );
>     ~Stream();
>     void funcTest();
>
> private:
>     class Private;
>     Private *d;
> };
>
> #endif
>
>
> ------------------------------------------------
> stream.cpp
>
> class Stream::Private
> {
> public:
>
>         QString mode;
> };
>
> Stream::Stream( QObject * parent )
>        :QObject(parent), d(new Private(this))
> {
> }
>
> Stream::funcTest()
> {
>         d.  <--- autocomplete fails
> }
>
>
> -----------------------------------------------
> it's this expected behaviour? i have tested Qt sources and Qt Creator
> autocomplete correctly the pimpl classes of Qt source code.

Hi,

yes, this particular case doesn't work on 2.5 but it is already
implemented on 2.6. You can give it a try with the Beta release.

--
Leandro T. C. Melo
http://www.ltcmelo.com



More information about the Qt-creator mailing list