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

If Qt is built with no -Zc:wchar_t, fromStdWString and toStdWString cannot be used

    XMLWordPrintable

Details

    Description

      Related to: QTBUG-9617
      By default Qt is built with QMAKE_CFLAGS =Zc:wchar_t. All fine. But if you want to use QMAKE_CFLAGS = -Zc:wchar_t, then you cannot use fromStdWString and toStdWString.

      In Qt4 you used to have

       # ifndef QT_NO_STL_WCHAR
       // workaround for some headers not typedef'ing std::wstring
       typedef std::basic_string<wchar_t> QStdWString;
       # endif // QT_NO_STL_WCHAR
      

      and

       fromStdWDtring, toStdWString overloaded functions:
       static inline QString fromStdWString(const QStdWString &s);
       inline QStdWString toStdWString() const;
      

      In Qt5 those overloaded functions are missing and thus you cannot build without wchar_t as built in type if you need those functions.

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              qtcomsupport Qt Support
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes