I ran into a very peculiar error using lupdate v4.7.2. I got the error message
module/foo.cpp:6: Qualifying with unknown namespace/class ::foo
for a couple of classes in a project with about 50 classes. I boiled the problem down to a simple example:
src/project.pro:
QT += core
TARGET = test
TEMPLATE = app
SOURCES += main.cpp \
screen.cpp
HEADERS += screen.h
TRANSLATIONS += de.ts
src/module/foo.h:
namespace sp {
class foo {
initWidgets();
};
} // namespace sp
src/module/foo.cpp:
#include <QString>
#include "module/foo.h"
namespace sp {
foo::initWidgets() {
QString bar = tr("bar");
}
} // namespace sp
main.cpp has an empty main function in it.
The code compiles (barring any copypasta mistakes I might have produced here), so the syntax is basically correct.
initWidgets();
– Festschrift