[Qt-creator] A bug when Ciclic Inclusion happened
Enzo Ferrante
enzo.02 at gmail.com
Wed Feb 4 13:51:29 CET 2009
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090204/c112c6e2/attachment.html
More information about the Qt-creator-old
mailing list