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

Ensure Qt containers behave correctly when empty

    XMLWordPrintable

    Details

      Description

      Given recent findings like QTBUG-89687 and QTBUG-91704 it seems essential to verify that containers behave correctly in an edge case of being empty.
      Thus, we need a comprehensive test coverage for such scenarios.
      Containers list (may not be complete):

      • QList, QString, QByteArray
      • QVarLengthArray
      • QStack, QQueue
      • QSet, QMap, QMultiMap
      • QHash, QMultiHash

      The following should be tested:
      1. At least, no operation on an empty container causes a crash or UB (see related bug reports for an example)
      2. At most, no operation on an empty container causes it to allocate memory - this is a soft requirement as some operations could detach straight away and we accept it (e.g. having an explicit if-statement would harm the performance)

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              ivan.solovev Ivan Solovev
              Reporter:
              agolubev Andrei Golubev
              PM Owner:
              Vladimir Minenko Vladimir Minenko
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes