Errors running lupdate
-
When I run lupdate on my project today I got:
lupdate i18n\DSS_en.ts (C:/Qt/6.6.1/msvc2019_64/bin/lupdate.exe -no-obsolete -no-obsolete "@x64\Debug\DSS_en.in.txt" -ts i18n\DSS_en.ts) C:/Users/amonra/Documents/GitHub/DSS/DeepSkyStacker/ExplorerBar.cpp:298: Qualifying with unknown namespace/class ::ExplorerBar C:/Users/amonra/Documents/GitHub/DSS/DeepSkyStacker/ExplorerBar.cpp:341: Qualifying with unknown namespace/class ::ExplorerBar C:/Users/amonra/Documents/GitHub/DSS/DeepSkyStacker/ExplorerBar.cpp:408: Qualifying with unknown namespace/class ::ExplorerBar C:/Users/amonra/Documents/GitHub/DSS/DeepSkyStacker/ExplorerBar.cpp:574: Qualifying with unknown namespace/class ::ExplorerBar C:/Users/amonra/Documents/GitHub/DSS/DeepSkyStacker/ExplorerBar.cpp:621: Qualifying with unknown namespace/class ::ExplorerBar C:/Users/amonra/Documents/GitHub/DSS/DeepSkyStacker/StackRecap.cpp:186: Qualifying with unknown namespace/class ::StackRecap Updating 'i18n/DSS_en.ts'... Found 507 source text(s) (0 new and 507 already existing)What's worse is when I open the file in Qt Linguist and select a context (doesn't matter which one), the Linguist goes into "Not Responding" state! ARGH!
What has gone wrong please?
Thanks
David -
Perhaps a missing Q_OBJECT macro in these classes?
-
Thanks for that suggestion. The headers did contain Q_OBJECT macros, but I'd moved the classes into a namespace and the header file was correct, but a namespace statement was missing in the cpp files. Adding the missing namespace statement fixed the lupdate errors.
Unfortunately, Qt Linguist still goes to "Not Responding" after the .ts file has been updated. Prior to the lupdate, Linguist worked to edit this .ts file
-
Now you just have to provide a minimal, compilable example to reproduce the problem and write a bug report about it.
-
Very funny (not)! The ts file was many hundreds of lines - and I've no clue what caused Linguist to choke on it
@Perdrix said in Errors running lupdate:
The ts file was many hundreds of lines - and I've no clue what caused Linguist to choke on it
That's also one part of programming - finding out what the problem is...
-
I think in this instance, the TS file is enough for a bug report. After all, the bug is in Linguist, not in lupdate - at least that's what it seems to be at the moment.
-
-
Nice, thanks for posting! I've voted for this bug.
I don't want to be on 6.5.1 as there are problems I had that were fixed in 6.6.1
BTW. it should be totally fine to use Linguist from another Qt version - both TS and QM formats are stable and compatible both forwards and backwards (at least in my experience). So you can keep developing your app using Qt 6.7, but handle translations using 6.5 Linguist. It's annoying, sure, but better than waiting for the bug to get fixed and next Qt release to roll out.