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

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

XMLWordPrintable

    • 5
    • dcfab7e28e (qt/qtbase/dev) dcfab7e28e (qt/tqtc-qtbase/dev)
    • Foundation PM Prioritized

      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");
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes