Qt 4.6
Andreas Pakulat
apaku at gmx.de
Wed Jun 10 17:23:24 BST 2009
On 10.06.09 14:37:53, Christoph Feck wrote:
> 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
>
> The problem occurs (if I counted correctly), with two files in kdelibs, and
> four files in kdebase.
>
> Maybe I am the only one that uses KDE with the Qt from master branch, but my
> question is, if I should commit the fixes to current trunk to get them into
> KDE 4.3. What I currently do is to add something like this:
>
> +#if defined Q_WS_X11
> + #undef Bool
> +#endif
> +
> #include "kmodifierkeyinfo.moc"
>
> Another option would be to force including <QMetaType> before the X11 headers,
> but I am not sure which solution is cleaner.
>
> I can also wait with the commits after we branched for KDE 4.4, if there is a
> problem with those commits.
>
> Please comment :)
Why are we chasing a moving target like Qt's master branch? IMHO we should
wait until at least a beta is released (and/or qt-copy switched to 4.6)
that still has this source-incompatibility? Maybe they decide that they
break too many sources out there with this change in the next few months
which would leave KDE files with hacks/workarounds that are not needed
anymore.
Maybe we could even try to get a fix upstream into QMetaType header
instead? So there'd be only 1 point with the hack/workaround instead of
many.
Qt isn't different from any other of our dependencies (except that we
basically have a small fork of it) so we shouldn't look too much at what
happens in their development branch.
Andreas
--
You like to form new friendships and make new acquaintances.
More information about the kde-core-devel
mailing list