Problems with QT_BEGIN_NAMESPACE in KDev5+Qt5

Aleix Pol aleixpol at
Fri Dec 5 02:01:14 UTC 2014

I'm finding this problem lately that has been annoying me more and more,
little by little. When using KDev5, we don't get to process properly C++
files that include QT_BEGIN_NAMESPACE, which incidentally is most Qt code,
it's a bit of a shame, for us ;).

I've tried to come up with a simple test case, maybe somebody can help shed
some light to the issue:

#include <QtCore/qobjectdefs.h>

class QEvent;

int main() { return 0; }

I have the feeling that there's a bit of a mess of files including each
other and this is making the preprocessing go nuts at some point. The
problem I'm getting is an "Unexpected token 'class'".

Do you guys also have the same error? Can somebody take a look into it? I'd
be immensely thankful. :D

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list