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

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

XMLWordPrintable

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

      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).

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

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

              Created:
              Updated:
              Resolved: