[Qt-interest] Maybe a bug using Q_DECLARE_TR_FUNCTIONS

Berry Octave octave at octavious.servegame.org
Wed Mar 24 19:38:21 CET 2010


Hi the list,

Working on a project involving a lot of non-Qt classes, I tried to use 
Q_DECLARE_TR_FUNCTIONS in one of my base classes.

This macro is correctly handled by the compiler (ie : using tr in classes is 
fine).
Same about lupdate which correctly extracts the sentences.

Once translation done, I loaded them as shown in the documentation.

The fact was that QObject classes (or ones using QObject::tr explicitely) were 
correctly translated, wherhas the ones using Q_DECLARE_TR_FUNCTIONS'tr were 
shown in untranslated version.

Fixing was done by using QObject::tr form everywhere, but I think that may be 
a bug in Qt's i18n system.

Any ideas about that issue ?

Regards

Berry Octave





More information about the Qt-interest-old mailing list