KDE/kdevelop

Kris Wong wongk at seapine.com
Tue Jan 8 12:48:27 UTC 2008


> has foreach been added as part of the new C++ standard? I was under
> the impression it was only a Qt extension.

This is a Qt macro.  The parser shouldn't need to know how to parse it, as it's defined in qglobal.h.

Along those lines, adding the following to the "special headers" in the C++ Parsing section of the KDevelop configuration did not seem to work:

#define foreach(x, y) x;

then, using:

foreach (MyClass myclass, myclasslist)
{
   myclass.  // <-- code completion does not work
}

Does not function properly.  The "myclass" variable is unresolved.

Kris Wong




More information about the KDevelop-devel mailing list