PDA

View Full Version : Qt 4.8.1 hellotr demo for lupdate produces circular inclusion errors (warnings?)



wightd
3rd January 2013, 20:33
I am struggling to learn how to do internationalization in Qt...currently using the demo programs provided with the 4.8.1 QtSDK download for Windows (on Win7), because I have to start somewhere. Specifically, I've started with the hellotr project.

After finding out that this doesn't actually come with all the pieces of a translatable "Hello, world!" program in place (no .ts file(s)) I branched off to read the Qt Linguist manual articles directed at programmers and release managers. I made one change to the .pro file, expanding its list of TRANSLATIONS from = hellotr_la.ts to

TRANSLATIONS = hellotr_la.ts \
hellotr_en.ts \
hellotr_fr.ts

in order to (I hoped) get multiple language files to tinker with, and set about trying to run lupdate against it.

As the manual didn't direct me anywhere near running lupdate through the Qt Creator GUI (and my employer has no plans to use Qt Creator anyway) I ran lupdate from the command line in the directory containing the hellotr files, ie., C:\QtSDK\Examples\4.7\linguist\hellotr. After adding both C:\QtSDK\mingw\bin and C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin elements to my PATH variable, so that the libgcc_s_dw2-1.dll and the most recent lupdate could be recognized, I ran the command lupdate hellotr.pro and was treated to the following output:

C:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtCore/qbytearray.h:618: circular inclusion of C:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtCore/qstring.h
C:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtCore/qstringbuilder.h:45: circular inclusion of C:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtCore/qstring.h
C:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtGui/qwmatrix.h:45: circular inclusion of C:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtGui/qmatrix.h

Updating 'hellotr_la.ts'...
Found 1 source text(s) (1 new and 0 already existing)
Updating 'hellotr_en.ts'...
Found 1 source text(s) (1 new and 0 already existing)
Updating 'hellotr_fr.ts'...
Found 1 source text(s) (1 new and 0 already existing)

This approach did produce reasonable XML docs that I could see editing either by hand or (presumably) through QT Linguist--which will be one of my "next" steps--but does anyone know what is going on with these circular inclusion errors? Since closing and restarting Qt Creator, following the updates to my PATH, I've been able to use its Tools | External | Linguist | Update Translations (lupdate) menu selection to create the same files, with the same errors showing up.

Is this due to something that I've got screwed up in my overall setup, or a glitch that others have seen? I'm also concerned that in my poking around the Net, I've come upon 2 or 3 cases where people essentially report 4.8.1 translation facilities as failing, and falling back to earlier versions as successful. Does anyone know if there are particular problems with 4.8.1 which might make use of either an earlier or later version advisable?

ChrisW67
4th January 2013, 08:34
Fixed in 4.8.3 and 5.0
https://bugreports.qt-project.org/browse/QTBUG-6587
https://qt.gitorious.org/qt/qt/commit/7904bf24f7a41fbdce1a3febf6171d46b90521d0)