[Qt-creator] Wrong red underline

Andre Poenitz andre.poenitz at mathematik.tu-chemnitz.de
Thu Nov 6 23:37:55 CET 2008


On Thu, Nov 06, 2008 at 02:14:52PM -0800, Leo Spalteholz wrote:
> This line is underlined in red even though it compiles just fine:
> 
> QTimer::singleShot(0, this, SLOT("nextStop()"));

Have you checked it also _runs_ fine?

The red wiggles go away if it is written

   QTimer::singleShot(0, this, SLOT(nextStop()));

One could argue that it is a benefit to flag code as "problematic"
that's likely to fail at run time even if it is legal according to the
language. It's pretty much in line with what e.g. gcc does for code
like  'if (a = 1)'. Most likely incorrect even if "legal".

> The error in the tooltip is:  expected token ')' got 'nextStop()'

That seems a bit misleading indeed.

Andre'



More information about the Qt-creator-old mailing list