Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-15229

QString, QFile, QDir, ... are no longer usable in library code on platforms with a non-ASCII system codec, e.g. UTF-8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P4: Low P4: Low
    • 4.8.0
    • 4.6.3, 4.7.0, 4.7.1
    • None
    • Suse Linux >= 10.x
    • a8bf19019b3374eefaadb4e054d24089bc4fd5a4

      Until Qt 4.4.3 QString could be used without instantiating Q(Core)Application resp. without using QTextCodec::setCodecForLocale().
      With Qt 4.7 (4.5 4.6 ?) this is no longer provided (see http://bugreports.qt.nokia.com/browse/QTBUG-13508?focusedCommentId=131579).

      Therefore QString, QFile, QDir, ... (classes that depends on QString and don't need event handling) can no longer be used in library code,
      because a library cannot set the applications locale settings nor can it rely on the application to instantiate a Q(Core)Application.

      As a consequence, libraries using QString and developed with Qt <= 4.4.3 cannot be migrated to Qt 4.7 (4.5 4.6 ?),
      if used on non-ASCII-platform like e.g. Suse Linux 10+ (UTF-8) !

      This is getting worse, since Qt 4.4 is not maintained any more.
      See attached test program.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            stt2rt Thomas Schmidt
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes