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

API asymmetry in isEmpty / isNull between QByteArray and QString operator+=

    XMLWordPrintable

Details

    • 4d261c1b5 (dev), 2c12c9b01 (6.6), 8ed2bc919 (dev)

    Description

      Found as part of https://codereview.qt-project.org/c/qt/qtbase/+/481727 , cf. QTBUG-114206

      Testcase:

              S a;
              QVERIFY(a.isNull());
              S empty = "";         
              QVERIFY(empty.isEmpty());
              QVERIFY(!empty.isNull());
      
              S result = a;
              result += empty;
              QVERIFY(result.isEmpty());
              QVERIFY(!result.isNull());
      

      If S is QString, this passes. If S is QByteArray, this fails (result is null).

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              peppe Giuseppe D'Angelo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews