Qt 4.6

Christoph Bartoschek bartoschek at gmx.de
Wed Jun 10 19:49:49 BST 2009


Am Mittwoch 10 Juni 2009 schrieb Christoph Feck:
> Hi,
>
> a recent change in Qt 4.6 adds #include <QMetaType> to all generated .moc
> files in order to handle different floating point datatypes.
>
> Many KDE files add #include "file.moc" at the end of the .cpp file. The
> problem is with .cpp files that include X11 headers, where Bool is defined
> as a preprocessor macro.
>
> Compiling KDE with current Qt 4.6 results in the error
>
> 	#error qmetatype.h must be included before any header file that defines
> Bool

Hi,

is there a valid reason to define Bool in a C++ program? Normally it is a big 
WTF. This sounds like an artifact for very old compilers. Maybe it is 
possible to fix Qt to not depend on Bool?

Christoph

http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx

enum Bool {
   True,
   False,
   FileNotFound
}




More information about the kde-core-devel mailing list