Results 1 to 6 of 6

Thread: Turn off translation/Unicode?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Turn off translation/Unicode?

    Is this possible? For some projects we'll never translate any of the internal strings, and so not bother with unicode either. So QApplication::translate(x,x,x,QApplication::Unicod eUTF8) seems a little redundant. Is it possible to disable these?

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Turn off translation/Unicode?

    What is the problem you are trying to solve?
    It's nice to be important but it's more important to be nice.

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Turn off translation/Unicode?

    Further down the line when I need to squash the file as much as possible, I'd like to disable unicode, but I'm guessing thats going to be difficult with the designer creating such source code.

  4. #4
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Turn off translation/Unicode?

    See which features can be disabled in qfeatures.h and qconfig.h.

    But I doubt that unicode is in one of these because it is a real core feature.
    It's nice to be important but it's more important to be nice.

  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Turn off translation/Unicode?

    [oops, please delete]

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Turn off translation/Unicode?

    According to the code, it can be disabled, and its seems configurable as to how featureless(featurefull?) you want it to be:

    Qt Code:
    1. #ifdef QT_NO_TRANSLATION
    2. // Simple versions
    3. inline QString QCoreApplication::translate(const char *, const char *sourceText,
    4. const char *, Encoding encoding)
    5. {
    6. #ifndef QT_NO_TEXTCODEC
    7. if (encoding == UnicodeUTF8)
    8. return QString::fromUtf8(sourceText);
    9. #else
    10. Q_UNUSED(encoding)
    11. #endif
    12. return QString::fromLatin1(sourceText);
    13. }
    To copy to clipboard, switch view to plain text mode 

    But, looking at that, it'll just return whatever you pass into it, so maybe it'll "just work" after all.

Similar Threads

  1. How to turn off this annoying feature of QColumnView?
    By jwieland in forum Qt Programming
    Replies: 11
    Last Post: 3rd September 2010, 17:38
  2. How to turn off translator code in creator
    By sanfordpaul in forum Newbie
    Replies: 0
    Last Post: 4th March 2009, 23:39
  3. How to turn off PC?
    By wydesenej in forum Qt Programming
    Replies: 1
    Last Post: 20th January 2009, 17:56
  4. turn off collision detection?
    By Deacon in forum Qt Programming
    Replies: 14
    Last Post: 30th December 2008, 17:37
  5. Turn off computer
    By swiety in forum KDE Forum
    Replies: 1
    Last Post: 5th January 2008, 15:40

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
  •  
Qt is a trademark of The Qt Company.