PDA

View Full Version : Check for compressed .qm file?



ksierens
2nd November 2006, 13:59
Is there a way to determine if a translations .qm file is compressed? I need to be able to call the QTranslator::messages function and it messes up the translations if the file was compressed.

wysota
2nd November 2006, 17:25
Compressed in what meaning?

ksierens
2nd November 2006, 19:52
When you use the linguist application to create a release version of the binary translations file it compresses it by default. You can use the command line based lrelease command with the -nocompress argument to produce, that's right, and uncompressed version of this translation file. The problem with compressed .qm files is that calling the QTranslator::messages function on a compressed file will return an undefined value, and causes the current translations to be lost.
If I can check for this first, I can just post an error message.