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

Add QTextStream::read|readAll|readLine(QString *) overloads to reuse QString's capacity

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • None
    • 4
    • Foundation Sprint 120, Foundation Sprint 121, Foundation Sprint 122, Foundation Sprint 123, Foundation Sprint 124, Foundation Sprint 125, Foundation Sprint 126, Foundation Sprint 127, Foundation Sprint 128, Foundation Sprint 129

    Description

      This is a corollary report to QTBUG-45166. QTextStream would be safer (compared to overloads with char* as output parameter) and faster (compared to overloads returning QString) if the following overloads were present to reuse QString's capacity:

      bool QTextStream::readInto(QString *s, qint64 maxLen);
      bool QTextStream::readAllInto(QString *s);
      

      The above overload signatures model along the already existing

      bool QTextStream::readLineInto(QString *s, qint64 maxLen); // already exists
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-45190
          # Subject Branch Project Status CR V

          Activity

            People

              tatiana.borisova Tatiana Borisova
              ckakman Kayra Akman
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change