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

QString/QByteArray are missing (non-range-) erase()

    XMLWordPrintable

    Details

    • Story Points:
      5
    • Commits:
      dcfab7e28e (qt/qtbase/dev) dcfab7e28e (qt/tqtc-qtbase/dev)
    • Sprint:
      Foundation PM Prioritized

      Description

      QString and QByteArray, unlike all other Qt containers, and unlike std::string, lack the erase(it) function. Currently, the only option to erase a single character in QString is to use erase(it, it + 1), or remove.

      Acceptance criteria: The following tests pass for C = QString and C = QByteArray:

      C c = "bar";
      c.erase(c.begin());
      QCOMPARE_EQ(c, "ar");
      c.erase(std::prev(c.end()));
      QCOMPARE_EQ(c, "a");
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              cnn Qt Core & Network
              Reporter:
              mmutz Marc Mutz
              PM Owner:
              Vladimir Minenko Vladimir Minenko
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes