A trivial nested class as a QObject derivative fools lupdate into thinking the parent class name is a namespace name that doesn't exist.
Error when lupdate parses MainWindow.cpp:
[ 22%] Generating /home/bill/src/cmake-test/translations/cmake-test_fr.ts
/home/bill/src/cmake-test/MainWindow.cpp:59: tr() cannot be called without context
/home/bill/src/cmake-test/MainWindow.cpp:59: Discarding unconsumed meta data
Found 0 source text(s) (0 new and 0 already existing)
[ 33%] Generating cmake-test_fr.qm
Generated 0 translation(s) (0 finished and 0 unfinished)
Explicit qualification of tr() as MainWindow::impl::tr() seems to work.