[Qt-creator] A bug when Ciclic Inclusion happened

Roberto Raggi roberto.raggi at trolltech.com
Wed Feb 4 14:27:27 CET 2009


Hi,

Sorry I can't reproduce it, but it looks like you are using a very old  
version of Creator. Please try with a recent snapshot.

ciao robe

On Feb 4, 2009, at 1:51 PM, Enzo Ferrante wrote:

> Hi,
>    first, I' say sorry for my poor english.
>
> The bug appears when I work with C++ classes that have Ciclic  
> Inclusions. For example, if I work with these 3 classes for same  
> minutes (writing code, compiling, etc), the program crashes:
>
> /*#############################################################*/
> File: ClaseA.h
> /*#############################################################*/
> #ifndef CLASEA_H
> #define CLASEA_H
> #include "ClaseB.h"
>
> class ClaseA {
> public:
>     ClaseA(){}
>     void methodA()
>     {   qDebug() << "Hi! I'm A!";   }
> };
> #endif // CLASEA_H
> /*#############################################################*/
>
> /*#############################################################*/
> File: ClaseB.h
> /*#############################################################*/
> #ifndef CLASEB_H
> #define CLASEB_H
> #include "ClaseC.h"
>
> class ClaseB {
>     public:
>     ClaseB(){}
>     void methodB(ClaseC * c)
>     {   qDebug() << "Hi! I'm B!";
>         c->methodC(); }
> };
> #endif // CLASEB_H
> /*#############################################################*/
>
> /*#############################################################*/
> File: ClaseC.h
> /*#############################################################*/
> #ifndef CLASEC_H
> #define CLASEC_H
> #include "ClaseB.h"
> #include <QDebug>
>
> class ClaseC {
>     public:
>     ClaseC(){}
>     void methodC()
>     { qDebug() << "Hi! I'm C!";  }
> };
> #endif // CLASEC_H
> /*#############################################################*/
>
> Classes "ClaseB" and "ClaseC" are ciclic included. To test the  
> crash, you may include "ClaseA.h" in the file "mainwindow.h" from a  
> new QtProyect, and then, you may instanciate a ClaseA object in some  
> method from "mainwindow.cpp".
>
> I don't know if somebody else reported this bug before me; if it  
> happened, sorry.
> I'm working with Qt Creator Version 9.0 (build 320690) based on Qt  
> 4.5 on Linux (I tested it on Windows, and happened the same bug)
>
> Enzo
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator




More information about the Qt-creator-old mailing list