lupdate error: Qualifying with unknown namespace/class

In my case lupdate wasn't able to parse enum MyEnum:int {}; line and failed to reach class declaration. Qt 5.7.1, lupdate still does not understand type specifiers for enums.


The answer was that lupdate was unable to locate the header file foo.h while parsing foo.cpp. Extending the .pro file with the following line removed the issue:

INCLUDEPATH += .

However, what still bothers me a bit is that the compiler should have been unable to compile the code, but somehow, qmake added a -I. to the compiler options. That's why I didn't think of an include file issue earlier and spent a couple of hours puzzling this out. Does anyone know whether this is default behavior? Also: Why does lupdate not emit an appropriate error message?