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

QString and std::string with QT3_SUPPORT

    XMLWordPrintable

Details

    Description

      Certain methods in QString regarding conversion to and from std::string are not defined in Qt 4 even with QT3_SUPPORT.

      E.g.

      — /tmp/tmp.27800.0 2007-08-14 13:10:49.000000000 -0700
      +++ /home/anders/dev/qt/src/corelib/tools/qstring.h 2007-08-14 13:09:28.000000000 -0700
      @@ -418,6 +418,11 @@ public:
      #ifndef QT_NO_STL
      static inline QString fromStdString(const std::string &s);
      inline std::string toStdString() const;
      +#ifdef QT3_SUPPORT
      + QString(const std::string &s)

      { *this = QString::fromStdString(s); }

      + QString &operator=(const std::string &s)

      { *this = QString::fromStdString(s); return *this; }

      + operator std::string() const

      { return toStdString(); }

      +#endif

      1. ifdef qdoc
        static inline QString fromStdWString(const std::wstring &s);
        inline std::wstring toStdWString() const;

      Attachments

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

        Activity

          People

            bhughes Bradley T. Hughes (closed Nokia Identity) (Inactive)
            rve Anders Bakken
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes