expected unqualified-id before ';' token
-
Hi everybody,
one task in my current project is to use a special network library. When the basic header for this library is included, the mentioned error appears. The error points to the following variable declaration in the header file:
char *slots;
Normally It would be possible to use the no_keywords config. But in this case it is not possible. The project is an add-on for a certain software, which uses Qt with the keywords enabled. Setting the no_keywords config breaks compiling.
Is there any way, to tell Qt/moc/whatever to ignore the slots variable in the third party library?
Help is very much appreciated
Sorut -
@Sorut Maybe you could undefine the "slots" macro (#undef slots) before including that header file and then defining it again after the include.
-
How do I redefine the slots Macro?
-
@Sorut You could try to include qobjectdefs.h (corelib/kernel/) where slots macro is defined.
-
I tried:
#undef slots<fancy includes>
#define slots Q_SLOTS
So far the compiler is satisfied. I'll run some tests if it works at the end.
6/6