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

qOffsetStringArray(): store duplicate strings only once

    XMLWordPrintable

Details

    Description

      Acceptance criterion:

      1. all existing tests still pass
      2. the following new tests don't fail:
      {
          constexpr auto table = qOffsetStringArray("Foo", "Foo", "");
          QVERIFY(table.viewAt(0) == "Foo");
          QVERIFY(table.viewAt(1) == "Foo");
          QVERIFY(table.viewAt(2) == "");
          QCOMPARE(table.m_string.size(), 4);
      }
      {
          constexpr auto table = qOffsetStringArray("Foo", "", "Foo");
          QVERIFY(table.viewAt(0) == "Foo");
          QVERIFY(table.viewAt(1) == "");
          QVERIFY(table.viewAt(2) == "Foo");
          QCOMPARE(table.m_string.size(), 4);
      }
      

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes