Results 1 to 3 of 3

Thread: Check for compressed .qm file?

  1. #1
    Join Date
    Mar 2006
    Location
    Troy, Michigan, USA
    Posts
    17
    Thanks
    2
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default Check for compressed .qm file?

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Check for compressed .qm file?

    Compressed in what meaning?

  3. #3
    Join Date
    Mar 2006
    Location
    Troy, Michigan, USA
    Posts
    17
    Thanks
    2
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Check for compressed .qm file?

    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.

Similar Threads

  1. Draging a non-existing file to the Windows Desktop
    By klaus1111 in forum Qt Programming
    Replies: 13
    Last Post: 20th September 2007, 11:47
  2. Replies: 5
    Last Post: 22nd September 2006, 08:04
  3. Qt 3.3.4 -> Qt 4.1.2, moc file issue
    By philski in forum Qt Tools
    Replies: 1
    Last Post: 11th September 2006, 21:08
  4. SQLite-DB in a qrc file
    By Lykurg in forum Qt Programming
    Replies: 5
    Last Post: 31st July 2006, 19:24
  5. Check if a file has been modified
    By Dark_Tower in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 21:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.