Is it a bug in qt-creator?
-
qt-creator version: 4.5.1
qt-version: 5.10.1When use c++ log library https://github.com/SergiusTheBest/plog,
Though it appears a red underline, but it is no problem to build this project with no warings and errors result. (I have restart the qt-creator several times, but it didn't work, still exist a red underline)
But, if I add a line after the
LOG_INFO
, the red underline will disappear.And then I create a same and plain c++ project in visual studio 2015,
It's ok, no red underline.
So, is this a bug in qt-creator?
Tip: The plog library is header-only library, you can check this problem easily! Remember give your qt & qt-creator's version if you don't have the same problem, Thanks a lot in advance!
---------edit------------------
I also tried the latest qt-creator 4.8.1, the problem is still existed.
-
qt-creator version: 4.5.1
qt-version: 5.10.1When use c++ log library https://github.com/SergiusTheBest/plog,
Though it appears a red underline, but it is no problem to build this project with no warings and errors result. (I have restart the qt-creator several times, but it didn't work, still exist a red underline)
But, if I add a line after the
LOG_INFO
, the red underline will disappear.And then I create a same and plain c++ project in visual studio 2015,
It's ok, no red underline.
So, is this a bug in qt-creator?
Tip: The plog library is header-only library, you can check this problem easily! Remember give your qt & qt-creator's version if you don't have the same problem, Thanks a lot in advance!
---------edit------------------
I also tried the latest qt-creator 4.8.1, the problem is still existed.
hi, @Limer
I would say It's at least unusal,
4.5.1 is a rather old QtCreator version, before declaring any kind of bug, I would sugges updating to a newer/the newest version of it.That beeing 4.8.1 and check if it's still reproduceable there.
-
hi, @Limer
I would say It's at least unusal,
4.5.1 is a rather old QtCreator version, before declaring any kind of bug, I would sugges updating to a newer/the newest version of it.That beeing 4.8.1 and check if it's still reproduceable there.
-
@Limer
well in that case I would take this to
https://bugreports.qt.ioand open a bug report.
You can post a link to the open ticket, so people can follow/have a cross reference
-
@Limer My guess is: it is the CLang code model. You can disable that plug-in and see whether it "fixes" the issue.
-
How does your LOG_INFO macro look like?
-
How does your LOG_INFO macro look like?
#define IF_LOG_(instance, severity) if (!plog::get<instance>() || !plog::get<instance>()->checkSeverity(severity)) {;} else #define LOG_(instance, severity) IF_LOG_(instance, severity) (*plog::get<instance>()) += plog::Record(severity, PLOG_GET_FUNC(), __LINE__, PLOG_GET_FILE(), PLOG_GET_THIS()).ref() #define LOG(severity) LOG_(PLOG_DEFAULT_INSTANCE, severity) #define LOG_INFO LOG(plog::info)
-
Don't see anything obvious which could fool the parser, sorry.
-
Don't see anything obvious which could fool the parser, sorry.
@Christian-Ehrlicher Yes, although it hava no effect on the project building, the red underline is so uncomfortable for me ( a little obsessive-compulsive, haha... )
You can try it yourself, just need no more than 5 miuntes.