Unsolved Ho to disable/make disappear error underlines in QtCreator ?
-
@JonB Hi JonB, I update my question. Thanks.
-
@RobDaNet
Hi
The #define does not contain the ;
so when expanded it does miss the ;
and hence
value = Nil
does need the ;Note:
did you update the original post ?
We have some issues regarding refreshing after forum updates so hence i ask if you added new info:) -
@mrjj HI, yes I did but the first time it didn't show the update. By the way, to which Nil you are referring at? The semicolon is present in the initialization.
-
-
@mrjj If I put a ';' in the macro I cannot pass it to a function, so I need the ';' to be added at the initialisation point. Also, it shouldn't be an error either passing Nil to a function without the ';', don't you think ?
-
@RobDaNet I was't trying to be funny, by the way. My point is that once the macro is expanded I have, from a C point of view, no error, even if I pass the macro to a function.
-
Hi
Ah, yes if you use it as a parameter and not just for an assignment
then the ; cannot be included.but then you must add it when assigning. so in that context
u->closed_value = Nil;//extra ;
the ; is not really extra. (IMHO)Are you saying that with a c compiler it will accept
the define with no ;
at a assignment?
xxx = Nil -
@mrjj Not at all, I'm saying that in the initialization the ';' token is present and I shouldn't get those underlines.
-
@mrjj The message in the comment is what I get by hovering the mouse on the underline.
-
hi
well if you include the "extra" ; then
i agree it should not whine.
However, in that old creator, im not sure that can be disabled.and just so i understand.
even with the ;
you get
u->next = NULL; // expected a declaration
return u; // expected token ';' got '{'?
-
@mrjj Thanks
-
Hi
Just as a note:
You can use QtCreator with any version of Qt.
So if you wish you could use the newest Creator with Qt5.5.1
Its only if you wish to make Creator plugins the version does matter.That said, im still not sure why it underlines it as
checking with other macros it seems to accept it. -
@mrjj Thanks for your note, too. I'm sure I will get the last version very soon. Especially since it offer the option to turn off the error underlining system. Maybe on the newest version these kind of macros won't even be flagged as an error, as you noticed before.
-
@RobDaNet
I tried to create a Object as a struct with
int n;
and it seems not to mind :)